login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Squares and their roots having square decimal digits.
2

%I #12 Aug 26 2024 13:45:06

%S 0,1,100,10000,1000000,1100401,100000000,110040100,10000000000,

%T 10100049001,11004010000,1000000000000,1010004900100,1100401000000,

%U 100000000000000,100100004990001,101000490010000,110040100000000

%N Squares and their roots having square decimal digits.

%C If k is a term, then so is 100 * k. - _Robert Israel_, Aug 26 2024

%H Robert Israel, <a href="/A077440/b077440.txt">Table of n, a(n) for n = 1..388</a>

%e a(6) = 1100401 = 1049^2.

%e A019544(8)=441 is not a term, as 441=21^2 and 2 is not a square digit.

%p N:= 30: # for terms of up to 2*N digits

%p R:= {1}: T:= {1,9}:

%p for d from 2 to N do

%p T:= select(t -> convert(convert(t^2 mod 10^d, base,10),set) subset {0,1,4,9}, map(t -> (t, t + 10^(d-1), t + 4*10^(d-1), t + 9*10^(d-1)), T));

%p R:= R union select(t -> convert(convert(t^2,base,10),set) subset {0,1,4,9},T);

%p od:

%p R2:= map(t -> t^2, R):

%p Res:= map(t -> seq(t*10^(2*i), i=0..(2*N-ilog10(t)-1)/2), R2) union {0}:

%p sort(convert(Res,list)); # _Robert Israel_, Aug 26 2024

%t a = {}; Do[d = FromDigits[ ReplaceAll[ IntegerDigits[n, 4], {3 -> 9, 2 -> 4}]]; If[ Union[ Join[ IntegerDigits[d^2], {0, 1, 4, 9}]] == {0, 1, 4, 9}, a = Append[a, d^2]], {n, 0, 3*10^4}]; a

%Y a(n) = A077439(n)^2.

%Y Cf. A019544, A000290, A046030.

%K nonn,base

%O 1,3

%A _Reinhard Zumkeller_, Nov 06 2002

%E Edited by _Robert G. Wilson v_, Nov 08 2002