login
Squares containing 2k digits in which the sum of the first k digits = that of the rest.
2

%I #7 Sep 19 2024 21:42:32

%S 5041,108900,122500,128164,137641,155236,173056,185761,203401,206116,

%T 216225,287296,288369,302500,324900,342225,368449,423801,434281,

%U 459684,485809,515524,531441,540225,675684,698896,720801,737881,749956,779689

%N Squares containing 2k digits in which the sum of the first k digits = that of the rest.

%H Andrew Howroyd, <a href="/A068897/b068897.txt">Table of n, a(n) for n = 1..10000</a>

%e 5041 is a member with 5+0 = 4+1.

%o (PARI) isok(n)={my(d=digits(n)); my(k=#d); k%2==0 && vecsum(d[1..k/2]) == vecsum(d[k/2+1..k])}

%o lista(n)={my(L=List(), k=0); while(#L<n, k++; my(t=k^2); if(isok(t), listput(L,t))); Vec(L)} \\ _Andrew Howroyd_, Sep 19 2024

%Y Intersection of A000290 and A240927.

%Y Cf. A068896, A068898.

%K easy,nonn,base

%O 1,1

%A _Amarnath Murthy_, Mar 21 2002

%E Corrected and extended by _Harvey P. Dale_, Mar 31 2002

%E Offset changed by _Andrew Howroyd_, Sep 19 2024