%I #19 Jun 23 2024 11:52:04
%S 1,18,62,98,210,350,450,602,762,1142,1250,1458,1814,2178,2498,2622,
%T 3338,3722,4170,4358,5034,5714,5982,6602,7130,8034,8606,9066,9962,
%U 10550,11226,12146,12606,13802,14754,15194,16454,17154,18266,18750
%N Number of integer points (x,y,z) at distance <= 0.5 from sphere of radius n.
%H Chai Wah Wu, <a href="/A016728/b016728.txt">Table of n, a(n) for n = 0..10000</a>
%F For n > 0, a(n) = Sum_{i=n*(n-1)+1..n*(n+1)} A005875(i). - _Chai Wah Wu_, Jun 23 2024
%o (Python)
%o from itertools import combinations_with_replacement
%o from math import prod
%o from collections import Counter
%o def A016728(n):
%o if n == 0: return 1
%o x, y = (2*n-1)**2, (2*n+1)**2
%o 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
%o (Python)
%o # uses Python code from A005875
%o def A016728(n):
%o if n == 0: return 1
%o return sum(A005875(i) for i in range(n*(n-1)+1,n*(n+1)+1)) # _Chai Wah Wu_, Jun 23 2024
%Y Cf. A005875.
%K nonn
%O 0,2
%A csvcjld(AT)nomvst.lsumc.edu