login
A117660
Number of solutions to x^(k+3)=x^k mod n for some k>=1.
2
1, 2, 2, 3, 2, 4, 4, 5, 6, 4, 2, 6, 4, 8, 4, 9, 2, 12, 4, 6, 8, 4, 2, 10, 6, 8, 12, 12, 2, 8, 4, 17, 4, 4, 8, 18, 4, 8, 8, 10, 2, 16, 4, 6, 12, 4, 2, 18, 10, 12, 4, 12, 2, 24, 4, 20, 8, 4, 2, 12, 4, 8, 24, 33, 8, 8, 4, 6, 4, 16, 2, 30, 4, 8, 12, 12, 8, 16, 4
OFFSET
1,2
LINKS
Steven R. Finch, Idempotents and Nilpotents Modulo n, arXiv:math/0605019 [math.NT], 2006-2017.
FORMULA
Multiplicative with a(3) = 2, a(3^e) = 3^(e-1) + 3 for e > 1, and for p != 3, if p == 1 (mod 3), a(p^e) = p^(e-1) + 3, and if p == 2 (mod 3), a(p^e) = p^(e-1) + 1. - Amiram Eldar, Sep 08 2020
MATHEMATICA
f[3, e_] := If[e < 2, 2, 3^(e - 1) + 3]; f[p_, e_] := If[Mod[p, 3] == 1, p^(e - 1) + 3, p^(e - 1) + 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 08 2020 *)
CROSSREFS
Cf. A117657.
Sequence in context: A291271 A308318 A165419 * A358015 A184198 A238998
KEYWORD
mult,nonn
AUTHOR
Steven Finch, Apr 11 2006
STATUS
approved