login
A374716
Number of distinct sums i^2 + j^2 + k^2 + l^2 for 1<=i<=j<=k<=l<=n.
3
1, 5, 15, 34, 58, 93, 128, 175, 227, 289, 349, 429, 504, 592, 685, 791, 891, 1014, 1124, 1262, 1394, 1543, 1676, 1851, 2006, 2185, 2356, 2554, 2733, 2948, 3143, 3374, 3585, 3824, 4045, 4313, 4549, 4818, 5064, 5363, 5632, 5934, 6216, 6538, 6834, 7161, 7466, 7838, 8160, 8515, 8852, 9248, 9587, 9989
OFFSET
1,2
PROG
(PARI) a(n) = my(v=vector(4*n^2)); for(i=1, n, for(j=i, n, for(k=j, n, for(l=k, n, v[i^2+j^2+k^2+l^2]+=1)))); sum(i=1, #v, v[i]>0);
(Python)
def A374716(n): return len({i**2+j**2+k**2+l**2 for i in range(1, n+1) for j in range(i, n+1) for k in range(j, n+1) for l in range(k, n+1)}) # Chai Wah Wu, Jul 17 2024
CROSSREFS
Sequence in context: A332355 A147264 A147150 * A279231 A377054 A238340
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jul 17 2024
STATUS
approved