login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = floor(A166407(n)/3).
2

%I #11 May 09 2021 05:11:17

%S -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,

%T 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,

%U 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

%N a(n) = floor(A166407(n)/3).

%C See the conjecture in A166407. If true, then a(i) = A166406(i)/A005408(i), whenever i is not in A166101.

%o (Python)

%o from sympy import floor, jacobi_symbol as J

%o def a(n):

%o l=0

%o m=0

%o for i in range(1, 2*n + 2):

%o if J(i, 2*n + 1)==-1: l+=i

%o elif J(i, 2*n + 1)==1: m+=i

%o return floor(3*((l - m)/(2*n + 1)))//3

%o print([a(n) for n in range(101)]) # _Indranil Ghosh_, Jun 12 2017

%Y A165951(n)=a(A102781(n)) for n>=2.

%K sign

%O 0,5

%A _Antti Karttunen_, Oct 21 2009