OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
If p_1*p_2*p_3* ... *p_m = n is the unique prime factorization of n, then a(n) = Sum_{k=1..m} ds_3(p_k), where ds_3 is the digital sum base 3.
Totally additive with a(p) = A053735(p). - Amiram Eldar, Jul 30 2025
EXAMPLE
a(6) = 3, since 6 = 2*3 and so a(6) = ds_3(2) + ds_3(3) = 2 + 1.
MATHEMATICA
f[p_, e_] := e * DigitSum[p, 3]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jul 30 2025 *)
PROG
(PARI) a(n) = {my(f = factor(n)); sum(i = 1, #f~, f[i, 2] * sumdigits(f[i, 1], 3)); } \\ Amiram Eldar, Jul 30 2025
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Hieronymus Fischer, Nov 11 2007
EXTENSIONS
a(1) = 0 prepended by Amiram Eldar, Jul 30 2025
STATUS
approved
