The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A239638 Numbers n such that the semiprime 2^n-1 is divisible by 2n+1. 1
11, 23, 83, 131, 3359, 130439, 406583 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
All terms are primes == 5 modulo 6 (A005384 Sophie Germain primes).
a(8) >= 500000. - Max Alekseyev, May 28 2022
LINKS
EXAMPLE
n = 11, 2^n -1 = 2047 = 23*89,
n = 23, 8388607 = 47*178481,
n = 131, 2722258935367507707706996859454145691647 = 263*10350794431055162386718619237468234569.
MATHEMATICA
Select[Range[4000], PrimeQ[2*# + 1] && PowerMod[2, #, 2*# + 1] == 1 &&
PrimeQ[(2^# - 1)/(2*# + 1)] &] (* Giovanni Resta, Mar 23 2014 *)
PROG
(PARI) is(n)=n%6==5 && Mod(2, 2*n+1)^n==1 && isprime(2*n+1) && ispseudoprime((2^n-1)/(2*n+1)) \\ Charles R Greathouse IV, Aug 25 2016
(Python)
from sympy import isprime, nextprime
A239638_list, p = [], 5
while p < 10**6:
if (p % 6) == 5:
n = (p-1)//2
if pow(2, n, p) == 1 and isprime((2**n-1)//p):
A239638_list.append(n)
p = nextprime(p) # Chai Wah Wu, Jun 05 2019
CROSSREFS
Sequence in context: A060160 A241973 A158021 * A050767 A145918 A077707
KEYWORD
nonn,more
AUTHOR
Zak Seidov, Mar 23 2014
EXTENSIONS
a(5)-a(6) from Giovanni Resta, Mar 23 2014
a(7) from Eric Chen, added by Max Alekseyev, May 21 2022
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 23 15:34 EDT 2024. Contains 372763 sequences. (Running on oeis4.)