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!)
A038703 Primes p such that p^2 mod q is odd, where q is the previous prime. 1
3, 5, 17, 29, 37, 127 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The next term if it exists is > 32452843 = 2000000th prime. Can someone prove this sequence is complete? - Olivier Gérard, Jun 26 2001
To prove that 127 is the last prime, we need to show that prime gaps satisfy prime(k)-prime(k-1)<sqrt(prime(k-1)) for k>31. Although it is easy to verify this inequality for all known prime gaps, there is no proof for all gaps. - T. D. Noe, Jul 25 2006
LINKS
Eric Weisstein's World of Mathematics, Prime Gaps
FORMULA
Prime(k) is in the sequence if prime(k)^2 (mod prime(k-1)) is odd.
EXAMPLE
The first prime with a prime lower than itself is 3. This squared is 9, which when divided by the previous prime 2 leaves remainder 1, which is odd. So 3 is in the sequence. 11 is not in the sequence because 11^2, when divided by the previous prime 7, leaves a remainder of 121 (mod 7) = 2, which is even.
MATHEMATICA
Prime /@ Select[ Range[ 2, 100 ], OddQ[ Mod[ Prime[ # ]^2, Prime[ # - 1 ] ] ] & ]
Transpose[Select[Partition[Prime[Range[50]], 2, 1], OddQ[PowerMod[Last[#], 2, First[#]]]&]] [[2]] (* Harvey P. Dale, May 31 2012 *)
PROG
(PARI) isok(p) = isprime(p) && (p>2) && (lift(Mod(p, precprime(p-1))^2) % 2); \\ Michel Marcus, Mar 05 2023
CROSSREFS
Cf. A038702.
Cf. A058188 (number of primes between prime(n) and prime(n)+sqrt(prime(n))).
Sequence in context: A161682 A079373 A181291 * A283806 A163586 A074931
KEYWORD
nonn,more
AUTHOR
Neil Fernandez, May 01 2000
EXTENSIONS
More terms from Olivier Gérard, Jun 26 2001
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 May 3 19:50 EDT 2024. Contains 372222 sequences. (Running on oeis4.)