login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A262994 Smallest number k>2 such that k*2^n-1 is a prime number. 2
3, 3, 3, 3, 4, 3, 3, 5, 7, 5, 3, 5, 9, 5, 4, 8, 4, 3, 28, 14, 7, 26, 13, 39, 22, 11, 16, 8, 4, 20, 10, 5, 6, 3, 24, 12, 6, 3, 25, 24, 12, 6, 3, 14, 7, 20, 10, 5, 19, 11, 21, 20, 10, 5, 3, 32, 16, 8, 4, 17, 24, 12, 6, 3, 67, 63, 43, 63, 40, 20, 10, 5, 15, 12, 6, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

If k=2^j then n+j is a Mersenne exponent.

a(n)=3 if and only if 3*2^n-1 is a prime; that is, n belongs to A002235. - Altug Alkan, Oct 08 2015

LINKS

Pierre CAMI, Table of n, a(n) for n = 1..10000

EXAMPLE

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

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

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

MATHEMATICA

a[n_] := For[k = 3, True, k++, If[PrimeQ[k*2^n - 1], Return[k]]]; Table[a[n], {n, 1, 100}] (* Jean-Fran├žois Alcover, Oct 07 2015 *)

PROG

(PARI) a(n) = {k=3; while (! isprime(k*2^n-1), k++); k; } \\ Michel Marcus, Oct 08 2015

CROSSREFS

Cf. A247202, A002235.

Sequence in context: A276863 A227321 A309555 * A179847 A035936 A006671

Adjacent sequences:  A262991 A262992 A262993 * A262995 A262996 A262997

KEYWORD

nonn

AUTHOR

Pierre CAMI, Oct 07 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 November 18 17:45 EST 2019. Contains 329287 sequences. (Running on oeis4.)