A084740 Least k such that (n^k-1)/(n-1) is prime, or 0 if no such prime exists.
2, 3, 2, 3, 2, 5, 3, 0, 2, 17, 2, 5, 3, 3, 2, 3, 2, 19, 3, 3, 2, 5, 3, 0, 7, 3, 2, 5, 2, 7, 0, 3, 13, 313, 2, 13, 3, 349, 2, 3, 2, 5, 5, 19, 2, 127, 19, 0, 3, 4229, 2, 11, 3, 17, 7, 3, 2, 3, 2, 7, 3, 5, 0, 19, 2, 19, 5, 3, 2, 3, 2, 5, 5, 3, 41, 3, 2, 5, 3, 0, 2, 5, 17, 5, 11, 7, 2, 3, 3, 4421, 439, 7, 5, 7, 2, 17, 13, 3, 2, 3, 2, 19, 97, 3, 2, 17, 2, 17, 3, 3, 2, 23, 29, 7, 59
Offset: 2
Keywords
Examples
a(7) = 5 as (7^5 - 1 )/(7 - 1) = 2801 = 1 + 7 + 7^2 + 7^3 + 7^4 is a prime but no smaller partial sum yields a prime.
Links
- Eric Chen, Table of known a(n) up to a(360) [with a(316) corrected by Jon E. Schoenfield]
- H. Dubner, Generalized repunit primes, Math. Comp., 61 (1993), 927-930.
- Andy Steward, Titanic Prime Generalized Repunits
- Eric Weisstein's World of Mathematics, Repunit
- Robert G. Wilson v, Letter to N. J. A. Sloane, circa 1991.
- Robert G. Wilson v, Table of known a(n) from n = 2 to 1000.
Crossrefs
Programs
-
PARI
a(n) = {l=List([9, 25, 32, 49, 64, 81, 121, 125, 144, 169, 216, 225, 243, 289, 324, 343]); for(q=1, #l, if(n==l[q], return(0))); k=1; while(k, s=(n^prime(k)-1)/(n-1); if(ispseudoprime(s), return(prime(k))); k++)} n=2; while(n<361, print1(a(n), ", "); n++) \\ Derek Orr, Jul 13 2014
Extensions
More terms from T. D. Noe, Jan 23 2004
Comments