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!)
A152141 a(n) is the least k such that 3*2^n*(2^k-1)-1 or 3*2^n*(2^k-1)+1 is prime ( or both primes). 2
1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 2, 2, 2, 3, 2, 1, 5, 7, 2, 4, 4, 4, 8, 9, 3, 4, 4, 1, 11, 13, 2, 1, 9, 1, 3, 1, 5, 8, 1, 2, 1, 5, 6, 20, 15, 6, 7, 8, 3, 5, 13, 4, 1, 6, 43, 8, 4, 4, 7, 9, 2, 1, 2, 1, 2, 15, 42, 5, 10, 8, 18, 3, 10, 1, 8, 8, 7, 21, 2, 16, 19, 5, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,10
LINKS
EXAMPLE
3*2^0*(2^1-1)-1=2 is prime so a(0)=1;
3*2^1*(2^1-1)-1=5 is prime as well as 7 so a(1)=1;
3*2^2*(2^1-1)-1=23 is prime so a(2)=1.
PROG
(PARI) a(n) = my(k=1); while ((x=3*2^n*(2^k-1)) && !isprime(x-1) && !isprime(x+1), k++); k; \\ Michel Marcus, Sep 16 2019; corrected Jun 14 2022
CROSSREFS
Sequence in context: A367825 A107333 A161642 * A098505 A178395 A330958
KEYWORD
nonn
AUTHOR
Pierre CAMI, Nov 26 2008
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 April 23 07:16 EDT 2024. Contains 371905 sequences. (Running on oeis4.)