OFFSET
1,3
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..10000
EXAMPLE
2^3 - 2^2 -1 = 3 prime so a(3)=2
2^4 - 2^3 -1 = 7 prime so a(4)=3
2^5 - 2^3 -1 = 23 prime so a(5)=3
2^6 - 2^5 -1 = 31 prime so a(6)=5
MATHEMATICA
kk[n_]:=Module[{k=n-1, n2=2^n}, While[!PrimeQ[n2-2^k-1]&&k>0, k--]; k]; Array[kk, 70] (* Harvey P. Dale, Mar 09 2012 *)
PROG
(PARI)
for(n=1, 1000, q=1;
forstep(k=n-1, 0, -1,
if(isprime(2^n-2^k-1),
q=0;
print1(k, ", ");
break()
)
);
if(q, print1(0, ", "))
) /* Joerg Arndt, Jan 14 2011 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, May 18 2005
EXTENSIONS
Extra numbers to right of data removed from b-file by Andrew Howroyd, Feb 23 2018
STATUS
approved