%I #14 Mar 31 2012 13:22:09
%S 3,3,7,3,37,43,163,1171,607,223,1987,3541,23917,43627,8887,108517,
%T 1063,378667
%N Least odd prime p such that p*2^(2^n)+1 is prime.
%o PFGW SCRIPTIFY
%o SCRIPT
%o DIM nn,-1
%o DIM kk
%o DIMS tt
%o LABEL loopn
%o SET nn,nn+1
%o SET kk,1
%o LABEL loopk
%o SET kk,kk+1
%o SETS tt,%d,%d,%d\,;nn;kk;p(kk)
%o PRP p(kk)*2^(2^nn)+1,tt
%o IF ISPRIME THEN GOTO loopn
%o IF ISPRP THEN GOTO loopn
%o GOTO loopk
%o (PARI) A187419(n)={
%o local(f =2^(2^n),p=3);
%o while(1,
%o if(isprime(f*p+1),
%o return(p)
%o );
%o p=nextprime(p+1);
%o ) ;
%o } /* R. J. Mathar, Mar 11 2011 */
%Y Cf. A187088.
%K nonn,hard
%O 0,1
%A _Pierre CAMI_, Mar 09 2011
|