OFFSET
2,4
LINKS
S. Mustonen, On prime factors of numbers m^n+-1
Seppo Mustonen, On prime factors of numbers m^n+-1 [Local copy]
EXAMPLE
For n=10, 5^n-1=9765624=2^3*3*11*71*521 has three prime factors of the form cn+1, namely 11=n+1, 71=7n+1, 521=52n+1. Thus a(10)=3.
MATHEMATICA
m = 5; n = 2; nmax = 120;
While[n <= nmax, {l = FactorInteger[m^n - 1]; s = 0;
For[i = 1, i <= Length[l],
i++, {p = l[[i, 1]];
If[IntegerQ[(p - 1)/n] == True, s = s + l[[i, 2]]]; }];
a[n] = s; } n++; ];
Table[a[n], {n, 2, nmax}]
Table[Count[FactorInteger[5^n-1][[All, 1]], _?(Mod[#, n]==1&)], {n, 2, 130}] (* Harvey P. Dale, Dec 11 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Seppo Mustonen, Nov 22 2010
STATUS
approved