|
|
A166051
|
|
Nonsquare integers of the form 4n+1 for which Sum_{i=1..u} J(i,4n+1) is never negative for any u in range [1,(2n)], where J(i,k) is the Jacobi symbol.
|
|
2
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Conjecture: There are no more terms after 165. (Checked up to A016813(290511) = 1162045.) If this is true, then also 5, 13 and 37 are only 4k+1 primes in A080114.
|
|
LINKS
|
|
|
PROG
|
(MIT Scheme with macro MATCHING-POS by AK):
(define index_for_a166051 (MATCHING-POS 1 0 (lambda (n) (let ((w (A016813c n)) (hp (A005843 n))) (let loop ((i 1) (s 1)) (cond ((< s 0) #f) ((>= i hp) (zero? s)) (else (loop (1+ i) (+ s (jacobi-symbol (1+ i) w))))))))))
(Sage)
def is_what(n, k):
s = 0
for i in (1..k):
s += jacobi_symbol(i, n)
if s < 0: return False
return not is_square(n)
return [m for m in range(1, n + 1, 4) if is_what(m, m // 2)]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|