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.

A359941 Irregular triangle read row by row. The k-th row are integers from 0 to 2^k-1 in base 2 ordered in graded reverse lexicographical order.

This page as a plain text file.
%I A359941 #24 Feb 18 2023 10:37:48
%S A359941 0,0,1,0,1,2,3,0,1,2,4,3,5,6,7,0,1,2,4,8,3,5,9,6,10,12,7,11,13,14,15,
%T A359941 0,1,2,4,8,16,3,5,9,17,6,10,18,12,20,24,7,11,19,13,21,25,14,22,26,28,
%U A359941 15,23,27,29,30,31,0,1,2,4,8,16,32,3,5,9,17,33,6
%N A359941 Irregular triangle read row by row. The k-th row are integers from 0 to 2^k-1 in base 2 ordered in graded reverse lexicographical order.
%C A359941 The integers in the k-th row are first ordered by the number of 1 in their binary representation (Hamming weight). Elements of the same Hamming weight are ordered by reverse colexicographical order.
%C A359941 The k-th row corresponds to the graded lexicographical order of monomials. For example, with k=3, the monomial are ordered as {1, x0, x1, x2, x1*x0, x2*x0, x2*x1, x2*x1*x0}. This ordering of monomial leads to efficient implementation of polynomial long division (see Links section).
%H A359941 Alois P. Heinz, <a href="/A359941/b359941.txt">Rows n = 0..13, flattened</a>
%H A359941 Jean LiƩnardy, <a href="/A359941/a359941.txt">C++ program</a>
%H A359941 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lexicographic_order#Monomials">Monomial order</a>
%F A359941 T(n,A360302(n,k)) = k = A360302(n,T(n,k)). - _Alois P. Heinz_, Feb 06 2023
%e A359941 As an irregular triangle:
%e A359941   0;
%e A359941   0, 1;
%e A359941   0, 1, 2, 3;
%e A359941   0, 1, 2, 4, 3, 5, 6, 7;
%e A359941   0, 1, 2, 4, 8, 3, 5, 9, 6, 10, 12, 7, 11, 13, 14, 15;
%e A359941   ...
%e A359941 For k = 4, the graded lexicographical order of integers 0..15 written in base 2 is
%e A359941   0000
%e A359941   0001, 0010, 0100, 1000,
%e A359941   0011, 0101, 1001, 0110, 1010, 1100,
%e A359941   0111, 1011, 1101, 1110,
%e A359941   1111
%e A359941 Note that 1001 < 0110 as the least significant digit on which they differ is the last one, and 1 < 0 due to the reverse colexicographical ordering.
%p A359941 T:= n-> map(x-> add(2^(i-1), i=x), [seq(
%p A359941     combinat[choose]([$1..n], i)[], i=0..n)])[]:
%p A359941 seq(T(n), n=0..6);  # _Alois P. Heinz_, Feb 03 2023
%o A359941 (C++) See Links section.
%Y A359941 Cf. A023443, A082185, A360302.
%K A359941 nonn,base,look,tabf,easy
%O A359941 0,6
%A A359941 _Jean LiƩnardy_, Jan 19 2023