OFFSET
1,1
COMMENTS
This sequence is Z_3(n), where Z_D(n) counts all vectors with integral components and length in a D-dimensional vector space within a certain radius. This sequence represents partial sums of A016725.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000 (terms 1..150 from Christopher Heiling)
EXAMPLE
For n = 2 the a(n)= 12 integral solutions of x^2 + y^2 + z^2 <= 2^2 are: {x,y,z} = {{0,0,1}; {0,1,0}; {1,0,0}; {0,0,-1}; {0,-1,0}; {-1,0,0}; {0,0,2}; {0,2,0}; {2,0,0}; {0,0,-2}; {0,-2,0}; {-2,0,0}}.
PROG
(Python)
from math import prod
from sympy import factorint
def A267309(n): return 6*sum(prod(p**e+(0 if p&3==1 else (p**e-1)//(p-1)<<1) for p, e in factorint(m>>(~m & m-1).bit_length()).items()) for m in range(1, n+1)) # Chai Wah Wu, Feb 22 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Christopher Heiling, Jan 19 2016
STATUS
approved
