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.

A073862 Difference between the largest and the smallest n-digit prime.

Original entry on oeis.org

5, 86, 896, 8964, 89984, 899980, 8999988, 89999970, 899999930, 8999999960, 89999999958, 899999999986, 8999999999932, 89999999999936, 899999999999958, 8999999999999900, 89999999999999936, 899999999999999986, 8999999999999999958, 89999999999999999938
Offset: 1

Views

Author

Amarnath Murthy, Aug 15 2002

Keywords

Examples

			a(3) = 997 - 101 = 896.
a(1) = 5 because 7-2 = 5.
		

Crossrefs

Programs

  • Maple
    seq(prevprime(10^n)-nextprime(10^(n-1)), n=1..21); # Emeric Deutsch, Mar 28 2005
  • Mathematica
    Table[NextPrime[10^(n+1),-1]-NextPrime[10^n],{n,0,18}] (* Harvey P. Dale, May 04 2016 *)

Formula

a(n) = A003618(n) - A003617(n).

Extensions

More terms from Emeric Deutsch, Mar 28 2005