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.

Showing 1-3 of 3 results.

A096498 Prime before n-th repunit.

Original entry on oeis.org

7, 109, 1109, 11093, 111109, 1111091, 11111101, 111111109, 1111111097, 11111111059, 111111111103, 1111111111093, 11111111111053, 111111111111053, 1111111111111039, 11111111111111107, 111111111111111091, 1111111111111111037, 11111111111111111027, 111111111111111111053, 1111111111111111111097
Offset: 2

Views

Author

Labos Elemer, Jul 09 2004

Keywords

Crossrefs

Programs

  • Maple
    seq(prevprime((10^n-1)/9), n=2..50); # Robert Israel, Nov 13 2017
  • Mathematica
    Table[NextPrime[(10^n - 1)/9, -1], {n, 2, 22}] (* updated by Michael De Vlieger, May 02 2016 *)
  • PARI
    a(n) = precprime((10^n-1)/9 - 1); \\ Michel Marcus, May 02 2016

Formula

a(n) = A002275(n) - A096870(n) = A096497(n) - A096499(n).

A096499 Difference between prime following and prime preceding n-th repunit.

Original entry on oeis.org

6, 4, 8, 20, 10, 60, 16, 4, 24, 54, 46, 46, 70, 176, 84, 12, 40, 134, 104, 104, 92, 24, 84, 270, 300, 130, 414, 90, 88, 240, 148, 198, 12, 64, 12, 300, 66, 70, 80, 102, 420, 142, 630, 140, 600, 88, 176, 312, 80, 96, 460, 132, 420, 284, 144, 408, 312, 180, 44, 300
Offset: 2

Views

Author

Labos Elemer, Jul 09 2004

Keywords

Examples

			n=2: 2nd repunit=11, 13-7=6=a[2].
		

Crossrefs

Programs

  • Mathematica
    <Harvey P. Dale, Sep 06 2015 *)

Formula

a(n) = A096497(n) - A096498(n) = A096869(n) + A096870(n).

A096869 Difference between the n-th repunit and the next prime.

Original entry on oeis.org

1, 2, 2, 6, 2, 8, 40, 6, 2, 10, 2, 38, 28, 12, 118, 12, 8, 20, 60, 20, 46, 78, 6, 2, 102, 272, 80, 246, 6, 80, 102, 36, 116, 10, 36, 10, 238, 32, 20, 6, 78, 412, 88, 426, 118, 172, 48, 58, 112, 8, 56, 430, 90, 136, 240, 30, 140, 232, 162, 40, 226, 48, 116, 60, 690, 146, 210
Offset: 1

Views

Author

Robert G. Wilson v, Jul 12 2004

Keywords

Crossrefs

Cf. A096870.

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Table[ NextPrim[(10^n - 1)/9] - (10^n - 1)/\ 9, {n, 70}]

Formula

a(n) = A096497(n) - A002275(n) = A096499(n) - A096870(n).
Showing 1-3 of 3 results.