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
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, 79, 13, 43, 7, 19, 13, 13, 13, 43, 67, 7, 13, 43, 31, 11, 113, 7, 5, 13, 59, 11, 5, 83, 19, 37, 7, 113, 29, 19, 23, 41, 97, 53, 79, 13, 29, 7, 5, 41, 19, 13, 11 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
2^1+5*2^1-1=11 11 and 13 twin primes so a(1)=5.
2^2+7*2^1-1=17 17 and 19 twin primes so a(2)=7.
2^3+13*2^2-1=59 59 and 61 twin primes so a(3)=13.
PROG
PFGW64 from Primeform group and SCRIPTIFY
SCRIPT
DIM nn, 0
DIM mm
DIM kk
DIMS tt
OPENFILEOUT myfile, twins.txt
LABEL loopn
SET nn, nn+1
IF nn>2000 THEN END
SET kk, 2
LABEL loopk
SET kk, kk+1
SET mm, nn/3
LABEL loopm
SET mm, mm+1
IF mm>nn THEN GOTO loopk
SETS tt, %d, %d, %d, %d\ ; nn; kk; p(kk); mm
PRP 2^nn+p(kk)*2^mm-1, tt
IF ISPRIME THEN GOTO a
IF ISPRP THEN GOTO a
GOTO loopm
LABEL a
PRP 2^nn+p(kk)*2^mm+1, tt
IF ISPRIME THEN GOTO b
IF ISPRP THEN GOTO b
GOTO loopm
LABEL b
WRITE myfile, tt
GOTO loopn
CROSSREFS
Sequence in context: A195557 A063187 A335164 * A105054 A088897 A255233
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jan 26 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 20 00:58 EDT 2024. Contains 371798 sequences. (Running on oeis4.)