login
A374715
Number of distinct sums i^2 + j^2 + k^2 for 1<=i<=j<=k<=n.
3
1, 4, 10, 20, 33, 51, 69, 94, 122, 157, 187, 233, 273, 316, 373, 432, 485, 558, 614, 694, 770, 849, 915, 1019, 1108, 1205, 1304, 1410, 1504, 1640, 1742, 1872, 1997, 2121, 2245, 2410, 2534, 2678, 2821, 2994, 3136, 3320, 3472, 3647, 3820, 3993, 4157, 4393, 4558, 4757, 4963, 5186, 5360, 5593
OFFSET
1,2
PROG
(PARI) a(n) = my(v=vector(3*n^2)); for(i=1, n, for(j=i, n, for(k=j, n, v[i^2+j^2+k^2]+=1))); sum(i=1, #v, v[i]>0);
(Python)
def A374715(n): return len({i**2+j**2+k**2 for i in range(1, n+1) for j in range(i, n+1) for k in range(j, n+1)}) # Chai Wah Wu, Jul 17 2024
CROSSREFS
Sequence in context: A027373 A008142 A008045 * A008124 A019457 A360050
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jul 17 2024
STATUS
approved