OFFSET
1,5
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..1042
MATHEMATICA
f[n_] := Block[{k = 1, p = Product[Prime[i], {i, n}]}, While[ !PrimeQ[2^k*p - 1], k++ ]; k]; Table[ f[n], {n, 83}] (* Robert G. Wilson v, Sep 27 2004 *)
kp[n_]:=Module[{k=1}, While[!PrimeQ[2^k n-1], k++]; k]; With[{prmrls=Rest[ FoldList[Times, 1, Prime[Range[90]]]]}, kp/@prmrls] (* Harvey P. Dale, Feb 01 2012 *)
PROG
(PFGW & SCRIPT)
Command pfgw64 -f in.txt
in.txt file = SCRIPT file
SCRIPT
DIM n, 0
DIM i, 0
DIM pp
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET n, n+1
SET i, 0
LABEL loop2
SET i, i+1
SETS t, %d, %d, %d\,; n; p(n); i
SET pp, (2^i)*p(n)#-1
PRP pp, t
IF ISPRP THEN GOTO a
GOTO loop2
LABEL a
WRITE myf, t
GOTO loop1
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Sep 15 2004
EXTENSIONS
More terms from Robert G. Wilson v, Sep 27 2004
STATUS
approved