OFFSET
1,3
COMMENTS
Except for a(2) = 1, a(n) is always divisible by n. - Jianing Song, Jul 13 2018
REFERENCES
Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 48, problem 15, the function phi_3(n).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
John D. Baum, A Number-Theoretic Sum, Mathematics Magazine 55.2 (1982): 111-113.
P. G. Brown, Some comments on inverse arithmetic functions, Math. Gaz. 89 (2005) 403-408.
Geoffrey B. Campbell, Dirichlet summations and products over primes, Int. J. Math. Math. Sci. 16 92) (1993) 359. eq. (3.1)
Constantin M. Petridi, The Sums of the k-powers of the Euler set and their connection with Artin's conjecture for primitive roots, arXiv:1612.07632 [math.NT], 2016-2018.
FORMULA
a(n) = eulerphi(n)*(n^3 + (-1)^omega(n)*rad(n)*n)/4. See Petridi link. - Michel Marcus, Jan 29 2017
G.f. A(x) satisfies: A(x) = x*(1 + 4*x + x^2)/(1 - x)^5 - Sum_{k>=2} k^3 * A(x^k). - Ilya Gutkovskiy, Mar 29 2020
Sum_{k=1..n} a(k) ~ 3 * n^5 / (10*Pi^2). - Amiram Eldar, Dec 03 2023
MAPLE
f:= proc(n) local F, t;
F:= ifactors(n)[2];
numtheory:-phi(n)*(n^3 + (-1)^nops(F)*mul(t[1], t=F)*n)/4
end proc:
f(1):= 1:
map(f, [$1..100]); # Robert Israel, Jan 29 2018
MATHEMATICA
Table[Sum[j^3, {j, Select[Range[n], GCD[n, #] == 1 &]}], {n, 1, 37}] (* Geoffrey Critzer, Mar 03 2015 *)
a[1] = 1; a[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; (n^2/4) * (n * Times @@ ((p - 1)*p^(e - 1)) + Times @@ (1 - p))]; Array[a, 100] (* Amiram Eldar, Dec 03 2023 *)
PROG
(PARI) a(n) = sum(k=1, n, k^3*(gcd(n, k)==1)); \\ Michel Marcus, Mar 03 2015
(PARI) a(n) = {my(f = factor(n)); if(n == 1, 1, (n^2/4) * (n * eulerphi(f) + prod(i = 1, #f~, 1 - f[i, 1]))); } \\ Amiram Eldar, Dec 03 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 07 2000
STATUS
approved