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.

A124001 Difference between first twin prime > 10^n and 10^n.

Original entry on oeis.org

2, 1, 1, 19, 7, 151, 37, 139, 37, 7, 277, 817, 61, 1267, 97, 2371, 1549, 19, 619, 97, 391, 409, 649, 5527, 2731, 559, 949, 427, 601, 2797, 1681, 7189, 2449, 6751, 7597, 8419, 16879, 871, 5569, 10327, 16111, 2131, 6121, 23329, 5179, 4249, 2641, 2257, 3997
Offset: 0

Views

Author

Zak Seidov, Nov 01 2006

Keywords

Comments

a(n) >= A033873(n) and a(n) = A033873(n) for n = 1, 2, 4, 9.
As N increases, the ratio (Sum_{n=1..N} a(n)/n^2)/N tends to 4. - Pierre CAMI, Jul 12 2013

Examples

			a(0) = 2 because 3 and 5 are twin primes and 3 - 10^0 = 2,
a(1) = 1 because 11 and 13 are twin primes and 11 - 10^1 = 1,
a(2) = 1 because 101 and 103 are twin primes and 101 - 10^2 = 1,
a(3) = 19 because 1019 and 1021 are twin primes and 1019 - 10^3 = 19, etc.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = q = NextPrime[10^n]}, While[p + 2 != q, p = q; q = NextPrime@ q]; p - 10^n]; Array[f, 49, 0] (* Robert G. Wilson v, Nov 28 2015 *)
    ftp[n_]:=Module[{p=NextPrime[n]},While[CompositeQ[p+2],p=NextPrime[p]];p-n]; Table[ftp[10^n],{n,0,50}] (* Harvey P. Dale, Oct 15 2019 *)

Formula

a(n) = A092245(n+1) - 10^n. - Robert G. Wilson v, Nov 28 2015