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.

Showing 1-3 of 3 results.

A088208 Table read by rows where T(0,0)=1; n-th row has 2^n terms T(n,j),j=0 to 2^n-1. For j==0 mod 2, T(n+1,2j)=T(n,j) and T(n+1,2j+1)=T(n,j)+2^n. For j==1 mod 2, T(n+1,2j+1)=T(n,j) and T(n+1,2j)=T(n,j)+2^n.

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 2, 1, 5, 7, 3, 4, 8, 6, 2, 1, 9, 13, 5, 7, 15, 11, 3, 4, 12, 16, 8, 6, 14, 10, 2, 1, 17, 25, 9, 13, 29, 21, 5, 7, 23, 31, 15, 11, 27, 19, 3, 4, 20, 28, 12, 16, 32, 24, 8, 6, 22, 30, 14, 10, 26, 18, 2, 1, 33, 49, 17, 25, 57, 41, 9, 13, 45, 61, 29, 21, 53, 37, 5, 7, 39, 55, 23
Offset: 1

Views

Author

Gary W. Adamson, Sep 23 2003

Keywords

Comments

Schroeder, p. 281 states "The ordering with which the iterates x_n fall into the 2^m different chaos bands [order as to magnitude] is also the same as the ordering of the iterates in a stable orbit of period length P = 2^m. For example, for both the period-4 orbit and the four chaos bands, the iterates, starting with the largest iterate x_1, are ordered as follows: x_1 > x_3 > x_4 > x_2."
From Andrey Zabolotskiy, Dec 06 2024: (Start)
For n>0, row n-1 is the permutation relating row n of the left half of Stern-Brocot tree with row n of Kepler's tree of fractions. Specifically, if K_n(k) [resp. SB_n(k)] is the k-th fraction in the n-th row of A294442 [resp. A057432], where 1/2 is in row 1 and k=1..2^(n-1), then SB_n(k) = K_n(T(n-1, k)).
The inverse permutation is row n of A131271.
Equals A362160+1. (End)

Examples

			1
1 2
1 3 4 2
1 5 7 3 4 8 6 2
1 9 13 5 7 15 11 3 4 12 16 8 6 14 10 2
		

References

  • Manfred R. Schroeder, "Fractals, Chaos, Power Laws", W.H. Freeman, 1991, p. 282.

Crossrefs

Programs

  • Haskell
    a088208 n k = a088208_tabf !! (n-1) !! (k-1)
    a088208_row n = a088208_tabf !! (n-1)
    a088208_tabf = iterate f [1] where
       f vs = (map (subtract 1) ws) ++ reverse ws where ws = map (* 2) vs
    -- Reinhard Zumkeller, Mar 14 2015
  • Mathematica
    nmax = 6;
    T[, 0] = 1; T[n, j_] /; j == 2^n = n;
    Do[Which[
      EvenQ[j], T[n+1, 2j] = T[n, j]; T[n+1, 2j+1] = T[n, j] + 2^n,
      OddQ[j], T[n+1, 2j+1] = T[n, j]; T[n+1, 2j] = T[n, j] + 2^n],
    {n, 0, nmax}, {j, 0, 2^n-1}];
    Table[T[n, j], {n, 0, nmax}, {j, 0, 2^n-1}] // Flatten (* Jean-François Alcover, Aug 03 2018 *)

Extensions

Edited by Ray Chandler and N. J. A. Sloane, Oct 08 2003

A131271 Triangular array T(n,k), n>=0, k=1..2^n, read by rows in bracketed pairs such that highest ranked element is bracketed with lowest ranked.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 3, 1, 8, 4, 5, 2, 7, 3, 6, 1, 16, 8, 9, 4, 13, 5, 12, 2, 15, 7, 10, 3, 14, 6, 11, 1, 32, 16, 17, 8, 25, 9, 24, 4, 29, 13, 20, 5, 28, 12, 21, 2, 31, 15, 18, 7, 26, 10, 23, 3, 30, 14, 19, 6, 27, 11, 22, 1, 64, 32, 33, 16, 49, 17, 48, 8, 57
Offset: 0

Views

Author

J. Demongeot (Jacques.Demongeot(AT)imag.fr), Jun 24 2007

Keywords

Comments

In a knockout competition with 2^n players, arranging the competition brackets (see Wikipedia) in T(n,k) order, where T(n,k) is the rank of the k-th player, ensures that highest ranked players cannot meet until the later stages of the competition. None of the top 2^p ranked players can meet earlier than the p-th from last round of the competition. At the same time the top ranked players in each match meet the lowest ranked player possible consistent with this rule. The sequence for the top ranked players meeting the highest ranked player possible is A049773. - Colin Hall, Feb 28 2012
Ranks in natural order of 2^n increasing real numbers appearing in limit cycles of interval iterations, or Median Spiral Order. [See the works by Demongeot & Waku]
From Andrey Zabolotskiy, Dec 06 2024 (Start):
For n>0, row n-1 is the permutation relating row n of Kepler's tree of fractions with row n of the left half of Stern-Brocot tree. Specifically, if K_n(k) [resp. SB_n(k)] is the k-th fraction in the n-th row of A294442 [resp. A057432], where 1/2 is in row 1 and k=1..2^(n-1), then K_n(k) = SB_n(T(n-1, k)).
The inverse permutation is row n of A088208.
When 1 is subtracted from each term, rows 3-5 become A240908, A240909, A240910. (End)

