login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A096498
Prime before n-th repunit.
18
7, 109, 1109, 11093, 111109, 1111091, 11111101, 111111109, 1111111097, 11111111059, 111111111103, 1111111111093, 11111111111053, 111111111111053, 1111111111111039, 11111111111111107, 111111111111111091, 1111111111111111037, 11111111111111111027, 111111111111111111053, 1111111111111111111097
OFFSET
2,1
LINKS
FORMULA
a(n) = A002275(n) - A096870(n) = A096497(n) - A096499(n).
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 *)
PROG
(PARI) a(n) = precprime((10^n-1)/9 - 1); \\ Michel Marcus, May 02 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 09 2004
STATUS
approved