%I #11 May 17 2020 15:39:59
%S 0,1,2,2,4,3,8,3,6,5,16,5,32,9,6,4,64,7,128,11,10,17,256,7,18,33,12,
%T 29,512,7,1024,5,18,65,12,8,2048,129,34,19,4096,11,8192,83,15,257,
%U 16384,9,54,19,66,245,32768,13,20,67,130,513,65536,14,131072,1025
%N For any n > 0 with prime factorization Product_{k > 0} prime(k)^e_k (where prime(k) denotes the k-th prime number), let b_k = 1 + max_{k > 0} e_k; a(n) = Sum_{k > 0} e_k * b_k^(k-1).
%C In other words, a(n) encodes the prime factorization of n in base 1 + A051903(n).
%C Every nonnegative integer appears finitely many times in this sequence.
%H Rémy Sigrist, <a href="/A334878/b334878.txt">Table of n, a(n) for n = 1..10000</a>
%F a(2^e) = e for any e >= 0.
%F a(prime(k)) = 2^(k-1) for any k > 0.
%F a(prime(k)^e) = e*(e+1)^(k-1) for any k > 0 and e >= 0.
%F a(n) = A087207(n) for any squarefree number n.
%e For n = 84:
%e - 84 = 7 * 3 * 2^2 = prime(4) * prime(2) * prime(1)^2,
%e - b_84 = 1 + 2 = 3,
%e - so a(84) = 1*3^(4-1) + 1*3^(2-1) + 2*3^(1-1) = 32.
%o (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))) }
%Y Cf. A051903, A087207.
%K nonn,base
%O 1,3
%A _Rémy Sigrist_, May 14 2020