A357298 Triangle read by rows where all entries in every even row are 1's and the entries in every odd row alternate between 0 (start/end) and 1.
0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1
Examples
Triangle begins: n\k 0 1 2 3 4 5 6 7 8 9 ... 1 0; 2 1, 1; 3 0, 1, 0; 4 1, 1, 1, 1; 5 0, 1, 0, 1, 0; 6 1, 1, 1, 1, 1, 1; 7 0, 1, 0, 1, 0, 1, 0; 8 1, 1, 1, 1, 1, 1, 1, 1; 9 0, 1, 0, 1, 0, 1, 0, 1, 0; 10 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; ... Formatted as a symmetric triangle -- regular hexagram pattern with 0's at the centers formed by connecting all 1's: .----------------------------------------------. | k=0 1 2 3 4 5 | |-----------------------/---/---/---/---/--./ | ------- / / / / / | | n=1 | 0 / / / / /| | ------- / / / / | 6 | | 2 | 1---1 / / / / |/ | ------- \ / / / / / | | 3 | 0 1 0 / / / /| | ------- / \ / / / | 7 | | 4 | 1---1---1---1 / / / |/ | ------- \ / \ / / / / | | 5 | 0 1 0 1 0 / / /| | ------- / \ / \ / / | 8 | | 6 | 1---1---1---1---1---1 / / |/ | ------- \ / \ / \ / / / | | 7 | 0 1 0 1 0 1 0 / /| | ------- / \ / \ / \ / | 9 | | 8 | 1---1---1---1---1---1---1---1 / / | ------- \ / \ / \ / \ / / | | 9 | 0 1 0 1 0 1 0 1 0 /| | ------- / \ / \ / \ / \ | . | | 10 | 1---1---1---1---1---1---1---1---1---1 | . | ------- | . |
Programs
-
Maple
T := n -> local k; seq(1/2 + 1/2*(-1)^(n*(k + 1)), k = 0 .. n - 1); # formula 1 seq(T(n), n=1..16); # print first 16 rows of formula 1.
-
PARI
T(n,k) = bitnegimply(1,n) || bitand(1,k); \\ Kevin Ryde, Dec 21 2022
Formula
T(n, k) = 1/2 + (1/2)*(-1)^(n*(k+1)), for n >= 1 and 0 <= k <= n-1.
T(n, k) = (2^n - 2^(n-k-1) - 2^k) mod 3, for n >= 1 and 0 <= k <= n-1.
T(n, k) = A358125(n, k) mod 3, for n >= 1 and 0 <= k <= n-1.
Comments