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.

A035790 Start of a string of exactly 2 consecutive (but disjoint) pairs of twin primes.

Original entry on oeis.org

101, 137, 419, 1019, 1049, 1481, 1871, 1931, 2081, 2111, 2969, 3251, 3461, 4259, 5009, 5651, 5867, 6689, 6947, 7331, 7547, 8219, 8969, 10007, 11057, 11159, 11699, 12239, 13001, 13709, 13997, 14561, 15641, 15731, 16061, 16631, 17579, 17909
Offset: 1

Views

Author

Randall L Rathbun, Nov 30 1998

Keywords

Comments

Let P1,P2,..,P8 be any 8 consecutive primes. The sequence consists of those values of P3 for which P2-P1 > 2, P4-P3 = 2, P6-P5= 2 and P8-P7 > 2.

Examples

			89, 97, 101, 103, 107, 109, 113, 127: 97-89 > 2, 103-101 = 2, 109-107 = 2, 127-113 > 2.
		

References

  • Posting to Number Theory List (NMBRTHRY(AT)LISTSERV.NODAK.EDU), Nov. 19 1998.

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range@ 2100, And[NextPrime[#, -1] - NextPrime[#, -2] > 2, NextPrime@ # - # == 2, NextPrime[#, 3] - NextPrime[#, 2] == 2, NextPrime[#, 5] - NextPrime[#, 4] > 2] &] (* Michael De Vlieger, Apr 25 2015 *)
  • PARI
    a(n)={L=vector(7);forprime(p=o=1,,L=concat(L[2..7],-o+o=p); L[3]==2&&L[5]==2&&L[1]>2&&L[2]>2&&L[4]>2&&L[6]>2&&L[7]>2&&!n--&&return(p-sum(i=3,7,L[i])))} \\ M. F. Hasler, May 04 2015

Formula

a(10)=2111, a(10^2)=77261, a(10^3)=1603697, a(10^4)=27397631, a(10^5)=435140477, a(10^6)=6391490657. - M. F. Hasler, May 04 2015

Extensions

Edited by Hugo Pfoertner, Oct 15 2003
Offset corrected by Arkadiusz Wesolowski, May 06 2012
Double-checked up to a(10^4)=27397631 by M. F. Hasler, May 04 2015