Search a number
cyclic n.  and  magic constant

First numbers that belong to both sets: