login
A107626
Numbers n such that every digit of both n and n^2 contains a loop (only digits 0,4,6,8,9 in n and n^2).
2
8, 64, 80, 98, 640, 664, 800, 898, 980, 998, 6400, 6640, 6664, 8000, 8980, 8998, 9800, 9980, 9998, 64000, 66400, 66640, 66664, 80000, 89800, 89980, 89998, 98000, 98998, 99800, 99980, 99998, 640000, 664000, 664064, 666400, 666640, 666664, 684908, 800000, 806008
OFFSET
1,1
COMMENTS
Corresponding squares in A107627. Cf. A001744 Every digit contains a loop.
MATHEMATICA
Do[id=Union[IntegerDigits[n^2], IntegerDigits[n]]; If[Count[id, 1]+Count[id, 2]+Count[id, 3]+Count[id, 5]+Count[id, 7]==0, Print[n]], {n, 10000}]
PROG
(PARI) is_a001744(n) = #setintersect(vecsort(digits(n), , 8), [1, 2, 3, 5, 7])==0
is(n) = is_a001744(n) && is_a001744(n^2) \\ Felix Fröhlich, Sep 09 2019
CROSSREFS
KEYWORD
nonn,base,dumb
AUTHOR
Zak Seidov, May 18 2005
EXTENSIONS
More terms from Felix Fröhlich, Sep 09 2019
STATUS
approved