A272011 Irregular triangle read by rows: strictly decreasing sequences of nonnegative numbers given in lexicographic order.
0, 1, 1, 0, 2, 2, 0, 2, 1, 2, 1, 0, 3, 3, 0, 3, 1, 3, 1, 0, 3, 2, 3, 2, 0, 3, 2, 1, 3, 2, 1, 0, 4, 4, 0, 4, 1, 4, 1, 0, 4, 2, 4, 2, 0, 4, 2, 1, 4, 2, 1, 0, 4, 3, 4, 3, 0, 4, 3, 1, 4, 3, 1, 0, 4, 3, 2, 4, 3, 2, 0, 4, 3, 2, 1, 4, 3, 2, 1, 0, 5, 5, 0, 5, 1, 5, 1
Offset: 0
Examples
Row n is given by the exponents in the binary expansion of n. For example, row 5 = [2, 0] because 5 = 2^2 + 2^0. Row 0: [] Row 1: [0] Row 2: [1] Row 3: [1, 0] Row 4: [2] Row 5: [2, 0] Row 6: [2, 1] Row 7: [2, 1, 0]
Links
- Peter Kagey, Table of n, a(n) for n = 0..10000
Crossrefs
Programs
-
Mathematica
Map[Length[#] - Flatten[Position[#, 1]] &, IntegerDigits[Range[50], 2]] (* Paolo Xausa, Feb 13 2024 *)
-
PARI
apply( A272011_row(n)=Vecrev(vecextract([0..exponent(n+!n)],n)), [0..39]) \\ For n < 2^10: row(n)=digits(A262557[n]). There are 2^k rows starting with k, they start at row 2^k. - M. F. Hasler, Dec 11 2019
Comments