login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
5, 13, 21, 37, 85, 93, 165 (list; graph; refs; listen; history; text; internal format)
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 (A166051 n) (A016813 (index_for_a166051 n)))
(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)
def A166051_list(n):
return [m for m in range(1, n + 1, 4) if is_what(m, m // 2)]
A166051_list(1000) # Peter Luschny, Aug 08 2012
CROSSREFS
Setwise difference of A016754 and A166049.
Sequence in context: A273569 A273750 A191116 * A160170 A277189 A060004
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 08 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)