login
A236181
Let x(1)x(2)... x(q) denote the decimal expansion of a number n with q odd. The sequence lists the squares n such that the central digit equals the sum of the other digits.
0
121, 484, 10201, 10816, 40804, 72900, 1002001, 1008016, 3059001, 4008004, 100020001, 100080016, 151290000, 210250000, 216090000, 234090000, 313290000, 400080004, 10000200001, 10000800016, 10210900401, 11003800201, 11020800400, 14101800001, 30101903001, 30310810000
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
Sequence in context: A062555 A017390 A110722 * A077432 A017654 A183448
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Jan 19 2014
STATUS
approved