login
A348366
Permutation of natural numbers such that A284005(a(n)) = A347188(n+1) for n >= 0.
4
0, 1, 3, 2, 7, 6, 5, 15, 4, 14, 13, 11, 31, 12, 10, 30, 9, 29, 27, 23, 63, 8, 28, 26, 22, 62, 25, 21, 61, 19, 59, 55, 47, 127, 24, 20, 60, 18, 58, 54, 46, 126, 17, 57, 53, 45, 125, 51, 43, 123, 39, 119, 111, 95, 255, 16, 56, 52, 44, 124, 50, 42, 122, 38, 118
OFFSET
0,3
COMMENTS
This sequence and A200714 have the same set of values on intervals from A000045(m) to A000045(m+1) - 1 for m > 3.
FORMULA
a(n) = 2*a(n - A130312(n)) + (A072649(n) - A072649(n - A130312(n))) mod 2 for n > 1 with a(0) = 0, a(1) = 1.
PROG
(PARI) an(n) = my(m=0); until(fibonacci(m)>n, m++); m-2; \\ A072649
af(n) = my(m=0); until(fibonacci(m)>n, m++); fibonacci(m-2); \\ A130312
a(n) = if (n <= 1, n, 2*a(n - af(n)) + (an(n) - an(n - af(n))) % 2); \\ Michel Marcus, Nov 26 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Mikhail Kurkov, Oct 15 2021 [verification needed]
STATUS
approved