%I #9 Aug 04 2024 12:31:16
%S 121,484,10201,10816,40804,72900,1002001,1008016,3059001,4008004,
%T 100020001,100080016,151290000,210250000,216090000,234090000,
%U 313290000,400080004,10000200001,10000800016,10210900401,11003800201,11020800400,14101800001,30101903001,30310810000
%N 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.
%C 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.
%e 10201 = 101^2 is in the sequence because the central digit 2 equals the sum of the other digits 1+0+0+1.
%p 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:
%t 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 *)
%Y Cf. A000290, A033934.
%K nonn,base
%O 1,1
%A _Michel Lagneau_, Jan 19 2014