login
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
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.
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
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jan 12 2011
STATUS
approved