%I #13 Sep 08 2020 05:50:02
%S 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,
%T 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,
%U 8,24,33,8,8,4,6,4,16,2,30,4,8,12,12,8,16,4
%N Number of solutions to x^(k+3)=x^k mod n for some k>=1.
%H Amiram Eldar, <a href="/A117660/b117660.txt">Table of n, a(n) for n = 1..10000</a>
%H Steven R. Finch, <a href="http://arxiv.org/abs/math.NT/0605019">Idempotents and Nilpotents Modulo n</a>, arXiv:math/0605019 [math.NT], 2006-2017.
%F 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
%t 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 *)
%Y Cf. A117657.
%K mult,nonn
%O 1,2
%A _Steven Finch_, Apr 11 2006
|