Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #26 Jul 14 2015 23:21:45
%S 1,1,1,1,2,6,1,1,2,3,12,1,2,22,2,4,13,12,6,1,4,1,4,9,2,9,5,6,2,1,9,17,
%T 22,7,19,73,23,12,5,27,33,64,33,5,7,41,44,35,29,3,19,6,26,5,11,9,33,
%U 34,16,63,46,8,4,24,48,32,11,29,26,6,25,17,31,6,46,33,46,17,8,61,12,23,76
%N Smallest k>0 such that (2^k)*A002110(n) - 1 is prime.
%H Pierre CAMI, <a href="/A097099/b097099.txt">Table of n, a(n) for n = 1..1042</a>
%t 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 *)
%t 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 *)
%o (PFGW & SCRIPT)
%o Command pfgw64 -f in.txt
%o in.txt file = SCRIPT file
%o SCRIPT
%o DIM n,0
%o DIM i,0
%o DIM pp
%o DIMS t
%o OPENFILEOUT myf,a(n).txt
%o LABEL loop1
%o SET n,n+1
%o SET i,0
%o LABEL loop2
%o SET i,i+1
%o SETS t,%d,%d,%d\,;n;p(n);i
%o SET pp,(2^i)*p(n)#-1
%o PRP pp,t
%o IF ISPRP THEN GOTO a
%o GOTO loop2
%o LABEL a
%o WRITE myf,t
%o GOTO loop1
%Y Cf. A002110, A098929.
%K nonn
%O 1,5
%A _Pierre CAMI_, Sep 15 2004
%E More terms from _Robert G. Wilson v_, Sep 27 2004