login
A390807
The sum of the integers k from 1 to n such that gcd(n, k) is cubefree (A004709).
10
1, 3, 6, 10, 15, 21, 28, 28, 45, 55, 66, 78, 91, 105, 120, 112, 153, 171, 190, 210, 231, 253, 276, 252, 325, 351, 351, 406, 435, 465, 496, 448, 561, 595, 630, 666, 703, 741, 780, 700, 861, 903, 946, 990, 1035, 1081, 1128, 1008, 1225, 1275, 1326, 1378, 1431, 1404
OFFSET
1,2
COMMENTS
The number of these integers is A254926(n).
LINKS
FORMULA
a(n) = Sum_{k=1..n, gcd(k,n) is cubefree} k = Sum_{k=1..n} A212793(gcd(k,n)) * k.
a(n) = (n + A212793(n)) * A254926(n) / 2.
a(n) <= n*(n+1)/2, with equality if and only if n is cubefree.
a(n) >= A390806(n), with equality if and only if n is squarefree (A005117).
Dirichlet g.f.: (zeta(s-2) + zeta(s-1))/(2 * zeta(3*s-3)).
Sum_{k=1..n} a(k) ~ n^3 / (6*zeta(6)).
MATHEMATICA
f[p_, e_] := If[e < 3, p^e, p^e - p^(e - 3)]; a[n_] := Module[{fct = FactorInteger[n]}, (n + Boole[Max[fct[[;; , 2]]] < 3]) * Times @@ f @@@ fct]/2; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); (n + if(n == 1, 1, vecmax(f[, 2]) < 3)) * prod(i = 1, #f~, f[i, 1]^f[i, 2] - if(f[i, 2] > 2, f[i, 1]^(f[i, 2]-3))) / 2; }
CROSSREFS
The sum of the integers k from 1 to n such that gcd(n, k) is: A023896 (1), A119790 (prime power, A246655), A390800 (power of prime, A000961), A390801 (prime), A390802 (odd), A390803 (5-rough), A390804 (power of 2), A390805 (3-smooth), A390806 (squarefree), this sequence (cubefree), A390808 (square), A390809 (1 or 2).
Sequence in context: A249736 A371473 A130486 * A054636 A231680 A382726
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Nov 20 2025
STATUS
approved