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!)
A179291 Greatest k <= n such that 2^n+2^k-1 is prime, or 0 if no such k exists. 3
1, 2, 2, 4, 4, 6, 6, 7, 0, 8, 6, 12, 8, 12, 10, 16, 0, 18, 18, 18, 12, 10, 16, 21, 0, 15, 22, 22, 0, 30, 20, 24, 0, 32, 34, 21, 8, 3, 38, 36, 16, 26, 0, 43, 0, 43, 42, 43, 0, 48, 46, 38, 0, 28, 44, 55, 0, 54, 0, 60, 56, 28, 56, 60, 64, 63, 48, 60, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Up to n=6600, a(n) = 0 for 867 values of n and a(n) >= n/2 for 4931 values of n.
When n+1 is a prime in A000043 and k=n, then 2^n+2^k-1 = 2^(n+1)-1 is a Mersenne Prime.
LINKS
MATHEMATICA
Table[k=n; While[k>0 && ! PrimeQ[2^n+2^k-1], k--]; k, {n, 100}] (* T. D. Noe, Jan 12 2011 *)
PROG
(PARI) A179291(n)={forstep(i=n, 1, -1, if(isprime(2^n+2^i-1), return(i))); return(0)} \\ Michael B. Porter, Jan 12 2011
CROSSREFS
Sequence in context: A124195 A220662 A079584 * A004079 A096494 A116568
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jan 12 2011
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 March 19 04:26 EDT 2024. Contains 370952 sequences. (Running on oeis4.)