%I #42 Apr 10 2024 11:14:31
%S 1,0,1,0,1,0,1,1,0,1,1,1,0,1,2,2,0,1,2,4,1,0,1,3,6,2,1,0,1,3,9,5,3,0,
%T 1,4,12,8,8,1,0,1,4,16,14,16,3,1,0,1,5,20,20,30,9,4,0,1,5,25,30,50,19,
%U 13,1,0,1,6,30,40,80,39,32,4,1,0,1,6,36,55,120,69,71,14,5
%N Irregular triangle read by rows: T(n,k) is the number of reduced anti-palindromic compositions of n of length k, n >= 0, 0 <= k <= floor((2*n+1)/3).
%C A composition S with sum n and length k is a reduced anti-palindromic composition if S(i) < S(k+1-i) for 1 <= i <= floor(k/2). - _Andrew Howroyd_, Feb 28 2023
%C A composition S with sum n and length k is an Arndt composition if S(2i-1) > S(2i) for all i >= 1. T(n,k) also counts these compositions. - _Daniel Checa_, Jan 05 2024
%H Andrew Howroyd, <a href="/A354787/b354787.txt">Table of n, a(n) for n = 0..3467</a> (rows 0..100)
%H George E. Andrews, Matthew Just, and Greg Simay, <a href="https://arxiv.org/abs/2102.01613">Anti-palindromic compositions</a>, arXiv:2102.01613 [math.CO], 2021. Also Fib. Q., 60:2 (2022), 164-176. See Table 3.
%H Daniel F. Checa and José L. Ramírez, <a href="https://arxiv.org/abs/2311.15388">Arndt compositions: a generating functions approach</a>, arXiv:2311.15388 [math.CO], 2023. See also <a href="http://math.colgate.edu/~integers/y35/y35.pdf">Integers</a> (2024) Vol. 24, A35, p. 4.
%H Daniel F. Checa, <a href="https://github.com/dfcheca/Arndt-Compositions">Arndt Compositions: Connections with Fibonacci Numbers, Statistics, and Generalizations</a>, 2023. p. 17.
%F G.f.: A(x,y) = (1 + x*y/(1 - x))/(1 - x^3*y^2/((1 + x)*(1 - x)^2)). - _Andrew Howroyd_, Feb 28 2023
%F From _Daniel Checa_, Jan 03 2024: (Start)
%F G.f. of the k-th column, k >= 1: z^floor(3*k/2)/((1-z)^k*(1+z)^ floor(k/2)).
%F T(n, k) = Sum_{i=floor(k/2)..n-k} binomial(n-i-1, k-1)*binomial(i-1, floor(k/2) - 1)*(-1)^(i + floor(k/2)) for k >= 2.
%F (End)
%e Triangle begins:
%e 1;
%e 0, 1;
%e 0, 1;
%e 0, 1, 1;
%e 0, 1, 1, 1;
%e 0, 1, 2, 2;
%e 0, 1, 2, 4, 1;
%e 0, 1, 3, 6, 2, 1;
%e 0, 1, 3, 9, 5, 3;
%e ...
%o (PARI) T(n)=[Vecrev(p) | p<-Vec((1 + x*y/(1 - x))/(1 - x^3*y^2/((1 + x)*(1 - x)^2)) + O(x*x^n))]
%o { my(rows=T(12)); for(i=1, #rows, print(rows[i])) } \\ _Andrew Howroyd_, Feb 28 2023
%o (Python)
%o from math import comb as binomial
%o def T(n, k):
%o if k == 0: return k ** n
%o if k == 1: return 1
%o return sum(binomial(n - i - 1, k - 1) * binomial(i - 1, k // 2 - 1)
%o * (-1) ** (i + k // 2) for i in range(k // 2, n - k + 1))
%o for n in range(11): print([T(n, k) for k in range(1 + (2 * n + 1) // 3)])
%o # _Peter Luschny_, Jan 03 2024
%Y Row sums are Fibonacci numbers (A000045).
%Y Cf. A354786.
%K nonn,tabf
%O 0,15
%A _N. J. A. Sloane_, Jul 13 2022
%E Terms a(33) and beyond from _Andrew Howroyd_, Feb 28 2023