login
A294523
Lexicographically earliest sequence of positive terms, such that, for any n > 0, the binary expansion of n, say of size k+1, is (1, a(n) mod 2, a^2(n) mod 2, ..., a^k(n) mod 2) (where a^i denotes the i-th iterate of the sequence).
1
1, 2, 1, 2, 6, 5, 1, 2, 10, 6, 14, 9, 5, 13, 1, 2, 18, 10, 22, 12, 6, 14, 30, 17, 9, 5, 11, 25, 13, 29, 1, 2, 34, 18, 38, 20, 10, 22, 46, 24, 12, 6, 54, 28, 14, 30, 62, 33, 17, 9, 19, 41, 5, 11, 23, 49, 25, 13, 27, 57, 29, 61, 1, 2, 66, 34, 70, 36, 18, 38, 78
OFFSET
1,2
COMMENTS
More informally, the parity of the iterate of the sequence at n gives the binary expansion of n (beyond the leading 1).
Apparently, iterating the sequence always leads to one of these three loops:
- the fixed point (1) iff we start from 2^k-1 for some k > 0,
- the fixed point (2) iff we start from 2^k for some k > 0,
- or (5, 6) for any other starting value.
a(n) is even iff n belongs to A004754.
a(n) is odd iff n belongs to A004760.
If a(n) > n then a(n) = A080541(n).
If n < 2^k then a(n) < 2^k.
Apparently, if a(n) > 2, then A054429(a(n)) = a(A054429(n)); this accounts for the symmetry of the part connected to the loop (5,6) in the oriented graph of this sequence.
FORMULA
a(n) = 1 iff n = A000225(k) for some k > 0.
a(n) = 2 iff n = A000079(k) for some k > 0.
a(n) = 5 iff n = A081254(k) for some k > 2.
a(n) = 6 iff n = A000975(k) for some k > 2.
a(n) = 10 iff n = A081253(k) for some k > 2.
a(n) = 12 iff n = A266613(k) for some k > 3.
a(n) = 13 iff n = A052997(k) for some k > 2.
a(n) = 14 iff n = A266721(k) for some k > 2.
a(n) = 18 iff n = A267045(k) for some k > 3.
a(n) = 54 iff n = A266248(k) for some k > 4.
These formulas come from the fact that each sequence on the right side, say f, eventually satisfies: f(n) = floor(f(n+1)/2), and f(n) and f(n+2) have the same parity.
EXAMPLE
For n=11:
- the binary representation of 11 is (1,0,1,1),
- a(11) = 14 has parity 0,
- a(14) = 13 has parity 1,
- a(13) = 5 has parity 1,
- we find the binary digits of 11 beyond the initial 1, in order: 0, 1, 1.
See also representations of first terms in Links section.
PROG
(PARI) See Links section.
KEYWORD
nonn,base,look
AUTHOR
Rémy Sigrist, Nov 01 2017
STATUS
approved