cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A239638 Numbers n such that the semiprime 2^n-1 is divisible by 2n+1.

Original entry on oeis.org

11, 23, 83, 131, 3359, 130439, 406583
Offset: 1

Views

Author

Zak Seidov, Mar 23 2014

Keywords

Comments

All terms are primes == 5 modulo 6 (A005384 Sophie Germain primes).
a(8) >= 500000. - Max Alekseyev, May 28 2022

Examples

			n = 11, 2^n -1 = 2047 = 23*89,
n = 23, 8388607 = 47*178481,
n = 131, 2722258935367507707706996859454145691647 =  263*10350794431055162386718619237468234569.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[4000], PrimeQ[2*# + 1] && PowerMod[2, #, 2*# + 1] == 1 &&
    PrimeQ[(2^# - 1)/(2*# + 1)] &] (* Giovanni Resta, Mar 23 2014 *)
  • 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

Extensions

a(5)-a(6) from Giovanni Resta, Mar 23 2014
a(7) from Eric Chen, added by Max Alekseyev, May 21 2022