%I #8 Jan 13 2024 13:06:45
%S 29,37,41,65,73,97,177,193
%N Odd integers (that is, of the form 2n+1) for which Sum_{i=1..u} J(i,2n+1) obtains value zero exactly 8 times, when u ranges from 1 to (2n+1). Here J(i,k) is the Jacobi symbol.
%C Of these eight, all are of the form 4k+1, and all others are primes except 65 (= 5*13) and 177 (= 3*59). Conjecture: There are no more terms after the eight one, 193. (Checked up to the 400000th term of A166040, i.e., up to A005408(400000)=800001.)
%o (MIT/GNU Scheme)
%o ; with macro MATCHING-POS by AK
%o (define (A166088 n) (A005408 (index_for_a166088 n)))
%o (define index_for_a166088 (MATCHING-POS 1 0 (lambda (i) (= 8 (A166040 i)))))
%K nonn
%O 1,1
%A _Antti Karttunen_, Oct 08 2009