login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A080114 Odd primes p for which all sums Sum_{j=1..u} L(j/p) (with u ranging from 1 to (p-1)/2) are nonnegative, where L(j/p) is Legendre symbol of j and p, which is defined to be 1 if j is a quadratic residue (mod p) and -1 if j is a quadratic non-residue (mod p). 7
3, 5, 7, 11, 13, 23, 31, 37, 47, 59, 71, 79, 83, 103, 131, 151, 167, 191, 199, 239, 251, 263, 271, 311, 359, 383, 419, 431, 439, 479, 503, 563, 599, 607, 647, 659, 719, 743, 751, 839, 863, 887, 911, 919, 971, 983, 991, 1031, 1039, 1063, 1091, 1103, 1151, 1223 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

This sequence contains those 4k+1 primes p for which the first half (the (p-1)/2 most significant bits) of A055094(p) is in A014486 and those 4k+3 primes q, for which the whole A055094(q) is in A014486.

Are the 2nd, 5th and 8th primes (5,13,37) only terms of this sequence that are of the form 4k+1? [Searched up to a(211)=7927 by AK.]

LINKS

Table of n, a(n) for n=1..54.

A. Karttunen, Illustration of Legendre's candelabras

MAPLE

with(numtheory); # For ithprime and legendre.

A080114 := n -> ithprime(A080112(n));

A080114v2 := proc(upto_n) local j, a, p, i, s; a := []; for i from 2 to upto_n do p := ithprime(i); s := 0; for j from 1 to (p-1)/2 do s := s + legendre(j, p); if(s < 0) then break; fi; od; if(s >= 0) then a := [op(a), p]; fi; od; RETURN(a); end;

MATHEMATICA

s[p_, u_] := Sum[JacobiSymbol[j, p], {j, 1, u}]; Select[Prime[Range[2, 200] ], (p = #; AllTrue[Range[(p - 1)/2], s[p, #] >= 0 &]) &] (* Jean-Fran├žois Alcover, Mar 04 2016 *)

PROG

(Sage)

def A080114_list(n) :

    a = []

    for i in (2..n) :

        s = 0

        p = nth_prime(i)

        for j in (1..(p-1)/2) :

            s += legendre_symbol(j, p)

            if s < 0 : break

        if s >= 0 : a.append(p)

    return a

A080114_list(200) # Peter Luschny, Aug 08 2012

CROSSREFS

A080112, A080115. These are the primes for which a "Legendre's candelabra" can be constructed, see A080120.

Supersequence of A095102.

Sequence in context: A182583 A181741 A154319 * A088878 A259730 A254673

Adjacent sequences:  A080111 A080112 A080113 * A080115 A080116 A080117

KEYWORD

nonn

AUTHOR

Antti Karttunen Feb 11 2003

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 14 04:53 EST 2018. Contains 318090 sequences. (Running on oeis4.)