OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
EXAMPLE
60 is factored as 5 * 3 * 2^2. Write the distinct prime divisors (largest to smallest) in binary to get 101, 11, 10. Concatenate to get 1011110. a(60) is the decimal equivalent of this, which is 94.
MAPLE
a:= n->(l->add(l[i]*2^(i-1), i=1..nops(l)))(map(j->convert
(j, base, 2)[], sort(map(i-> i[1], ifactors(n)[2])))):
seq(a(n), n=1..100); # Alois P. Heinz, Mar 29 2020
MATHEMATICA
Join[{0}, Table[FromDigits[Flatten[IntegerDigits[Reverse[FactorInteger[n][[All, 1]]], 2]], 2], {n, 2, 100}]] (* Harvey P. Dale, Mar 29 2020 *)
PROG
(PARI) a(n)={if(n==1, 0, fromdigits(concat([digits(k, 2) | k<-Vecrev(factor(n)[, 1])]), 2))} \\ Andrew Howroyd, Mar 29 2020
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jul 10 2009
EXTENSIONS
Extended beyond a(16) by R. J. Mathar, Jul 16 2009
Corrected and extended by Harvey P. Dale, Mar 29 2020
STATUS
approved