The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A205323 Least prime p>3 such that 2^n + p*2^k - 1 and 2^n + p*2^k + 1 are twin primes for some k with n/3 < k < n+1. 2

%I #11 Mar 07 2013 06:29:10

%S 5,7,13,7,5,11,7,7,5,13,5,11,7,13,13,11,5,11,13,7,23,41,19,11,5,17,17,

%T 79,13,43,7,19,13,13,13,43,67,7,13,43,31,11,113,7,5,13,59,11,5,83,19,

%U 37,7,113,29,19,23,41,97,53,79,13,29,7,5,41,19,13,11

%N Least prime p>3 such that 2^n + p*2^k - 1 and 2^n + p*2^k + 1 are twin primes for some k with n/3 < k < n+1.

%H Pierre CAMI, <a href="/A205323/b205323.txt">Table of n, a(n) for n = 1..2000</a>

%e 2^1+5*2^1-1=11 11 and 13 twin primes so a(1)=5.

%e 2^2+7*2^1-1=17 17 and 19 twin primes so a(2)=7.

%e 2^3+13*2^2-1=59 59 and 61 twin primes so a(3)=13.

%o PFGW64 from Primeform group and SCRIPTIFY

%o SCRIPT

%o DIM nn,0

%o DIM mm

%o DIM kk

%o DIMS tt

%o OPENFILEOUT myfile,twins.txt

%o LABEL loopn

%o SET nn,nn+1

%o IF nn>2000 THEN END

%o SET kk,2

%o LABEL loopk

%o SET kk,kk+1

%o SET mm,nn/3

%o LABEL loopm

%o SET mm,mm+1

%o IF mm>nn THEN GOTO loopk

%o SETS tt,%d,%d,%d,%d\ ;nn;kk;p(kk);mm

%o PRP 2^nn+p(kk)*2^mm-1,tt

%o IF ISPRIME THEN GOTO a

%o IF ISPRP THEN GOTO a

%o GOTO loopm

%o LABEL a

%o PRP 2^nn+p(kk)*2^mm+1,tt

%o IF ISPRIME THEN GOTO b

%o IF ISPRP THEN GOTO b

%o GOTO loopm

%o LABEL b

%o WRITE myfile,tt

%o GOTO loopn

%Y Cf. A205236, A205237, A205324.

%K nonn

%O 1,1

%A _Pierre CAMI_, Jan 26 2012

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 May 13 19:55 EDT 2024. Contains 372522 sequences. (Running on oeis4.)