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.

A052165 Primes at which the difference pattern X,2,4,2,Y (X and Y >= 6) occurs in A001223.

Original entry on oeis.org

191, 821, 2081, 3251, 9431, 13001, 15641, 18041, 18911, 25301, 31721, 34841, 51341, 62981, 67211, 69491, 72221, 77261, 81041, 82721, 97841, 99131, 109841, 116531, 119291, 122201, 135461, 157271, 171161, 187631, 194861, 201491, 217361
Offset: 1

Views

Author

Labos Elemer, Jan 26 2000

Keywords

Comments

All terms == 11 (mod 30). - Robert Israel, Nov 30 2015

Examples

			191 is here because 191 + 2 = 193, 191 + 4 + 2 = 197, 191 + 2 + 4 + 2 = 199 are primes; the prime preceding 191 is 181; the prime following 199 is 211; and the corresponding differences are 10 and 12. Thus the d-pattern "around 191" is {10,2,4,2,12}.
		

Crossrefs

Programs

  • Maple
    Primes:= select(isprime,[2,seq(i,i=3..10^6,2)]):
    Gaps:= Primes[2..-1]-Primes[1..-2]:
    Primes[select(t -> Gaps[t] = 2 and Gaps[t+1] = 4 and Gaps[t+2] = 2 and Gaps[t-1] >= 6 and Gaps[t+3]>=6, [$2..nops(Gaps)-3])]; # Robert Israel, Nov 30 2015
  • Mathematica
    With[{x = 6, y = 6, s = Partition[#, 6, 1] &@ Prime@ Range[3*10^4]}, Select[s, And[First@ # >= x, Last@ # >= y, Most@ Rest@ # == {2, 4, 2}] &@ Differences@ # &]][[All, 2]] (* Michael De Vlieger, Oct 26 2017 *)