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-6 of 6 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

A069455 Greater of lonely twin primes.

Original entry on oeis.org

31, 43, 61, 73, 229, 241, 271, 283, 313, 349, 463, 523, 571, 601, 619, 643, 661, 859, 883, 1093, 1153, 1231, 1279, 1291, 1303, 1321, 1429, 1453, 1609, 1621, 1669, 1699, 1723, 1789, 1999, 2029, 2143, 2239, 2269, 2311, 2341, 2383
Offset: 1

Views

Author

Neil Fernandez, Mar 22 2002

Keywords

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 greater twins are 31,43,61, so this is how the sequence begins.
		

Crossrefs

A069456 Non-twin primes that are at least doubly lonely.

Original entry on oeis.org

1039, 2099, 4253, 91121, 386401, 626617, 754973, 873553, 908857, 972137, 1619353, 1749067, 1841681, 2007899, 2169007, 2241353, 2420633, 2484931, 2594971, 3075323, 3129601, 3151843, 3837451, 3843247, 3919229, 4038709, 4545683, 5502449, 5530529, 5921869
Offset: 1

Views

Author

Neil Fernandez, Mar 23 2002

Keywords

Examples

			These are non-twin primes sandwiched between at least 2 pairs of twins on each side. The first number in the sequence is 1039 (sandwiched between 1019,1021,1031,1033 and 1049,1051,1061,1063).
		

Crossrefs

Programs

  • Maple
    Primes:= select(isprime,[seq(i,i=3..6*10^6,2)]):
    good:= select(t -> Primes[t-3]-Primes[t-4]=2 and Primes[t-1]-Primes[t-2]=2 and Primes[t+2]-Primes[t+1]=2 and Primes[t+4]-Primes[t+3]=2, [$5..nops(Primes)-4]):
    Primes[good]; # Robert Israel, May 13 2016
  • Mathematica
    dltpQ[{a_,b_,c_,d_,e_,f_,g_,h_,i_}]:=b-a==d-c==g-f==i-h==2; Transpose[ Select[ Partition[Prime[Range[410000]],9,1],dltpQ]][[5]] (* Harvey P. Dale, May 14 2013 *)

Extensions

More terms from Arkadiusz Wesolowski, May 08 2012

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).

A068016 Lonely non-twin primes: non-twins sandwiched between two pairs of twins.

Original entry on oeis.org

23, 37, 67, 233, 277, 631, 1039, 1283, 1297, 1307, 1613, 1693, 1709, 2099, 2137, 2333, 2719, 2797, 3271, 3533, 3547, 3571, 3923, 4027, 4253, 4523, 4643, 4793, 5483, 5507, 5647, 6563, 7321, 8831, 8849, 9007, 9029, 10061, 10079, 10289, 10513, 12049, 13687
Offset: 1

Views

Author

Neil Fernandez, Mar 22 2002

Keywords

Examples

			37 is in the sequence because it is adjacent to two pairs of twins (29,31 and 41,43). 47 is not because the primes adjacent to it are 43 and 53 and although 43 is a twin, 53 is not.
		

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[PrimePrev[p]-2]&&!PrimeQ[p+2]&&PrimeQ[PrimeNext[p]+2],AppendTo[lst,p]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 22 2009 *)
    m = 2000; #[[3]] & /@ Select[Partition[Prime[Range[7, m]], 5, 1], #[[2]] - #[[1]] == #[[5]] - #[[4]] == 2 &] (* Zak Seidov, Nov 25 2012 *)

Extensions

More terms from Vladimir Joseph Stephan Orlovsky, Dec 04 2009

A069479 Smallest n-tuply-lonely non-twin prime.

Original entry on oeis.org

23, 1039, 403026797, 121829611399
Offset: 1

Views

Author

Neil Fernandez, Mar 25 2002

Keywords

Comments

a(3) found by Hans Havermann; a(4) by Phil Carmody.

Examples

			An n-tuply lonely non-twin prime is a non-twin prime that is sandwiched between exactly n pairs of prime twins on both sides. a(2)=1039 because 1039 is the first non-twin to be sandwiched between exactly 2 pairs of twins on each side (1019,1021,1031,1033 and 1049,1051,1061,1063).
		

Crossrefs

Showing 1-6 of 6 results.