A097683 Numbers k such that R_k + 2 is prime, where R_k = 11...1 is the repunit (A002275) of length k.
0, 1, 2, 3, 5, 9, 11, 24, 84, 221, 1314, 2952, 20016, 51054
Offset: 1
Examples
11113 = ((10^5)+17)/9 and 11113 is prime.
Links
- Makoto Kamada, Prime numbers of the form 11...113.
- Henri Lifchitz and Renaud Lifchitz, PRP Top, Search output for (10^k+17)/9
- Index entries for primes involving repunits
Programs
-
Maple
A097683:=n->`if`((10^n+17 mod 9) = 0 and isprime(floor((10^n+17)/9)),n,NULL): seq(A097683(n), n=0..10^3); # Wesley Ivan Hurt, Oct 12 2014
-
Mathematica
Do[ If[ PrimeQ[(10^n - 1)/9 + 2], Print[n]], {n, 0, 5951}] (* Robert G. Wilson v, Oct 15 2004 *)
Formula
a(n) = A056654(n-1) + 1.
Extensions
a(11)-a(12) from Robert G. Wilson v, Oct 15 2004
Edited by N. J. A. Sloane, Apr 02 2009, at the suggestion of Farideh Firoozbakht
a(13) from Kamada link by Ray Chandler, Dec 23 2010
a(14) from Robert Price, Oct 12 2014
Comments