Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #8 Jun 06 2012 14:52:03
%S 1,2,2,2,2,3,7,9,2,19,13,21,25,10,22,60,2,5,11,25,9,41,11,14,53,21,
%T 141,54,137,79,30,1,2,51,16,5,8,9,39,5,10,74,11,3,61,25,69,32,104,129,
%U 44,48,151,243,19,165,7,96,20,93,130,136,98,25,102,156,74
%N Least k such that k*30^n+1 is prime
%H Pierre CAMI, <a href="/A213021/b213021.txt">Table of n, a(n) for n = 1..2000</a>
%t Table[k = 1; While[! PrimeQ[k*30^n + 1], k++]; k, {n, 100}] (* _T. D. Noe_, Jun 06 2012 *)
%o PFGW64 and SCRIPTIFY from Primeform Group
%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,a(n).txt
%o LABEL loopn
%o SET nn,nn+1
%o IF nn>2000 THEN END
%o SET kk,0
%o LABEL loopk
%o SET kk,kk+1
%o SETS tt,%d,%d\,;nn;kk
%o PRP kk*30^nn+1,tt
%o IF ISPRP THEN GOTO b
%o IF ISPRIME THEN GOTO b
%o GOTO loopk
%o LABEL b
%o WRITE myfile,tt
%o GOTO loopn
%o (PARI)
%o a(n)=for(k=1,10^10,if(isprime(k*30^n+1),return(k)));
%o vector(66,n,a(n))
%o /* _Joerg Arndt_, Jun 03 2012 */
%K nonn
%O 1,2
%A _Pierre CAMI_, Jun 03 2012