OFFSET
0,2
LINKS
Indranil Ghosh and Chai Wah Wu, Table of n, a(n) for n = 0..10000 (terms n = 0..145 from Indranil Ghosh)
FORMULA
a(n) = (4*n+1)^2 + 8 * Sum_{k>0} d(k,n)*d(3*k,n) where d(k,n) is the number of integer solutions to x*y = k with 1 <= x,y <= n. - David Radcliffe, Jun 14 2025
PROG
(Python)
def t(n):
s=0
for a in range(-n, n+1):
for b in range(-n, n+1):
for c in range(-n, n+1):
for d in range(-n, n+1):
if (a*d-b*c)==2*(a*d+b*c):
s+=1
return s
for i in range(0, 146):
print(str(i)+" "+str(t(i)))
(Python)
def a280343_gen(lim):
yield 1
N = lim*lim
M = (N+2)//3
a = np.zeros(N, dtype=np.int64) # Counts solutions to x*y=k with x, y in 1..n
for n in range(1, lim):
a[n:n*n:n] += 2
a[n*n] += 1
yield (4*n+1)**2 + 8*int(a[3::3] @ a[1:M]) # David Radcliffe, Jun 14 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Indranil Ghosh, Jan 01 2017
STATUS
approved
