OFFSET
0,5
COMMENTS
PROG
(Python)
from sympy import floor, jacobi_symbol as J
def a(n):
l=0
m=0
for i in range(1, 2*n + 2):
if J(i, 2*n + 1)==-1: l+=i
elif J(i, 2*n + 1)==1: m+=i
return floor(3*((l - m)/(2*n + 1)))//3
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 12 2017
CROSSREFS
KEYWORD
sign
AUTHOR
Antti Karttunen, Oct 21 2009
STATUS
approved