cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A035789 Start of a string of exactly 1 consecutive (but disjoint) pair of twin primes.

Original entry on oeis.org

29, 41, 59, 71, 227, 239, 269, 281, 311, 347, 461, 521, 569, 599, 617, 641, 659, 857, 881, 1091, 1151, 1229, 1277, 1289, 1301, 1319, 1427, 1451, 1607, 1619, 1667, 1697, 1721, 1787, 1997, 2027, 2141, 2237, 2267, 2309, 2339, 2381, 2549, 2591, 2657, 2687
Offset: 1

Views

Author

Randall L Rathbun, Nov 30 1998

Keywords

Comments

Lesser of lonely twin primes.
Old Name was: Let P1,P2,..,P6 be any 6 consecutive primes. The sequence consists of those values of P3 for which P2-P1>2, P4-P3=2 and P6-P5>2.

Examples

			The first lonely twin primes (A069453) are 29,31 (23 and 37 are non-twin), 41,43 (37 and 47 are non-twin), 59,61 (53 and 67 are non-twin). Of these, the lesser twins are 29,41,59, so this is how the sequence begins.
23, 27, 29, 31, 37, 41: 27-23>2, 31-29=2, 41-37>2; so 29 is in the sequence.
From _Hartmut F. W. Hoft_, Apr 05 2016: (Start)
The example should read: 19, 23, 29, 31, 37, 41: 23-19>2, 31-29=2, 41-37>2; so 29 is in the sequence.
a(n)=A069453(2n-1), n>=1.
(End)
		

Crossrefs

Programs

  • Mathematica
    PrimeNext[n_]:=Module[{k},k=n+1;While[ !PrimeQ[k],k++ ];k]; PrimePrev[n_]:=Module[{k},k=n-1;While[ !PrimeQ[k],k-- ];k]; lst={};Do[p=Prime[n];If[ !PrimeQ[p-2]&&!PrimeQ[p+4]&&PrimeQ[p+2]&&!PrimeQ[PrimePrev[p]-2]&&!PrimeQ[PrimeNext[p+2]+2],AppendTo[lst,p]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 22 2009 *)
    (* starting at n=3 would eliminate the first two primality tests, Hartmut F. W. Hoft, Apr 09 2016 *)

Extensions

Edited by Hugo Pfoertner, Oct 15 2003

A069453 Lonely twin primes.

Original entry on oeis.org

29, 31, 41, 43, 59, 61, 71, 73, 227, 229, 239, 241, 269, 271, 281, 283, 311, 313, 347, 349, 461, 463, 521, 523, 569, 571, 599, 601, 617, 619, 641, 643, 659, 661, 857, 859, 881, 883, 1091, 1093, 1151, 1153, 1229, 1231, 1277, 1279, 1289
Offset: 1

Views

Author

Neil Fernandez, Mar 22 2002

Keywords

Examples

			The first twin primes that are not adjacent to twin primes other than their own twins are 29,31 (23 and 37 are non-twin) and 41,43 (37 and 47 are non-twin). So the sequence begins 29,31,41,43.
		

Crossrefs

Programs

  • Mathematica
    a069453[n_] := Module[{c6p={3, 5, 7, 11, 13, 17}, seq={}, i=6, last=17}, While[i<=n, If[c6p[[4]]-c6p[[3]]==2 && c6p[[2]]-c6p[[1]]>2 && c6p[[6]]-c6p[[5]]>2, AppendTo[seq, {c6p[[3]], c6p[[4]]}]]; last=NextPrime[last]; c6p=Append[Drop[c6p, 1], last]; i++]; seq]
    Flatten[a069453[1000]] (* isolated prime pairs less than 1000 *)
    (* Hartmut F. W. Hoft, Apr 09 2016 *)

Formula

a(2n-1) = A035789(n) and a(2n) = A069455(n), for n>=1. - Hartmut F. W. Hoft, Apr 09 2016

A262935 Increasing distances of lonely twin primes pairs to nearest prime.

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 16, 18, 28, 30, 34, 42, 46, 48, 58, 88, 90, 94, 124, 130, 136, 154, 162, 168, 172, 178, 202, 216, 258, 264, 294, 342, 352, 354, 364, 366, 370, 378, 396, 408
Offset: 1

Views

Author

Dmitry Petukhov, Oct 04 2015

Keywords

Examples

			(3,5) is a twin primes pair, min(7-5, 3-2)=1, therefore a(1)=1.
(5,7) is a twin primes pair, min(11-7, 5-3)=2>1, therefore a(2)=2.
(11,13) is a twin primes pair, min(17-13, 11-7)=4>2, therefore a(3)=4.
		

Crossrefs

Programs

  • PARI
    {m=0; q=5; s=3; t=2; forprime(p=6, 10^9, if((q-s==2) && (min(p-q, s-t)>m), m=min(p-q, s-t); print1(m, ", ") ); t=s; s=q; q=p;)}

Formula

a(n) = d if ( (p(i+1) = p(i)+2) AND (d = min(p(i+2)-p(i+1), p(i)-p(i-1)) > a(n-1)) ), where a(0) = 0, p(k) = prime(k) = A000040(k).
Showing 1-3 of 3 results.