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.

A124013 Lesser of pair of most widely separated primes whose sum is 10^n.

Original entry on oeis.org

3, 3, 3, 59, 11, 17, 29, 11, 71, 71, 23, 11, 29, 29, 11, 83, 3, 11, 281, 11, 101, 71, 23, 257, 401, 293, 107, 293, 53, 11, 113, 251, 47, 587, 23, 179, 389, 59, 173, 17, 1427, 83, 431, 53, 563, 593, 41, 47, 239, 383, 431, 1181, 701, 971, 149, 593, 569, 149, 191, 1973
Offset: 1

Views

Author

Zak Seidov, Nov 02 2006

Keywords

Examples

			10^1 = 3 + 7, 10^2 = 3 + 97, 10^3 = 3 + 997, 10^4 = 59 + 9941, 10^5 = 11 + 99989, 10^6 = 17 + 999983, 10^7 = 29 + 9999971, 10^8 = 11 + 99999989, 10^9 = 71 + 999999929, 10^10 = 71 + 9999999929, etc.
		

Crossrefs

Cf. A065577 (Number of Goldbach partitions of 10^n), A124450 (Lesser of pair of closest primes summed to 10^n).

Programs

  • Mathematica
    Table[DeleteCases[Map[{#, 10^n - #} &, Prime@ Range@ PrimePi@ Floor[10^n/2]] /. {, k} /; ! PrimeQ@ k -> 0, 0][[1, 1]], {n, 8}] (* or *)
    Table[First@ SelectFirst[Map[{#, 10^n - #} &, Prime@ Range@ PrimePi@ Floor[10^n/2]], PrimeQ@ Last@ # &], {n, 9}] (* Version 10, Michael De Vlieger, Aug 01 2016 *)
    lp[n_]:=Module[{p=3,x=10^n},While[CompositeQ[x-p],p=NextPrime[p]];p]; Array[lp,60] (* Harvey P. Dale, Jun 11 2022 *)

Formula

10^n - a(n) is prime and 10^n - k is composite for 0 <= k < a(n). - corrected by David A. Corneth, Aug 18 2016

Extensions

a(1) corrected and a(2) inserted by Gionata Neri, Aug 01 2016