OFFSET
1,3
COMMENTS
LINKS
Enrique Pérez Herrero, Table of n, a(n) for n = 1..2000
Steven R. Finch, Primitive Cusp Forms, April 27, 2009. [Cached copy, with permission of the author]
FORMULA
Multiplicative with a(p^e) = p-1 if e=1, a(p^e) = p^2-p-1 if e=2, a(p^e) = p^(e-3)*(p+1)*(p-1)^2. - Enrique Pérez Herrero, Apr 03 2014
Dirichlet g.f.: zeta(s-1) / (zeta(s) * zeta(2s)). - Álvar Ibeas, Mar 07 2015
Sum_{k=1..n} a(k) ~ 270*n^2 / Pi^6. - Vaclav Kotesovec, Jan 11 2019
EXAMPLE
G.f. = x + x^2 + 2*x^3 + x^4 + 4*x^5 + 2*x^6 + 6*x^7 + 3*x^8 + 5*x^9 + ...
MAPLE
with(numtheory): A130107 := proc(n) local dp, mtdp, d, p;
dp := n -> n*mul((1+1/p), p=factorset(n));
mtdp := n -> add(mobius(n/d)*dp(d), d=divisors(n));
add(mobius(n/d)*mtdp(d), d=divisors(n)) end:
seq(A130107(n), n=1..76); # Peter Luschny, Apr 06 2014
MATHEMATICA
JordanTotient[n_, k_:1]:=DivisorSum[n, #^k*MoebiusMu[n/#]&]/; (n>0)&&IntegerQ[n];
DedekindPsi[n_]:=JordanTotient[n, 2]/EulerPhi[n];
A063659[n_]:=DivisorSum[n, MoebiusMu[n/#]*DedekindPsi[#]&];
Table[A130107[n], {n, 1, 30}]
(* Enrique Pérez Herrero, Apr 03 2014 *)
a[ n_] := If[ n < 2, Boole[n == 1], Times @@ (Which[ #2 == 1, # - 1, #2 == 2, #^2 - # - 1, True, #^(#2 - 3) (#^2 - 1) (# - 1)] &) @@@ FactorInteger[n]]; (* Michael Somos, Jun 17 2015 *)
PROG
(PARI) {a(n) = my(A, p, e); if( n<1, 0, A = factor(n); prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if( e==1, p - 1, e==2, p^2 - p - 1, p^(e-3) * (p^2 - 1) * (p-1))))}; /* Michael Somos, Jun 17 2015 */
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Gary W. Adamson, May 07 2007
EXTENSIONS
More terms from Enrique Pérez Herrero, Apr 03 2014
STATUS
approved