Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A166406
a(n) = A166405(n)-A166100(n).
6
-1, 1, 0, 7, -27, 11, 0, 30, 0, 19, 0, 69, -250, 9, 0, 93, 0, 70, 0, 156, 0, 43, 0, 235, -1029, 102, 0, 220, 0, 177, 0, 126, 0, 67, 0, 497, 0, 50, 0, 395, -2187, 249, 0, 522, 0, 182, 0, 760, 0, 0, 0, 515, 0, 321, 0, 888, 0, 230, 0, 1190, -6655, 246, 0, 635, 0, 655, 0
OFFSET
0,4
COMMENTS
Zeros occur at (A166409(k)-1)/2. The negative terms occur at positions given by A046092 (see the comment at A166040).
Sum of those positive i <= 2n+1, for which J(i,2n+1)=-1 minus sum of those positive i <= 2n+1, for which J(i,2n+1)=+1. Here J(i,k) is the Jacobi symbol.
LINKS
PROG
(Python)
from sympy import 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 l - m
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 12 2017
CROSSREFS
A125615(n)=a(A102781(n)). Cf. A166100, A166407-A166409. The cases where a(i)/A005408(i) is not integer seem also to be given by A166101.
Sequence in context: A009380 A183329 A342930 * A243006 A175377 A323113
KEYWORD
sign
AUTHOR
Antti Karttunen, Oct 21 2009, Oct 22 2009
STATUS
approved