A166640 Totally multiplicative sequence with a(p) = 9*(p-1) for prime p.
1, 9, 18, 81, 36, 162, 54, 729, 324, 324, 90, 1458, 108, 486, 648, 6561, 144, 2916, 162, 2916, 972, 810, 198, 13122, 1296, 972, 5832, 4374, 252, 5832, 270, 59049, 1620, 1296, 1944, 26244, 324, 1458, 1944, 26244, 360, 8748, 378, 7290, 11664, 1782, 414, 118098
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
DirichletInverse[f_][1] = 1/f[1]; DirichletInverse[f_][n_] := 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 *) f[p_, e_] := (9*(p-1))^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 17 2023 *)
-
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