cp's OEIS Frontend

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.

A016728 Number of integer points (x,y,z) at distance <= 0.5 from sphere of radius n.

Original entry on oeis.org

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

Views

Author

csvcjld(AT)nomvst.lsumc.edu

Keywords

Crossrefs

Cf. A005875.

Programs

  • 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

Formula

For n > 0, a(n) = Sum_{i=n*(n-1)+1..n*(n+1)} A005875(i). - Chai Wah Wu, Jun 23 2024