Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #55 Mar 21 2023 15:32:21
%S 1,1,1,1,0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1,0,1,0,1,0,1,1,1,1,1,1,1,
%T 1,1,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,1,1,
%U 1,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,1,1,1
%N Triangle read by rows, T(n, k) = 1 if n mod 2 = 1, otherwise (k + 1) mod 2.
%C Rows alternate between all 1's and alternating 1's and 0's. A 'mixed' sequence array: rows alternate between the rows of the sequence array for the all 1's sequence and the sequence array for the sequence 1,0,1,0,...
%C Column 2*k has g.f. x^(2*k)/(1-x); column 2*k+1 has g.f. x^(2*k+1)/(1-x^2).
%C Row sums are A029578(n+2). Antidiagonal sums are A106466.
%C This triangle is the Kronecker product of an infinite lower triangular matrix filled with 1's with a 2 X 2 lower triangular matrix of 1's. - _Christopher Cormier_, Sep 24 2017
%C From _Peter Bala_, Aug 21 2021: (Start)
%C Using the notation of Davenport et al.:
%C This is the double Riordan array ( 1/(1 - x); x/(1 + x), x*(1 + x) ).
%C The inverse array equals ( (1 - x)*(1 - x^2); x*(1 - x), x*(1 + x) ).
%C They are examples of double Riordan arrays of the form (g(x); x*f_1(x), x*f_2(x)), where f_1(x)*f_2(x) = 1. Arrays of this type form a group under matrix multiplication. For the group law see the Bala link. (End)
%H Peter Bala, <a href="/A177994/a177994.pdf">Matrices with repeated columns - the generalised Appell groups</a>
%H D. E. Davenport, L. W. Shapiro and L. C. Woodson, <a href="https://doi.org/10.37236/2034">The Double Riordan Group</a>, The Electronic Journal of Combinatorics, 18(2) (2012).
%F If gcd(n - k + 1, k + 1) mod 2 = 0 then T(n, k) = 0, otherwise T(n, k) = 1.
%F T(n, k) = A003989(n + 1, k + 1) mod 2.
%F T(n, k) = binomial(n mod 2, k mod 2). - _Peter Luschny_, Dec 12 2022
%e The triangle begins:
%e n\k| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...
%e ---+------------------------------------------------
%e 0 | 1
%e 1 | 1 1
%e 2 | 1 0 1
%e 3 | 1 1 1 1
%e 4 | 1 0 1 0 1
%e 5 | 1 1 1 1 1 1
%e 6 | 1 0 1 0 1 0 1
%e 7 | 1 1 1 1 1 1 1 1
%e 8 | 1 0 1 0 1 0 1 0 1
%e 9 | 1 1 1 1 1 1 1 1 1 1
%e 10 | 1 0 1 0 1 0 1 0 1 0 1
%e 11 | 1 1 1 1 1 1 1 1 1 1 1 1
%e 12 | 1 0 1 0 1 0 1 0 1 0 1 0 1
%e 13 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1
%e 14 | 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
%e ... Reformatted by _Wolfdieter Lang_, May 12 2018
%e Inverse array begins
%e n\k| 0 1 2 3 4 5 6 7
%e ---+-------------------------------
%e 0 | 1
%e 1 | -1 1
%e 2 | -1 0 1
%e 3 | 1 -1 -1 1
%e 4 | 0 0 -1 0 1
%e 5 | 0 0 1 -1 -1 1
%e 6 | 0 0 0 0 -1 0 1
%e 7 | 0 0 0 0 1 -1 -1 1
%e ... - _Peter Bala_, Aug 21 2021
%p T := (n, k) -> if igcd(n - k + 1, k + 1) mod 2 = 0 then 0 else 1 fi:
%p for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
%p # Alternative:
%p T := (n, k) -> if n mod 2 = 1 then 1 else (k + 1) mod 2 fi:
%p for n from 0 to 9 do seq(T(n, k), k = 0..n) od; # _Peter Luschny_, Dec 12 2022
%t Table[Binomial[Mod[n, 2], Mod[k, 2]], {n, 0, 16}, {k, 0, n}] // Flatten (* _Michael De Vlieger_, Dec 12 2022 *)
%o (Python)
%o def A106465row(n: int) -> list[int]:
%o if n % 2 == 1:
%o return [1] * (n + 1)
%o return [1, 0] * (n // 2) + [1]
%o for n in range(9): print(A106465row(n)) # _Peter Luschny_, Dec 12 2022
%Y Cf. A003989, A029578, A106466.
%K easy,nonn,tabl
%O 0,1
%A _Paul Barry_, May 03 2005
%E Edited and new name by _Peter Luschny_, Dec 12 2022