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).
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
Programs
-
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}]
-
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
Extensions
More terms from Felix Fröhlich, Sep 09 2019
Comments