OFFSET
0,2
LINKS
Danny Rorabaugh, Table of n, a(n) for n = 0..10000
FORMULA
a(n-2) = Sum_{d|n, d<n} d^2*phi(n/d). - Vladeta Jovovic, Aug 27 200
From Amiram Eldar, Dec 06 2024: (Start)
a(n) = A069097(n+2) - (n+2)^2.
Sum_{k=1..n} a(k) ~ c * n^3, where c = (zeta(2)/zeta(3) - 1)/3 = (A306633 - 1)/3 = 0.122810925... . (End)
MATHEMATICA
Table[Sum[d^2*EulerPhi[(n + 2)/d], {d, Most@ Divisors[n + 2]}], {n, 0, 47}] (* Michael De Vlieger, Mar 20 2015 *)
f[p_, e_] := p^(e - 1)*(p^e*(p + 1) - 1); a[n_] := Times @@ f @@@ FactorInteger[n + 2] - (n + 2)^2; Array[a, 100, 0] (* Amiram Eldar, Dec 06 2024 *)
PROG
(Sage) sum([d^2*euler_phi(int((n+2)/d)) for d in range(1, n+2) if (n+2)%d==0]) # Danny Rorabaugh, Mar 20 2015
(PARI) a(n) = {my(f = factor(n+2)); prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; p^(e-1)*(p^e*(p+1) - 1)) - (n+2)^2; } \\ Amiram Eldar, Dec 06 2024
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
STATUS
approved