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!)
A205322 Smallest k>=0 such that (2^n-k)*2^n-1 and (2^n-k)*2^n+1 are a twin prime pair; or -1 if no such k exists. 4
0, 1, -1, 1, 26, 22, 8, 28, 47, 16, 14, 19, 17, 316, 8, 133, 116, 166, 77, 364, 197, 49, 647, 1594, 848, 109, 869, 169, 773, 166, 1274, 466, 512, 694, 644, 733, 401, 1636, 662, 184, 71, 3106, 1157, 346, 332, 2194, 6179, 7999, 6023, 6784, 5612, 1108, 1001, 649, 197 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
Conjecture: there is always at least one k>=0 unless n=3.
LINKS
MAPLE
A205322 := proc(n)
local a, p ;
for a from 0 to 2^n do
p := (2^n-a)*2^n-1 ;
if isprime(p) and isprime(p+2) then
return a;
end if;
end do:
return -1 ;
end proc: # R. J. Mathar, Jul 18 2012
MATHEMATICA
Table[k = -1; While[k++; p = 4^n - k*2^n - 1; p > 0 && ! (PrimeQ[p] && PrimeQ[p + 2])]; If[p <= 0, -1, k], {n, 50}] (* T. D. Noe, Mar 15 2013 *)
PROG
(PFGW64 and SCRIPTIFY)
SCRIPT
DIM nn, 0
DIM kk
DIMS tt
OPENFILEOUT myfile, a(n).txt
LABEL loopn
SET nn, nn+1
IF nn==3 THEN SET nn, 4
IF nn>826 THEN END
SET kk, -1
LABEL loopk
SET kk, kk+1
SETS tt, %d, %d\,; nn; kk
PRP (2^nn-kk)*2^nn-1, tt
IF ISPRP THEN GOTO a
IF ISPRIME THEN GOTO a
GOTO loopk
LABEL a
PRP (2^nn-kk)*2^nn+1, tt
IF ISPRP THEN GOTO d
IF ISPRIME THEN GOTO d
GOTO loopk
LABEL d
WRITE myfile, tt
GOTO loopn
CROSSREFS
Sequence in context: A331498 A277685 A072360 * A291470 A093538 A220087
KEYWORD
sign
AUTHOR
Pierre CAMI, Jul 14 2012
STATUS
approved

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 April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)