login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A258868 a(n) is the smallest integer >= a(n-1) such that prime(n)*2^a(n)-1 is a prime number. 1
1, 1, 2, 5, 26, 287, 356, 395, 544, 11008, 21957, 32125, 42450, 50867, 55408, 206970, 358276, 384287, 403461, 735802, 783831, 969795, 1192950, 1383108 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

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

K. Bonath, Riesel and Proth Prime Database (2015)

EXAMPLE

2*2^1-1=3 prime so a(1)=1.

3*2^1-1=5 prime so a(2)=1.

5*2^1-1=9 composite, 5*2^2-1=19 prime so a(3)=2.

MAPLE

A258868 := proc(n)

    option remember;

    if n = 0 then

        0;

    else

        for a from procname(n-1) do

            ithprime(n)*2^a-1 ;

            if isprime(%) then

                return a;

            fi ;

        end do:

    end if;

end proc: # R. J. Mathar, Sep 23 2016

MATHEMATICA

lst={1}; Do[x=Last[lst]; Label[begin];

If[PrimeQ[Prime[n]*2^x-1], AppendTo[lst, x], x=x+1; Goto[begin]], {n, 2, 9}]; lst

(* Ivan N. Ianakiev, Jun 19 2015 *)

PROG

(PARI) first(n)=my(t, p); vector(n, i, p=prime(i); while(!ispseudoprime(p<<t-1), t++); t) \\ Charles R Greathouse IV, Jul 03 2015

CROSSREFS

Cf. A128979.

Sequence in context: A323299 A111195 A323293 * A322705 A167007 A064006

Adjacent sequences:  A258865 A258866 A258867 * A258869 A258870 A258871

KEYWORD

nonn

AUTHOR

Pierre CAMI, Jun 13 2015

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 May 31 16:29 EDT 2020. Contains 334748 sequences. (Running on oeis4.)