login
A016728
Number of integer points (x,y,z) at distance <= 0.5 from sphere of radius n.
2
1, 18, 62, 98, 210, 350, 450, 602, 762, 1142, 1250, 1458, 1814, 2178, 2498, 2622, 3338, 3722, 4170, 4358, 5034, 5714, 5982, 6602, 7130, 8034, 8606, 9066, 9962, 10550, 11226, 12146, 12606, 13802, 14754, 15194, 16454, 17154, 18266, 18750
OFFSET
0,2
FORMULA
For n > 0, a(n) = Sum_{i=n*(n-1)+1..n*(n+1)} A005875(i). - Chai Wah Wu, Jun 23 2024
PROG
(Python)
from itertools import combinations_with_replacement
from math import prod
from collections import Counter
def A016728(n):
if n == 0: return 1
x, y = (2*n-1)**2, (2*n+1)**2
return sum(6//prod((1, 1, 2, 6)[d] for d in q.values())<<3-q[0] for q in map(Counter, combinations_with_replacement(range(n+1), 3)) if x <= sum(b*a**2 for a, b in q.items())<<2 <= y) # Chai Wah Wu, Jun 20 2024
(Python)
# uses Python code from A005875
def A016728(n):
if n == 0: return 1
return sum(A005875(i) for i in range(n*(n-1)+1, n*(n+1)+1)) # Chai Wah Wu, Jun 23 2024
CROSSREFS
Cf. A005875.
Sequence in context: A338536 A090073 A327089 * A232385 A275155 A259634
KEYWORD
nonn
AUTHOR
csvcjld(AT)nomvst.lsumc.edu
STATUS
approved