OFFSET
1,3
COMMENTS
In other words, a(n) encodes the prime factorization of n in base 1 + A051903(n).
Every nonnegative integer appears finitely many times in this sequence.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
FORMULA
a(2^e) = e for any e >= 0.
a(prime(k)) = 2^(k-1) for any k > 0.
a(prime(k)^e) = e*(e+1)^(k-1) for any k > 0 and e >= 0.
a(n) = A087207(n) for any squarefree number n.
EXAMPLE
For n = 84:
- 84 = 7 * 3 * 2^2 = prime(4) * prime(2) * prime(1)^2,
- b_84 = 1 + 2 = 3,
- so a(84) = 1*3^(4-1) + 1*3^(2-1) + 2*3^(1-1) = 32.
PROG
(PARI) a(n) = { if (n==1, 0, my (f=factor(n), b=1+vecmax(f[, 2]~)); sum(k=1, #f~, f[k, 2]*b^(primepi(f[k, 1])-1))) }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, May 14 2020
STATUS
approved