OFFSET
1,3
COMMENTS
Completely multiplicative.
Dirichlet inverse of A097945. - R. J. Mathar, Aug 29 2011
LINKS
Daniel Forgues, Table of n, a(n) for n = 1..100000 (first 1000 terms from T. D. Noe)
Vaclav Kotesovec, Graph - the asymptotic ratio (10^7 terms).
FORMULA
Multiplicative with a(p^e) = (p-1)^e. - David W. Wilson, Aug 01 2001
Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi^4 / (315 * zeta(3)) = 1/(2*A082695) = 0.25725505075419... - Vaclav Kotesovec, Jun 14 2020
Dirichlet g.f.: Product_{p prime} 1 / (1 - p^(1-s) + p^(-s)). - Ilya Gutkovskiy, Feb 27 2022
Dirichlet g.f.: zeta(s-1) * zeta(s) * Product_{primes p} (1 + (p^(1-s) - 2) / (1 - p + p^s)), (with a product that converges for s=2). - Vaclav Kotesovec, Feb 11 2023
MAPLE
a:= n-> mul((i[1]-1)^i[2], i=ifactors(n)[2]):
seq(a(n), n=1..80); # Alois P. Heinz, Sep 13 2017
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]; Table[ DirichletInverse[ muphi][n], {n, 1, 81}] (* Jean-François Alcover, Dec 12 2011, after R. J. Mathar *)
a[1] = 1; a[n_] := (fi = FactorInteger[n]; Times @@ ((fi[[All, 1]] - 1)^fi[[All, 2]])); Table[a[n], {n, 1, 50}] (* G. C. Greubel, Jun 10 2016 *)
PROG
(PARI) a(n)=if(n<1, 0, direuler(p=2, n, 1/(1-p*X+X))[n]) /* Ralf Stephan */
(Haskell)
a003958 1 = 1
a003958 n = product $ map (subtract 1) $ a027746_row n
-- Reinhard Zumkeller, Apr 09 2012, Mar 02 2012
(Python)
from math import prod
from sympy import factorint
def a(n): return prod((p-1)**e for p, e in factorint(n).items())
print([a(n) for n in range(1, 82)]) # Michael S. Branicky, Feb 27 2022
CROSSREFS
KEYWORD
nonn,mult,nice
AUTHOR
EXTENSIONS
Definition reedited (from formula) by Daniel Forgues, Nov 17 2009
STATUS
approved