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

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 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 Pierre CAMI, Table of n, a(n) for n = 0..1600 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)-1) && !isprime(x) && !isprime(x+1), k++); k; \\ Michel Marcus, Sep 16 2019 CROSSREFS Sequence in context: A255916 A107333 A161642 * A098505 A178395 A330958 Adjacent sequences:  A152138 A152139 A152140 * A152142 A152143 A152144 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 5 03:52 EST 2021. Contains 349530 sequences. (Running on oeis4.)