OFFSET
2,7
COMMENTS
Repeated prime factors are counted.
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=8, 3^n+1=6562=2*17*193 has two prime factors of form, namely 17=2n+1, 193=24n+1. Thus a(8)=2.
MATHEMATICA
m = 3; n = 2; nmax = 130;
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[{p, e}=Transpose[FactorInteger[3^n+1]]; Sum[If[Mod[p[[i]], n] == 1, e[[i]], 0], {i, Length[p]}], {n, 2, 50}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Seppo Mustonen, Nov 24 2010
STATUS
approved