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.

A166040 Number of times Sum_{i=1..u} J(i,2n+1) obtains value zero when u ranges from 1 to (2n+1). Here J(i,k) is the Jacobi symbol.

This page as a plain text file.
%I A166040 #12 Feb 07 2015 18:06:02
%S A166040 0,1,2,1,0,3,4,1,4,5,6,1,0,17,8,1,4,5,8,1,8,11,20,1,0,13,14,1,6,5,10,
%T A166040 5,8,15,14,1,8,29,20,1,0,13,10,1,14,9,20,1,8,32,24,5,12,17,12,1,14,15,
%U A166040 38,1,0,37,74,11,10,5,18,17,12,15,22,1,10,90,22,1,38,17,22,1,14,27,18
%N A166040 Number of times Sum_{i=1..u} J(i,2n+1) obtains value zero when u ranges from 1 to (2n+1). Here J(i,k) is the Jacobi symbol.
%C A166040 A046092 gives the positions of zeros, as only with odd squares A016754(m) = A005408(A046092(m)) Jacobi symbols J(i,n) never obtain value -1, and thus their partial sum never descends back to zero. Even positions contain only even values, while odd positions contain odd values in all other positions, except even values in the positions given by A005408(A165602(i)), for i>=0.
%C A166040 Four bold conjectures by _Antti Karttunen_, Oct 08 2009: 1) All odd natural numbers occur. 2) Each of them occurs infinitely many times. 3) All even natural numbers occur. 4) Each even number > 0 occurs only finitely many times. (The last can be disputed. For example, 6 occurs four times among the first 400001 terms, at the positions 10, 28, 360, 215832.)
%H A166040 Antti Karttunen, <a href="/A166040/b166040.txt">Table of n, a(n) for n = 0..400000</a>
%o A166040 (MIT Scheme:) (define (A166040 n) (let ((w (A005408 n))) (let loop ((i 1) (s 1) (zv 0)) (cond ((= i w) zv) ((zero? s) (loop (1+ i) (+ s (jacobi-symbol (1+ i) w)) (1+ zv))) (else (loop (1+ i) (+ s (jacobi-symbol (1+ i) w)) zv))))))
%Y A166040 Bisections: A166085, A166086. See also A166087, A165601, A166092.
%K A166040 nonn
%O A166040 0,3
%A A166040 _Antti Karttunen_, Oct 08 2009