

A179760


Greatest k <= n such that 2^n+2^k+1 is prime, or 0 if no such k exists.


3



1, 1, 3, 1, 3, 5, 7, 0, 8, 7, 6, 5, 12, 11, 15, 1, 15, 13, 18, 17, 12, 7, 18, 9, 0, 21, 25, 21, 18, 25, 30, 0, 28, 27, 29, 33, 36, 23, 30, 0, 39, 41, 0, 17, 42, 43, 35, 0, 30, 29, 41, 21, 47, 45, 51, 0, 55, 0, 47, 41, 51, 21, 23, 0, 47, 63, 66, 65, 58
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

Up to n=6601, a(n) = 0 for 916 values of n and a(n) >= n/2 for 4574 values of n.


LINKS

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


MATHEMATICA

Table[k=n; While[k>0 && ! PrimeQ[2^n+2^k+1], k]; k, {n, 100}]


PROG

(PARI) A179760(n)={forstep(i=n, 1, 1, if(isprime(2^n+2^i+1), return(i))); return(0)}


CROSSREFS

Cf. A106821, A178993, A179291, A179013.
Sequence in context: A082082 A016646 A182600 * A160552 A256263 A006257
Adjacent sequences: A179757 A179758 A179759 * A179761 A179762 A179763


KEYWORD

nonn


AUTHOR

Pierre CAMI, Jan 12 2011


STATUS

approved



