OFFSET
1,3
COMMENTS
For the first 8300 terms, there are 291 values of n such that a(n)=0 and 6927 values of n with a(n) >= n/2.
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
(Sage)
A179013 = lambda n: next((k for k in reversed([1..floor(log(2**n+1, 2))]) if is_pseudoprime(2**n-2**k+1)), 0) # D. S. McNeil, Jan 12 2011
(PARI) a(n) = {my(k=n); while (!isprime(2^n-2^k+1), k--; if (k==0, return (0))); k; } \\ Michel Marcus, Sep 21 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jan 12 2011
STATUS
approved