A348648 Triangle T(n, k), n >= 0, 0 <= k <= n, read by rows; the even terms of Pascal's triangle (A007318) are clustered as wXwXw subtriangles with w = 2^s-1 for some s > 0; if A007318(n, k) is even then T(n, k) gives the corresponding s otherwise T(n, k) = 0.
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 2, 2, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 1, 0, 3, 3, 3, 3, 3, 0, 1, 0, 0, 0, 0, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 2, 2, 2, 0, 3, 3, 3, 0, 2, 2, 2, 0
Offset: 0
Examples
Triangle T(n, k) begins (with dots instead of 0's): . . . . 1 . . . . . . 2 2 2 . . . 2 2 . . . 1 . 2 . 1 . . . . . . . . . . 3 3 3 3 3 3 3 . . . 3 3 3 3 3 3 . . . 1 . 3 3 3 3 3 . 1 . . . . . 3 3 3 3 . . . . . 2 2 2 . 3 3 3 . 2 2 2 . . . 2 2 . . 3 3 . . 2 2 . . . 1 . 2 . 1 . 3 . 1 . 2 . 1 . . . . . . . . . . . . . . . . .
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..8255 (rows for n = 0..127, flattened)
- Rémy Sigrist, Colored representation of the first 2^9 rows (black pixels correspond to 0's)
- Rémy Sigrist, Colored logarithmic scatterplot of A014428 (where the colors are given by the present sequence)
- Rémy Sigrist, Colored logarithmic scatterplot of A007318 (where the colors are given by the present sequence, and black pixels denotes 0's)
- Index entries for triangles and arrays related to Pascal's triangle
Programs
-
PARI
T(n,k) = { if (n<=1, return (0)); my (s=#binary(n)-1); n-=2^s; if (k<=n, return (T(n,k)), k<2^s, return (s), return (T(n,k-2^s))) }
Comments