Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #14 May 08 2021 08:35:43
%S -3,1,0,3,-9,3,0,6,0,3,0,9,-30,1,0,9,0,6,0,12,0,3,0,15,-63,6,0,12,0,9,
%T 0,6,0,3,0,21,0,2,0,15,-81,9,0,18,0,6,0,24,0,0,0,15,0,9,0,24,0,6,0,30,
%U -165,6,0,15,0,15,0,6,0,9,0,30,0,0,0,21,0,12,0,30,0,3,0,33,-234,6,0,6
%N a(n) = floor(3*(A166406(n)/A005408(n))).
%C Conjecture: the quotient A166406(i)/A005408(i) has denominator 3 when i is one of the terms of A166101, and it is integral in other cases. If true, then floor in the formula is unnecessary.
%H Antti Karttunen, <a href="/A166407/b166407.txt">Table of n, a(n) for n = 0..65535</a>
%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)))
%o print([a(n) for n in range(101)]) # _Indranil Ghosh_, Jun 12 2017
%Y Cf. A166408.
%K sign
%O 0,1
%A _Antti Karttunen_, Oct 21 2009