This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A016728 #19 Jun 23 2024 11:52:04 %S A016728 1,18,62,98,210,350,450,602,762,1142,1250,1458,1814,2178,2498,2622, %T A016728 3338,3722,4170,4358,5034,5714,5982,6602,7130,8034,8606,9066,9962, %U A016728 10550,11226,12146,12606,13802,14754,15194,16454,17154,18266,18750 %N A016728 Number of integer points (x,y,z) at distance <= 0.5 from sphere of radius n. %H A016728 Chai Wah Wu, <a href="/A016728/b016728.txt">Table of n, a(n) for n = 0..10000</a> %F A016728 For n > 0, a(n) = Sum_{i=n*(n-1)+1..n*(n+1)} A005875(i). - _Chai Wah Wu_, Jun 23 2024 %o A016728 (Python) %o A016728 from itertools import combinations_with_replacement %o A016728 from math import prod %o A016728 from collections import Counter %o A016728 def A016728(n): %o A016728 if n == 0: return 1 %o A016728 x, y = (2*n-1)**2, (2*n+1)**2 %o A016728 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 A016728 (Python) %o A016728 # uses Python code from A005875 %o A016728 def A016728(n): %o A016728 if n == 0: return 1 %o A016728 return sum(A005875(i) for i in range(n*(n-1)+1,n*(n+1)+1)) # _Chai Wah Wu_, Jun 23 2024 %Y A016728 Cf. A005875. %K A016728 nonn %O A016728 0,2 %A A016728 csvcjld(AT)nomvst.lsumc.edu