OFFSET
0,2
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
EXAMPLE
a(34) = 2 because 34 = 16 + 18 = 25 + 9 where 16 and 25 are squares and 18 and 9 are the reverses of the squares 81 and 9.
MAPLE
rev:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
V:= Array(0..1000):
for x from 0 while x^2 <= 1000 do
V[x^2]:= V[x^2] + 1;
for i from 1 to 9 do
for j from 0 while (10*j+i)^2 < 1000 do
y:= x^2 + rev((10*j+i)^2);
if y <= 1000 then V[y]:= V[y]+1 fi;
od od od:
convert(V, list);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Feb 25 2026
STATUS
approved
