A084742 Least k such that (n^k+1)/(n+1) is prime, or 0 if no such prime exists.
3, 3, 3, 5, 3, 3, 0, 3, 5, 5, 5, 3, 7, 3, 3, 7, 3, 17, 5, 3, 3, 11, 7, 3, 11, 0, 3, 7, 139, 109, 0, 5, 3, 11, 31, 5, 5, 3, 53, 17, 3, 5, 7, 103, 7, 5, 5, 7, 1153, 3, 7, 21943, 7, 3, 37, 53, 3, 17, 3, 7, 11, 3, 0, 19, 7, 3, 757, 11, 3, 5, 3, 7, 13, 5, 3, 37, 3, 3, 5, 3, 293, 19, 7, 167, 7, 7, 709, 13, 3, 3, 37, 89, 71, 43, 37
Offset: 2
Keywords
Examples
a(5) = 5 as (5^5 + 1)/(5 + 1) = 1 - 5 + 5^2 - 5^3 + 5^4 = 521 is a prime. a(7) = 3 as (7^3 + 1)/(7 + 1) = 1 - 7 + 7^2 = 43 is a prime.
Links
- Eric Chen, Table of known a(n) up to a(300)
- H. Dubner and T. Granlund, Primes of the Form (b^n+1)/(b+1), J. Integer Sequences, 3 (2000), #P00.2.7.
- Eric Weisstein's World of Mathematics, Repunit
- Robert G. Wilson v, Letter to N. J. A. Sloane, circa 1991.
Programs
-
PARI
a(n) = {l=List([8, 27, 32, 64, 125, 243, 324, 343]); for(q=1, #l, if(n==l[q], return(0))); k=2; 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++) \\ Eric Chen, Nov 25 2014
Extensions
More terms from T. D. Noe, Jan 22 2004
Comments