OFFSET
1,2
COMMENTS
All terms are even and leading zeros omitted in the final encoding.
Conversely the opposite mapping of bits: 0->01 and 1->10 is A133468.
The bit length of a(n) is 2^(n-1)+1.
The count of bits set for a(n) is A094373(n).
a(n) = 2 (mod 4) for n > 1.
Also all the terms align bitwise to the right.
The hamming distance of a(n) and a(n+1) is in A000079.
LINKS
Darío Clavijo, Table of n, a(n) for n = 1..13
FORMULA
a(n) = A320916(2^(n-2)+1) for n > 1.
a(n) = A374625(a(n-1)) for n > 1. - Paolo Xausa, Nov 04 2024
EXAMPLE
For n = 5 a(5) = 406 because:
This encoding results in the following tree:
n | a(n)
--+---------------
1 | 0
| |\
2 | 1 0
| | |
3 | 1 10
| | | \
4 | 1 01 10--
| | |\ \ \
| | | \ \ \
5 | 1 10 01 01 10
Which also aligns bitwise to the right:
n | a(n)
--+-----------
1 | 0
2 | 10
3 | 110
4 | 10110
5 | 110010110
And 110010110 in base 10 is 406.
MATHEMATICA
NestList[FromDigits[2 - IntegerDigits[#, 2], 4] &, 0, 10] (* Paolo Xausa, Nov 04 2024 *)
PROG
CROSSREFS
KEYWORD
nonn,base,easy,changed
AUTHOR
Darío Clavijo, Oct 13 2024
STATUS
approved