The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A084740 Least k such that (n^k-1)/(n-1) is prime, or 0 if no such prime exists. 16
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
When (n^k-1)/(n-1) is prime, k must be prime. As mentioned by Dubner, when n is a perfect power, then (n^k-1)/(n-1) will usually be composite for all k, which is the case for n = 9, 25, 32, 49, 64, 81, 121, 125, 144, 169, 216, 225, 243, 289, 324, 343, ... - T. D. Noe, Jan 30 2004
a(152) > prime(1100) or 0. - Derek Orr, Nov 29 2014
a(n)=2 if and only if n=p-1, where p is an odd prime; that is, n belongs to A006093, except 2. - Thomas Ordowski, Sep 19 2015
Probably a(152) = 270217 since (152^270217-1)/(152-1) has been shown to be probably prime. - Michael Stocker, Jan 24 2019
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.
Eric Weisstein's World of Mathematics, Repunit
EXAMPLE
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.
PROG
(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
CROSSREFS
Sequence in context: A256113 A256368 A057019 * A229708 A204895 A064652
KEYWORD
nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 15 2003
EXTENSIONS
More terms from T. D. Noe, Jan 23 2004
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 18 07:11 EDT 2024. Contains 373469 sequences. (Running on oeis4.)