login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A187419 Least odd prime p such that p*2^(2^n)+1 is prime. 1

%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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 9 01:17 EDT 2024. Contains 375759 sequences. (Running on oeis4.)