login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A069457 Lowest primes in twin packs. 3

%I

%S 3,101,137,179,419,809,1019,1049,1481,1871,1931,2081,2111,2969,3251,

%T 3359,3461,4217,4259,5009,5651,5867,6689,6761,6947,7331,7547,8219,

%U 8969,9419,10007,11057,11159,11699,12239,13001,13709,13997

%N Lowest primes in twin packs.

%H Robert Israel, <a href="/A069457/b069457.txt">Table of n, a(n) for n = 1..10000</a>

%e A twin pack of primes contains 2 or more pairs of twin primes, between which pairs there are no other primes. 137 is in the sequence because 137,139 are prime and the next primes are 149,151.

%p state:= 0: p:=13: Res:= 3: count:= 1;

%p while count < 100 do

%p q:= nextprime(p);

%p if state = 0 then

%p if q = p+2 then state:= 1; r:= p; p:= nextprime(q);

%p else p:= q

%p fi;

%p elif state = 1 then

%p if q = p+2 then

%p count:= count+1; Res:= Res, r; state:= 2; p:= nextprime(q);

%p else p:= q; state:= 0

%p fi

%p else

%p if q = p+2 then

%p p:= nextprime(q);

%p else p:= q; state:= 0

%p fi

%p fi

%p od:

%p Res; # _Robert Israel_, Jan 13 2020

%Y Cf. A001359, A048614, A053778.

%K nonn

%O 1,1

%A _Neil Fernandez_, Mar 23 2002

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 26 21:07 EST 2021. Contains 349344 sequences. (Running on oeis4.)