login
A399202
a(n) is the smallest nonnegative integer k where there are exactly n nonnegative integer solutions to x^2 + y^2 = k.
6
3, 0, 1, 50, 25, 1250, 325, 31250, 1105, 8450, 4225, 19531250, 5525, 488281250, 203125, 211250, 27625, 305175781250, 71825, 7629394531250, 138125, 5281250, 2640625, 4768371582031250, 160225, 35701250, 17850625, 2442050, 1221025, 74505805969238281250, 1795625, 1862645149230957031250
OFFSET
0,1
COMMENTS
a(n) is the smallest nonnegative k such that A000925(k) = n.
LINKS
FORMULA
For n >= 2, a(n) = min(A018782(n), A018782(n-1)) if n is even, and a(n) = 2*A018782(n) if n is odd.
EXAMPLE
n | A018782 | a(n)
---+---------+-----------
1 | 1 | (0)
2 | 5 | 1
3 | 25 | 2*25
4 | 65 | 25
5 | 625 | 2*625
6 | 325 | 325
7 | 15625 | 2*15625
8 | 1105 | 1105
9 | 4225 | 2*4225
10 | 8125 | 4225
11 | 9765625 | 2*9765625
12 | 5525 | 5525
PROG
(PARI) b(n, k) = sum(i=0, sqrtint(n), sum(j=0, sqrtint(n\k), i^2+k*j^2==n));
a(n, k=1) = my(cnt=0); while(b(cnt, k)!=n, cnt++); cnt;
KEYWORD
nonn,new
AUTHOR
Seiichi Manyama, Aug 22 2026
STATUS
approved