OFFSET
1,2
COMMENTS
EXAMPLE
n = 35 = 7*5 = '100011': 2^5 + 2^1 + 2^0 -> a(35) = 5^5 + 5^1 + 5^0 = 3125+5+1 = 3131.
MATHEMATICA
a[n_] := If[EvenQ[n], n, FromDigits[IntegerDigits[n, 2], FactorInteger[n][[1, 1]]]]; Array[a, 50] (* Amiram Eldar, Aug 02 2020 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Apr 07 2004
STATUS
approved