|
|
A057136
|
|
Palindromes whose square root is a palindrome.
|
|
7
|
|
|
0, 1, 4, 9, 121, 484, 10201, 12321, 14641, 40804, 44944, 1002001, 1234321, 4008004, 100020001, 102030201, 104060401, 121242121, 123454321, 125686521, 400080004, 404090404, 10000200001, 10221412201, 12102420121, 12345654321, 40000800004
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Always contain an odd number of digits.
|
|
LINKS
|
|
|
FORMULA
|
|
|
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:
|
|
MATHEMATICA
|
Select[Range[0, 10^6], PalindromeQ[#] && PalindromeQ[#^2] &]^2 (* Robert Price, Apr 26 2019 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|