cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A227351 Permutation of nonnegative integers: map each number by lengths of runs of zeros in its Zeckendorf expansion shifted once left to the number which has the same lengths of runs (in the same order, but alternatively of runs of 0's and 1's) in its binary representation.

This page as a plain text file.
%I A227351 #33 May 27 2025 20:32:24
%S A227351 0,1,3,7,2,15,6,4,31,14,12,8,5,63,30,28,24,13,16,9,11,127,62,60,56,29,
%T A227351 48,25,27,32,17,19,23,10,255,126,124,120,61,112,57,59,96,49,51,55,26,
%U A227351 64,33,35,39,18,47,22,20,511,254,252,248,125,240,121,123,224
%N A227351 Permutation of nonnegative integers: map each number by lengths of runs of zeros in its Zeckendorf expansion shifted once left to the number which has the same lengths of runs (in the same order, but alternatively of runs of 0's and 1's) in its binary representation.
%C A227351 This permutation is based on the fact that by appending one extra zero to the right of Fibonacci number representation of n (aka "Zeckendorf expansion") and then counting the lengths of blocks of consecutive (nonleading) zeros we get bijective correspondence with compositions, and thus also with the binary representation of a unique n. See the chart below:
%C A227351    n   A014417(n) A014417(A022342(n+1)) Runs of    Binary number   In dec.
%C A227351                   [shifted once left]   zeros      with same runs  = a(n)
%C A227351    0:   ......0              ......0    []         .....0           0
%C A227351    1:   ......1              .....10    [1]        .....1           1
%C A227351    2:   .....10              ....100    [2]        ....11           3
%C A227351    3:   ....100              ...1000    [3]        ...111           7
%C A227351    4:   ....101              ...1010    [1,1]      ....10           2
%C A227351    5:   ...1000              ..10000    [4]        ..1111          15
%C A227351    6:   ...1001              ..10010    [2,1]      ...110           6
%C A227351    7:   ...1010              ..10100    [1,2]      ...100           4
%C A227351    8:   ..10000              .100000    [5]        .11111          31
%C A227351    9:   ..10001              .100010    [3,1]      ..1110          14
%C A227351   10:   ..10010              .100100    [2,2]      ..1100          12
%C A227351   11:   ..10100              .101000    [1,3]      ..1000           8
%C A227351   12:   ..10101              .101010    [1,1,1]    ...101           5
%C A227351   13:   .100000              1000000    [6]        111111          63
%C A227351 Are there any other fixed points after 0, 1, 6, 803, 407483 ?
%H A227351 Antti Karttunen, <a href="/A227351/b227351.txt">Table of n, a(n) for n = 0..10946</a>
%H A227351 OEIS Wiki, <a href="https://oeis.org/wiki/Run-length_encoding">Run-length encoding</a>
%H A227351 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A227351 a(n) = A006068(A048679(n)) = A006068(A106151(2*A003714(n))).
%F A227351 This permutation effects following correspondences:
%F A227351 a(A000045(n)) = A000225(n-1).
%F A227351 a(A027941(n)) = A000975(n).
%F A227351 For n >=3, a(A000204(n)) = A000079(n-2).
%o A227351 (Scheme) (define (A227351 n) (A006068 (A048679 n)))
%o A227351 (Scheme) (define (A227351v2 n) (A006068 (A106151 (* 2 (A003714 n)))))
%Y A227351 Inverse permutation: A227352. Cf. also A003714, A014417, A006068, A048679.
%Y A227351 Could be further composed with A075157 or A075159, also A129594.
%K A227351 nonn,base
%O A227351 0,3
%A A227351 _Antti Karttunen_, Jul 08 2013