Examples

			Triangle begins:
1;
1,  2;
1,  4, 2, 3;
1,  8, 4, 5, 2,  7, 3,  6;
1, 16, 8, 9, 4, 13, 5, 12, 2, 15, 7, 10, 3, 14, 6, 11;
...
		

Crossrefs

Cf. A005578 (last elements in rows), A155944 (T(n,2^(n-1)) for n>0).

Programs

  • Maple
    T:= proc(n,k) option remember;
          `if`({n, k} = {1}, 1,
          `if`(irem(k, 2)=1, T(n-1, (k+1)/2), 2^(n-1)+1 -T(n-1, k/2)))
        end:
    seq(seq(T(n, k), k=1..2^(n-1)), n=1..7); # Alois P. Heinz, Feb 28 2012, with offset 1
  • Mathematica
    T[0, 1] = 1;
    T[n_, k_] := T[n, k] = If[Mod[k, 2] == 1, T[n, (k + 1)/2], 2^n + 1 - T[n, k/2]];
    Table[T[n, k], {n, 0, 6}, {k, 2^n}] // Flatten (* Jean-François Alcover, May 31 2018, after Alois P. Heinz *)

Formula

T(0,1) = 1, T(n,2k-1) = T(n-1,k), T(n,2k) = 2^n+1 - T(n-1,k).
T(n,1) = 1; for 1 < k <= 2^n, T(n,k) = 1 + (2^n)/m - T(n,k-m), where m = A006519(k-1). - Mathew Englander, Jun 20 2021

Extensions

Edited (with new name from Colin Hall) by Andrey Zabolotskiy, Dec 06 2024

A057431 Obtained by reading first the numerator then the denominator of fractions in full Stern-Brocot tree (A007305/A047679).

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 1, 2, 2, 1, 1, 3, 2, 3, 3, 2, 3, 1, 1, 4, 2, 5, 3, 5, 3, 4, 4, 3, 5, 3, 5, 2, 4, 1, 1, 5, 2, 7, 3, 8, 3, 7, 4, 7, 5, 8, 5, 7, 4, 5, 5, 4, 7, 5, 8, 5, 7, 4, 7, 3, 8, 3, 7, 2, 5, 1, 1, 6, 2, 9, 3, 11, 3, 10, 4, 11, 5, 13, 5, 12, 4, 9, 5, 9, 7, 12, 8, 13, 7, 11, 7, 10, 8, 11, 7, 9, 5, 6, 6, 5
Offset: 0

Views

Author

N. J. A. Sloane, Sep 08 2000

Keywords

Comments

When presented in this way, every row (e.g. row 3, 1 3 2 3 3 2 3 1) is a palindrome. - Joshua Zucker, May 11 2006

Crossrefs

Programs

  • Maple
    F:= proc(n) option remember; local t;
    t:= L -> [[L[1], [L[1][1]+L[2][1], L[1][2]+L[2][2]], L[2]],
               [L[2], [L[2][1]+L[3][1], L[2][2]+L[3][2]], L[3]]][];
          if n=0 then [[[ ], [0, 1], [ ]], [[ ], [1, 0], [ ]]]
        elif n=1 then [[[0, 1], [1, 1], [1, 0]]]
                 else map(t, F(n-1))
          fi
        end:
    aa:= n-> map(x-> x[], [seq(map(x-> x[2], F(j))[], j=0..n)])[]:
    aa(7);   # aa(n) gives the first 2^(n+1)+2 terms
    # Alois P. Heinz, Jan 13 2011
  • Mathematica
    sbt[n_] := Module[{R, L, Y, w, u},
       R = {{1, 0}, {1, 1}};
       L = {{1, 1}, {0, 1}};
       Y = {{1, 0}, {0, 1}};
       w[b_] := Fold[#1.If[#2 == 0, L, R]&, Y, b];
       u[a_] := {a[[2, 1]] + a[[2, 2]], a[[1, 1]] + a[[1, 2]]};
       Map[u, Map[w, Tuples[{0, 1}, n]]]];
    Join[{0, 1, 1, 0}, Table[sbt[n], {n, 0, 5}]] // Flatten (* Jean-François Alcover, Sep 06 2022, after Peter Luschny in A007305 *)

Extensions

More terms from Joshua Zucker, May 11 2006
Showing 1-3 of 3 results.