OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{1 <= i, j, k <= n} gcd(i, j, k, n)^2.
a(n) = Sum_{d divides n} d^3 * J_2(n/d) = Sum_{d divides n} d^2 * J_3(n/d), where the Jordan totient functions J_2(n) = A007434(n) and J_3(n) = A059376(n).
Dirichlet g.f.: zeta(s-2) * zeta(s-3)/zeta(s).
a(n) is a multiplicative function: for prime p, a(p^k) = p^(3*k-2)*(p^2 + p + 1) - p^(2*k-2)*(p + 1).
Sum_{k=1..n} a(k) ~ c * n^4, where c = 15/(4*Pi^2) = 0.379954... . - Amiram Eldar, Jan 29 2024
a(n) = Sum_{d divides n} mobius(n/d) * d^2 * sigma(d). - Peter Bala, Jan 29 2024
MAPLE
MATHEMATICA
f[p_, e_] := p^(3*e - 2)*(p^2 + p + 1) - p^(2*e - 2)*(p + 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 29 2024 *)
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; p^(3*e - 2)*(p^2 + p + 1) - p^(2*e - 2)*(p + 1)); } \\ Amiram Eldar, Jan 29 2024
(Python)
from math import prod
from sympy import factorint
def A368743(n): return prod(p**(e-1<<1)*(p**e*(p*(q:=p+1)+1)-q) for p, e in factorint(n).items()) # Chai Wah Wu, Jan 29 2024
CROSSREFS
KEYWORD
nonn,mult,easy
AUTHOR
Peter Bala, Jan 20 2024
STATUS
approved