Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #14 Oct 17 2023 05:42:47
%S 1,9,18,81,36,162,54,729,324,324,90,1458,108,486,648,6561,144,2916,
%T 162,2916,972,810,198,13122,1296,972,5832,4374,252,5832,270,59049,
%U 1620,1296,1944,26244,324,1458,1944,26244,360,8748,378,7290,11664,1782,414,118098
%N Totally multiplicative sequence with a(p) = 9*(p-1) for prime p.
%H G. C. Greubel, <a href="/A166640/b166640.txt">Table of n, a(n) for n = 1..10000</a>
%F Multiplicative with a(p^e) = (9*(p-1))^e. If n = Product p(k)^e(k) then a(n) = Product (9*(p(k)-1)^e(k).
%F a(n) = A165830(n) * A003958(n) = 9^bigomega(n) * A003958(n) = 9^A001222(n) * A003958(n).
%t DirichletInverse[f_][1] = 1/f[1]; DirichletInverse[f_][n_] :=
%t DirichletInverse[f][n] = -1/f[1]*Sum[f[n/d]*DirichletInverse[f][d], {d, Most[Divisors[n]]}]; muphi[n_] := MoebiusMu[n]*EulerPhi[n]; a[m_] := DirichletInverse[muphi][m]; Table[a[m]*9^(PrimeOmega[m]), {m, 1, 100}] (* _G. C. Greubel_, May 20 2016 *)
%t f[p_, e_] := (9*(p-1))^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Oct 17 2023 *)
%o (PARI) a(n) = {my(f = factor(n)); for (k=1, #f~, f[k,1] = 9*(f[k,1]-1)); factorback(f);} \\ _Michel Marcus_, May 21 2016
%Y Cf. A001222, A003958, A165830.
%K nonn,easy,mult
%O 1,2
%A _Jaroslav Krizek_, Oct 18 2009