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.

A074953 Numbers equidistant from consecutive twin prime pairs.

Original entry on oeis.org

5, 9, 15, 24, 36, 51, 66, 87, 105, 123, 144, 165, 186, 195, 213, 234, 255, 276, 297, 330, 384, 426, 447, 492, 546, 585, 609, 630, 651, 735, 816, 825, 843, 870, 951, 1026, 1041, 1056, 1077, 1122, 1191, 1254, 1284, 1296, 1311, 1374, 1440
Offset: 1

Views

Author

Neil Fernandez, Oct 05 2002

Keywords

Examples

			The twin prime pairs are (3,5), (5,7), (11,13), (17,19), etc. a(n) is equidistant from the higher prime in the n-th pair and the lower prime in the (n+1)th pair. E.g., a(2) is the mean of 7 and 11, which is 9.
		

Crossrefs

Programs

  • Mathematica
    t = Select[ Prime@ Range@ 250, PrimeQ[# + 2] &]; Most@ t + Differences[t]/2 + 1 (* Robert G. Wilson v, Jul 26 2015 *)
    Mean/@Partition[Rest[Flatten[Select[Partition[Prime[Range[250]],2,1],#[[2]]-#[[1]]==2&]]],2] (* Harvey P. Dale, Mar 01 2025 *)
  • PARI
    lista(nn) = {forprime (p=2, nn, q = nextprime(p+1); if (q==p+2, forprime (pp=q, nn, if (nextprime(pp+1) == pp+2, print1((q+pp)/2, ", "); break;););););} \\ Michel Marcus, Jul 26 2015

Formula

a(n) = (A006512(n+1) + A001359(n))/2. - Michel Marcus, Jul 26 2015