OFFSET
2,1
COMMENTS
Also the smallest prime of the form (n^k - 1)/(n - 1) with k > 2. The corresponding values of k are in A128164.
For n = 18, a(n) = (18^25667 - 1)/17 as explained in the extension of A128164, but it is too large to write in the Data field.
Differs from A084738: in A084738, the primes of the form (n^2 - 1)/(n - 1) = n + 1 are included, for instance 7 = 6 + 1 = 11_6 but not included here, so a(6) = 43 = 111_6.
As mentioned by Dubner, see link, when n is a power of a prime ( >= 2 ), the number (n^k - 1)/(n - 1) with k > 2 is usually composite, so a(4) = a(9) = a(16) = a(25) = 0 for instance, exception a(8) = 73.
Values of a(19)-a(31): {109912203092239643840221, 421, 463, 245411, 292561, 601, 0, 321272407, 757, 637421, 732541, 837931, 917087137}. - Michael De Vlieger, Apr 24 2017
LINKS
H. Dubner, Generalized repunit primes, Math. Comp., 61 (1993), 927-930.
EXAMPLE
a(7) = (7^5 - 1)/6 = 11111_7 = 1 + 7 + 7^2 + 7^3 + 7^4 = 2801.
a(10) is the repunit R_19 which is a string of nineteen 1's.
MATHEMATICA
Table[Function[m, If[m > 0, k = 3; While[! PrimeQ[Set[x, (m^k - 1)/(m - 1)]], k++]; x, 0]]@ If[Set[e, GCD @@ #[[All, -1]]] > 1, {#, IntegerExponent[n, #]} &@ Power[n, 1/e] /. {{k_, m_} /; Or[Not[PrimePowerQ@ m], Prime@ m, FactorInteger[m][[1, 1]] == 2] :> 0, {k_, m_} /; m > 1 :> n}, n] &@ FactorInteger@ n, {n, 2, 17}] (* Michael De Vlieger, Apr 24 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernard Schott, Apr 23 2017
STATUS
approved