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.

A387500 Median of twin prime pairs with n decimal digits.

Original entry on oeis.org

5, 36, 420, 4644, 51060, 518238, 5206320, 52565169, 528113445, 5302625562
Offset: 1

Views

Author

Hugo Pfoertner, Sep 02 2025

Keywords

Comments

It is assumed that a pair of twin primes is characterized by its mean. The median of an even number of values is taken as the arithmetic mean of the two central elements in their sorted list.

Examples

			a(1): 2 pairs {3,5}, {5,7}, median = mean of {4,6} = 5;
a(2): 6 pairs {11,13}, {17,19}, {29,31}, {41,43}, {59,61}, {71,73}, median = mean of {30,42} = 36.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{s={},p=NextPrime[10^(n-1)]},While[p<10^n-4,If[PrimeQ[p+2],AppendTo[s,p+1]];p=NextPrime[p]];Median[s]];Array[a,7] (* James C. McMahon, Sep 02 2025 *)