This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A166640 #17 Feb 05 2025 07:50:34 %S A166640 1,9,18,81,36,162,54,729,324,324,90,1458,108,486,648,6561,144,2916, %T A166640 162,2916,972,810,198,13122,1296,972,5832,4374,252,5832,270,59049, %U A166640 1620,1296,1944,26244,324,1458,1944,26244,360,8748,378,7290,11664,1782,414,118098 %N A166640 Totally multiplicative sequence with a(p) = 9*(p-1) for prime p. %H A166640 G. C. Greubel, <a href="/A166640/b166640.txt">Table of n, a(n) for n = 1..10000</a> %F A166640 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 A166640 a(n) = A165830(n) * A003958(n) = 9^bigomega(n) * A003958(n) = 9^A001222(n) * A003958(n). %t A166640 DirichletInverse[f_][1] = 1/f[1]; DirichletInverse[f_][n_] := %t A166640 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 A166640 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 A166640 (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 A166640 Cf. A001222, A003958, A165830. %K A166640 nonn,easy,mult %O A166640 1,2 %A A166640 _Jaroslav Krizek_, Oct 18 2009