OFFSET
1,2
COMMENTS
Consider the prime factorization of n, replace each factor prime(i)^e_i with the parenthesized expression [i [e_i]], iterate this process on the indices i and exponents e_i, and finally replace '[' and ']' with digits '1' and '0'.
See A300561 for the decimal representation of these binary numbers.
There is redundancy: trailing '0's can be removed without loss of information; then each term ends in a digit 1 which can also be removed. This more condensed version is given in A300562, the decimal representation in A300563(n) = (m/2^valuation(m,2) - 1)/2 with m = a(n) [read in binary] = A300561(n).
The initial a(1) = 0 represents the empty string of binary digits.
LINKS
J. Awbrey, Riffs and Rotes, Selected Sequences, OEIS wiki, Feb. 2010.
EXAMPLE
The first term a(1) = 0 represents, by convention, the empty factorization of the number 1.
2 = prime(1)^1 => (1(1)) => (()) => 1100 = a(2). (The 1's disappear, having empty factorization.)
3 = prime(2)^1 => (2(1)) => ((())()) [using 2 => (())] => 11100100 = a(3).
4 = prime(1)^2 => (1(2)) => (((()))) => 11110000 = a(4).
5 = prime(3)^1 => (3(1)) => (((())())()) => 111100100100 = a(5).
6 = prime(1)^1*prime(2)^1 => (1(1))(2(1)) => (())((())()) => 110011100100 = a(6) (= concatenation of a(2) and a(3), since 6 = 2*3.)
7 = prime(4)^1 => (4(1)) => ((((())))()) => 111110000100 = a(7).
8 = prime(1)^3 => (1(3)) => ((((())()))) => 111110010000 = a(8), and so on.
To convert back to the usual factorization, replace 0 and 1 by ')' and '(', then iteratively replace any (x(y)) by prime_x^y, where an empty x or y means 1.
Examples: 1100 = (()) = (x(y)) with x = y = 1, so (()) = prime_1^1 = 2.
110011100100 = _(())_(_(())_()) = 2 (2()) = 2 prime_2^1 = 6.
111110010000 = (((_(())_()))) = ((_(2())_)) = ((3)) = prime_1^3 = 8.
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Mar 08 2018
STATUS
approved