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.

A166406 a(n) = A166405(n)-A166100(n).

This page as a plain text file.
%I A166406 #13 Apr 28 2021 09:52:08
%S A166406 -1,1,0,7,-27,11,0,30,0,19,0,69,-250,9,0,93,0,70,0,156,0,43,0,235,
%T A166406 -1029,102,0,220,0,177,0,126,0,67,0,497,0,50,0,395,-2187,249,0,522,0,
%U A166406 182,0,760,0,0,0,515,0,321,0,888,0,230,0,1190,-6655,246,0,635,0,655,0
%N A166406 a(n) = A166405(n)-A166100(n).
%C A166406 Zeros occur at (A166409(k)-1)/2. The negative terms occur at positions given by A046092 (see the comment at A166040).
%C A166406 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.
%H A166406 Antti Karttunen, <a href="/A166406/b166406.txt">Table of n, a(n) for n = 0..65535</a>
%o A166406 (Python)
%o A166406 from sympy import jacobi_symbol as J
%o A166406 def a(n):
%o A166406     l=0
%o A166406     m=0
%o A166406     for i in range(1, 2*n + 2):
%o A166406         if J(i, 2*n + 1)==-1: l+=i
%o A166406         elif J(i, 2*n + 1)==1: m+=i
%o A166406     return l - m
%o A166406 print([a(n) for n in range(101)]) # _Indranil Ghosh_, Jun 12 2017
%Y A166406 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.
%K A166406 sign
%O A166406 0,4
%A A166406 _Antti Karttunen_, Oct 21 2009, Oct 22 2009