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!)
A205321 Smallest k>=0 such that (2^n+k)*2^n-1 and (2^n+k)*2^n+1 are a twin prime pair. 3

%I #10 Jul 20 2012 13:23:25

%S 0,11,1,11,4,11,13,116,34,14,241,44,97,458,337,59,604,206,67,167,424,

%T 179,97,326,259,284,1177,77,328,356,508,74,1798,749,2197,1289,643,839,

%U 1171,1427,814,2564,31,4244,379,5099,3706,4871,2719,3194,7057,122,5329,2636,301,2852,3793

%N Smallest k>=0 such that (2^n+k)*2^n-1 and (2^n+k)*2^n+1 are a twin prime pair.

%C Conjecture : there is at least one k for each n.

%H Pierre CAMI, <a href="/A205321/b205321.txt">Table of n, a(n) for n = 1..825</a>

%F a(n) = A082466(2^n), n>1. - _R. J. Mathar_, Jul 20 2012

%p A205321 := proc(n)

%p local a,p ;

%p for a from 0 do

%p p := (2^n+a)*2^n-1 ;

%p if isprime(p) and isprime(p+2) then

%p return a;

%p end if;

%p end do:

%p end proc: # _R. J. Mathar_, Jul 18 2012

%o (PFGW64 and SCRIPTIFY)

%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>825 THEN END

%o SET kk,-1

%o LABEL loopk

%o SET kk,kk+1

%o SETS tt,%d,%d\,;nn;kk

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

%o IF ISPRP THEN GOTO a

%o IF ISPRIME THEN GOTO a

%o GOTO loopk

%o LABEL a

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

%o IF ISPRP THEN GOTO d

%o IF ISPRIME THEN GOTO d

%o GOTO loopk

%o LABEL d

%o WRITE myfile,tt

%o GOTO loopn

%o Results in a(n).txt file

%o all kk values such that (2^nn+kk)*2^nn-1 is prime in pfgw-primes.log and pfgw.log files

%Y Cf. A191617, A191618, A205322

%K nonn

%O 1,2

%A _Pierre CAMI_, Jul 14 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 June 7 18:53 EDT 2024. Contains 373206 sequences. (Running on oeis4.)