OFFSET
1,1
EXAMPLE
The smallest sum of squares ending in a zero is 1^2 + 2^2 + 3^2 + 4^2 = 30, so a(1)=4. Likewise, 1^2 + ... + 24^2 = 4900, so a(2)=24.
PROG
(PARI) sos(x) = x*(x+1)*(2*x+1)/6;
a(n)={ local(s5=polrootspadic(sos(x), 5, n), s2=polrootspadic(sos(x), 2, n), ss10=Set()); for(i2=1, length(s2), v2=lift(s2[i2]); if(denominator(v2)==1, m2=Mod(v2, 2^n); for(i5=1, length(s5), s10=lift(chinese(m2, Mod(s5[i5], 5^n))); if(s10!=0&&sos(s10)%(10^n)==0, ss10=setunion(ss10, Set(s10))) ) ) ); ss10[1] }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Phil Carmody, Mar 13 2010
EXTENSIONS
Typo in definition corrected by Zak Seidov, Mar 16 2010
a(10) corrected by and more terms from Jinyuan Wang, Aug 23 2021
STATUS
approved