login
A166408
a(n) = floor(A166407(n)/3).
2
-1, 0, 0, 1, -3, 1, 0, 2, 0, 1, 0, 3, -10, 0, 0, 3, 0, 2, 0, 4, 0, 1, 0, 5, -21, 2, 0, 4, 0, 3, 0, 2, 0, 1, 0, 7, 0, 0, 0, 5, -27, 3, 0, 6, 0, 2, 0, 8, 0, 0, 0, 5, 0, 3, 0, 8, 0, 2, 0, 10, -55, 2, 0, 5, 0, 5, 0, 2, 0, 3, 0, 10, 0, 0, 0, 7, 0, 4, 0, 10, 0, 1, 0, 11, -78, 2, 0, 2, 0, 5, 0, 8, 0, 2, 0
OFFSET
0,5
COMMENTS
See the conjecture in A166407. If true, then a(i) = A166406(i)/A005408(i), whenever i is not in A166101.
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
A165951(n)=a(A102781(n)) for n>=2.
Sequence in context: A322706 A051722 A357354 * A327077 A284826 A307752
KEYWORD
sign
AUTHOR
Antti Karttunen, Oct 21 2009
STATUS
approved