OFFSET
1,1
COMMENTS
The numbers that are both perfect squares and palindromes (A033934) are in the sequence. The numbers 104^2, 1004^2, 10004^2,... are in the sequence.
EXAMPLE
10201 = 101^2 is in the sequence because the central digit 2 equals the sum of the other digits 1+0+0+1.
MAPLE
with(numtheory):for n from 2 to 6 do:m:=2*n-2:m1:=floor(sqrt(10^m)):m2:=floor(sqrt(10^(m+1)-1)):for k1 from m1 to m2 do:k:=k1^2:x:=convert(k, base, 10):n1:=nops(x):s:=sum('x[j]', 'j'=1..n1):s1:=s-x[n]:if x[n]=s1 then printf(`%d, `, k):else fi:od:od:
MATHEMATICA
cdodQ[n_]:=Module[{id=IntegerDigits[n], len, cd}, len=Length[id]; cd=If[OddQ[len], id[[(len+1)/2]], 9999]; Total[id]-cd==cd]; Select[Range[175000]^2, cdodQ] (* Harvey P. Dale, Aug 04 2024 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Jan 19 2014
STATUS
approved