OFFSET
1,5
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..10000
EXAMPLE
3*2*2^1-1 = 11 prime so a(1)=1.
3*3*2^1-1 = 17 prime so a(2)=1.
3*5*2^1-1 = 29 prime so a(3)=1.
3*7*2^1-1 = 41 prime so a(4)=1.
3*11*2^1-1 = 65 composite.
3*11*2^2-1 = 131 prime so a(5)=2.
MATHEMATICA
Table[p = Prime[n]; k = 1; While[! PrimeQ[3*p*2^k - 1], k++]; k, {n, 100}] (* T. D. Noe, Feb 29 2012 *)
PROG
PFGW64 from Primeform group and SCRIPTIFY
Command pfgw64 -f in.txt
in.txt file :
SCRIPT
DIM nn, 0
DIM kk
DIMS tt
OPENFILEOUT myfile, k.txt
LABEL loopn
SET nn, nn+1
IF nn>50000 THEN END
SET kk, 0
LABEL loopk
SET kk, kk+1
SETS tt, %d, %d\,; nn; kk
PRP 3*p(nn)*2^kk-1, tt
IF ISPRP THEN GOTO a
IF ISPRIME THEN GOTO a
GOTO loopk
LABEL a
WRITE myfile, tt
GOTO loopn
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Feb 20 2012
STATUS
approved