OFFSET
1,3
COMMENTS
Always contain an odd number of digits.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000 (n=1..412 from N. J. A. Sloane based on R. J. Mathar's b-file for A057135)
FORMULA
a(n) = A057135(n)^2
EXAMPLE
a(8) = 14641 since 14641 = 121^2 and 121 is also a palindrome
MAPLE
dmax:= 7: # to get all terms with up to dmax digits
Res:= 0, 1, 2^2, 3^2, 11^2, 22^2:
Po:= [[0], [1], [2], [3]]: Pe:= [[0, 0], [1, 1], [2, 2]]:
for d from 1 to dmax do
if d::odd then
Po:= select(t -> add(s^2, s=t) < 10, [seq(seq([i, op(t), i], t=Po), i=0..2)]);
Res:= Res, op(map(proc(p) if p[1] <> 0 then add(p[i]*10^(i-1), i=1..nops(p))^2 fi end proc, Po))
else
Pe:= select(t -> add(s^2, s=t) < 10, [seq(seq([i, op(t), i], t=Pe), i=0..2)]);
Res:= Res, op(map(proc(p) if p[1] <> 0 then add(p[i]*10^(i-1), i=1..nops(p))^2 fi end proc, Pe))
fi;
od:
Res; # Robert Israel, Jun 21 2017
MATHEMATICA
Select[Range[0, 10^6], PalindromeQ[#] && PalindromeQ[#^2] &]^2 (* Robert Price, Apr 26 2019 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Henry Bottomley, Aug 12 2000
STATUS
approved