Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #27 Aug 03 2014 14:01:39
%S 1,1,1,1,2,3,1,1,1,1,3,2,2,1,1,1,1,4,1,4,7,2,8,4,2,3,1,1,1,1,1,2,1,2,
%T 2,2,1,1,2,5,5,15,3,11,1,1,2,3,1,1,3,1,3,2,2,3,1,2,2,2,1,8,6,10,1,1,4,
%U 3,1,5,4,1,3,1,1,1,1,1,3,12,6,2,2,3,1,1
%N Least number k > 0 such that 3*prime(n)*2^k-1 is a prime number.
%H Pierre CAMI, <a href="/A207572/b207572.txt">Table of n, a(n) for n = 1..10000</a>
%e 3*2*2^1-1 = 11 prime so a(1)=1.
%e 3*3*2^1-1 = 17 prime so a(2)=1.
%e 3*5*2^1-1 = 29 prime so a(3)=1.
%e 3*7*2^1-1 = 41 prime so a(4)=1.
%e 3*11*2^1-1 = 65 composite.
%e 3*11*2^2-1 = 131 prime so a(5)=2.
%t Table[p = Prime[n]; k = 1; While[! PrimeQ[3*p*2^k - 1], k++]; k, {n, 100}] (* _T. D. Noe_, Feb 29 2012 *)
%o PFGW64 from Primeform group and SCRIPTIFY
%o Command pfgw64 -f in.txt
%o in.txt file :
%o SCRIPT
%o DIM nn,0
%o DIM kk
%o DIMS tt
%o OPENFILEOUT myfile,k.txt
%o LABEL loopn
%o SET nn,nn+1
%o IF nn>50000 THEN END
%o SET kk,0
%o LABEL loopk
%o SET kk,kk+1
%o SETS tt,%d,%d\,;nn;kk
%o PRP 3*p(nn)*2^kk-1,tt
%o IF ISPRP THEN GOTO a
%o IF ISPRIME THEN GOTO a
%o GOTO loopk
%o LABEL a
%o WRITE myfile,tt
%o GOTO loopn
%K nonn
%O 1,5
%A _Pierre CAMI_, Feb 20 2012