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.

A229626 a(n) is the smallest m such that 2*m^k-1 is prime for k = 1, 2, ..., n.

Original entry on oeis.org

2, 2, 3, 6, 6, 11256895, 15682744, 45779314036, 687860415949
Offset: 1

Views

Author

Farideh Firoozbakht, Sep 27 2013

Keywords

Crossrefs

Cf. A229627.

Programs

  • Mathematica
    a[1]=2;a[n_]:=a[n]=(For[m=a[n-1],Union[Table[PrimeQ[2 m^k-1],{k,n}]]!={True},m++];m)
  • PARI
    a(n)=my(m=2); while(1,for(k=1, n, if(!ispseudoprime(2*m^k-1), m++; next(2))); return(m)) \\ Charles R Greathouse IV, Oct 01 2013

Extensions

a(8) from Giovanni Resta, Oct 01 2013
a(9) from Tyler Busby, Jan 06 2023