cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A166407 a(n) = floor(3*(A166406(n)/A005408(n))).

This page as a plain text file.
%I A166407 #14 May 08 2021 08:35:43
%S A166407 -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 A166407 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 A166407 -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 A166407 a(n) = floor(3*(A166406(n)/A005408(n))).
%C A166407 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 A166407 Antti Karttunen, <a href="/A166407/b166407.txt">Table of n, a(n) for n = 0..65535</a>
%o A166407 (Python)
%o A166407 from sympy import floor, jacobi_symbol as J
%o A166407 def a(n):
%o A166407     l=0
%o A166407     m=0
%o A166407     for i in range(1, 2*n + 2):
%o A166407         if J(i, 2*n + 1)==-1: l+=i
%o A166407         elif J(i, 2*n + 1)==1: m+=i
%o A166407     return floor(3*((l - m)/(2*n + 1)))
%o A166407 print([a(n) for n in range(101)]) # _Indranil Ghosh_, Jun 12 2017
%Y A166407 Cf. A166408.
%K A166407 sign
%O A166407 0,1
%A A166407 _Antti Karttunen_, Oct 21 2009