OFFSET
0,12
COMMENTS
It is possible to build this triangle with the following procedure:
- T_0 is the 2X2X2 triangle with all 0's:
^
T_0 = /0\
/0 0\
+-----+
- for s > 0, T_s is obtained by arranging 3 copies of T_{s-1} and one wXwXw triangle (where w=2^s-1) will all s's as follows:
^
/ \
/ \
/ \
/T_{s-1}\
T_s = +---------+
/ \s ... s/ \
/ \. ./ \
/ \. ./ \
/T_{s-1}\s/T_{s-1}\
+---------+---------+
- the triangle {T(n, k)} is the limit of T_s as s tends to infinity.
For any n >= 0, A001316(n) gives the number of 1's in row 4*n + 2 (and there are no 1's elsewhere).
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)
FORMULA
EXAMPLE
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 .
. . . . . . . . . . . . . . . .
PROG
(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))) }
CROSSREFS
AUTHOR
Rémy Sigrist, Oct 27 2021
STATUS
approved