A367848 Lengths >= 2 of symmetrical subsequences within the prime gaps sequence.
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
Keywords
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)
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
Comments