OFFSET
1,3
COMMENTS
FORMULA
a(n) = 1 for n = A000043(k) - 1, the Mersenne exponents minus 1. - T. D. Noe, Mar 23 2011
MATHEMATICA
sik[n_]:=Module[{c=2^n, k=1}, While[!PrimeQ[Prime[k]*c-1], k++]; k]; Array[ sik, 70] (* The program will NOT identify cases where no prime satisfies the definition. See the second comment. *) (* Harvey P. Dale, Jan 10 2016 *)
PROG
(Other) SCRIPT / DIM nn, 0 / DIM kk / DIMS st / LABEL loopn / SET nn, nn+1 / IF nn>10000 THEN END / SET kk, 0 / LABEL loopk / SET kk, kk+1 / SET st, %d, %d, %d\,; nn; kk; p(kk) / PRP p(kk)*2^nn-1 / IF ISPRIME THEN GOTO loopn / GOTO loopk / / This file is the in.txt file / The command is PFGW -f in.txt / The results are in the file pfgw-prime.log for small n / and in the pfgw.log file for greatest n / Program PFGW from Primeform Group /
(PARI) a(n) = {my(k=1); while (!isprime(prime(k)*2^n-1), k++); k; } \\ Michel Marcus, Sep 16 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jul 09 2010
STATUS
approved