login
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

%I #8 Sep 09 2019 10:58:19

%S 8,64,80,98,640,664,800,898,980,998,6400,6640,6664,8000,8980,8998,

%T 9800,9980,9998,64000,66400,66640,66664,80000,89800,89980,89998,98000,

%U 98998,99800,99980,99998,640000,664000,664064,666400,666640,666664,684908,800000,806008

%N 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).

%C Corresponding squares in A107627. Cf. A001744 Every digit contains a loop.

%t 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}]

%o (PARI) is_a001744(n) = #setintersect(vecsort(digits(n), , 8), [1, 2, 3, 5, 7])==0

%o is(n) = is_a001744(n) && is_a001744(n^2) \\ _Felix Fröhlich_, Sep 09 2019

%Y Cf. A001744, A107624, A107625, A107627.

%K nonn,base,dumb

%O 1,1

%A _Zak Seidov_, May 18 2005

%E More terms from _Felix Fröhlich_, Sep 09 2019