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.

A367848 Lengths >= 2 of symmetrical subsequences within the prime gaps sequence.

Original entry on oeis.org

2, 3, 5, 5, 3, 9, 5, 2, 3, 3, 3, 5, 3, 3, 5, 2, 11, 2, 3, 3, 2, 3, 2, 3, 2, 3, 5, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 2, 5, 2, 2, 3, 7, 3, 2, 3, 3, 5, 5, 7, 3, 3, 5, 2, 2, 3, 5, 3, 3, 3, 2, 5, 2, 3, 2, 2, 3, 7, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 5
Offset: 1

Views

Author

Tamas Sandor Nagy, Dec 02 2023

Keywords

Comments

Points in the primes gap sequence (A001223) are taken successively at a term and halfway between terms.
The lengths here are of subsequences made of 2 or more symmetrically placed, consecutive prime gaps around such a point.
Some points only have a subsequence of length 0 or 1 around them and they are ignored.
Will all odd numbers appear in this sequence?
Do the terms have a long-term average?

Examples

			The first lengths are as follows, around midpoints marked with ".",
  Gaps:  1   2   2   4   2   4   2    = A001223
             \_._/                  length 2 = a(1)
                 \___.___/          length 3 = a(2)
                 \_______._______/  length 5 = a(3)
		

Crossrefs

Programs

  • PARI
    diff(v) = vector(#v-1, i, v[i+1]-v[i]);
    issym(v) = if (#v>1, for (j=1, #v\2, if (v[j] != v[#v-j+1], return(0))); return(1));
    lista(nn) = my(v = diff(primes(nn))); for (len=2, #v, for (i=0, len\2, my(w = vector(len-2*i, j, v[i+j])); if (issym(w), print1(#w, ", "); break););); \\ Michel Marcus, Dec 05 2023