login
A318841
a(n) = n - A173557(n).
4
0, 1, 1, 3, 1, 4, 1, 7, 7, 6, 1, 10, 1, 8, 7, 15, 1, 16, 1, 16, 9, 12, 1, 22, 21, 14, 25, 22, 1, 22, 1, 31, 13, 18, 11, 34, 1, 20, 15, 36, 1, 30, 1, 34, 37, 24, 1, 46, 43, 46, 19, 40, 1, 52, 15, 50, 21, 30, 1, 52, 1, 32, 51, 63, 17, 46, 1, 52, 25, 46, 1, 70, 1, 38, 67, 58, 17, 54, 1, 76, 79, 42, 1, 72, 21, 44, 31, 78, 1, 82, 19, 70, 33, 48
OFFSET
1,4
LINKS
FORMULA
a(n) = n - A173557(n).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = 1 - A307868 = 0.528319... . - Amiram Eldar, Dec 16 2023
MATHEMATICA
a[n_] := n - Times @@ (FactorInteger[n][[;; , 1]] - 1); a[1] = 0; Array[a, 100] (* Amiram Eldar, Dec 16 2023 *)
PROG
(PARI)
A173557(n) = factorback(apply(p -> p-1, factor(n)[, 1]));
A318841(n) = (n-A173557(n));
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Sep 16 2018
STATUS
approved