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.

A096497 Prime following n-th repunit.

Original entry on oeis.org

2, 13, 113, 1117, 11113, 111119, 1111151, 11111117, 111111113, 1111111121, 11111111113, 111111111149, 1111111111139, 11111111111123, 111111111111229, 1111111111111123, 11111111111111119, 111111111111111131, 1111111111111111171, 11111111111111111131, 111111111111111111157, 1111111111111111111189
Offset: 1

Views

Author

Labos Elemer, Jul 09 2004

Keywords

Comments

Not equal to A068693: first and 2nd terms differ.

Crossrefs

Programs

  • Mathematica
    Table[NextPrime[(10^n-1)/9], {n, 40}]
    Table[NextPrime[FromDigits[PadRight[{},n,1]]],{n,30}] (* Harvey P. Dale, Aug 11 2023 *)
  • PARI
    a(n) = nextprime((10^n-1)/9 + 1); \\ Michel Marcus, May 02 2016
    
  • Python
    from sympy import nextprime
    def A096497(n):
        return nextprime((10**n-1)//9) # Chai Wah Wu, Nov 04 2019

Formula

a(n) = A002275(n) + A096869(n) = A096498(n) + A096499(n).