A166633 Totally multiplicative sequence with a(p) = 3*(p-1) for prime p.
1, 3, 6, 9, 12, 18, 18, 27, 36, 36, 30, 54, 36, 54, 72, 81, 48, 108, 54, 108, 108, 90, 66, 162, 144, 108, 216, 162, 84, 216, 90, 243, 180, 144, 216, 324, 108, 162, 216, 324, 120, 324, 126, 270, 432, 198, 138, 486, 324, 432
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]*3^(PrimeOmega[m]), {m, 1, 100}] (* G. C. Greubel, May 20 2016 *) f[p_, e_] := (3*(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] = 3*(f[k,1]-1)); factorback(f);} \\ Michel Marcus, May 20 2016