OFFSET
2,1
COMMENTS
If p is prime, a(p^k) = p*((k*p)^k-1)/(k*p-1).
If n = p*q with primes p <= q, a(n) = p^2 + p*q + q.
LINKS
Robert Israel, Table of n, a(n) for n = 2..10000
EXAMPLE
For n = 12, the list of prime factors is [2,2,3], the base is 2+2+3=7, and a(12) = 223_7 = 115.
MAPLE
f:= proc(n) local F, b, i;
F:= sort(map(t -> t[1]$t[2], ifactors(n)[2]), `>`);
b:= convert(F, `+`);
(add(F[i]*b^(i-1), i=1..nops(F)));
end proc:
map(f, [$2..100]);
MATHEMATICA
Array[If[PrimeQ@ #, #, FromDigits[#, Total[#]] &@ Flatten[ConstantArray @@@ FactorInteger[#]]] &, 66, 2] (* Michael De Vlieger, Jan 29 2021 *)
CROSSREFS
KEYWORD
AUTHOR
J. M. Bergot and Robert Israel, Jan 29 2021
STATUS
approved