%I #31 Oct 09 2020 10:51:57
%S 1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,0,1,1,1,1,0,0,1,
%T 1,0,1,0,1,1,1,0,1,0,0,1,1,1,1,0,0,1,1,1,0,0,1,0,1,0,1,1,0,0,1,0,0,1,
%U 1,1,1,0,1,0,0,0,1,1,0,0,1,0,1,1,1,1,0,0,1,0,0,0,1,1,1,0,1,0,0,1,1,1,0,0,1
%N Irregular triangle read by rows: T(n,k) is the number of partitions of n into k consecutive parts that differ by 3, n >= 1, k >= 1, and the first element of column k is in the row that is the k-th pentagonal number (A000326).
%C T(n,k) is 0 or 1, so T(n,k) represents the "existence" of the mentioned partition: 1 = exists, 0 = does not exist.
%C Since the trivial partition n is counted, so T(n,1) = 1.
%C This is an irregular triangle read by rows: T(n,k), n >= 1, k >= 1, in which column k lists 1's interleaved with k-1 zeros, and the first element of column k is in the row that is the k-th pentagonal number.
%C This triangle can be represented with a diagram of overlapping curves, in which every column of triangle is represented by a periodic curve.
%C For a general theorem about the triangles of this family see A303300.
%e Triangle begins (rows 1..22):
%e 1;
%e 1;
%e 1;
%e 1;
%e 1, 1;
%e 1, 0;
%e 1, 1;
%e 1, 0;
%e 1, 1;
%e 1, 0;
%e 1, 1;
%e 1, 0, 1;
%e 1, 1, 0;
%e 1, 0, 0;
%e 1, 1, 1;
%e 1, 0, 0;
%e 1, 1, 0;
%e 1, 0, 1;
%e 1, 1, 0;
%e 1, 0, 0;
%e 1, 1, 1;
%e 1, 0, 0, 1;
%e ...
%e For n = 22 there are two partitions of 22 into consecutive parts that differ by 3, including 22 as a partition. They are [22] and [10, 7, 4, 1]. There are no partitions of this kind with two parts nor with three parts, so the 22nd row of the triangle is [1, 0, 0, 1].
%p A330887 := proc(n,k)
%p local first1 ;
%p first1 := A000325(k) ;
%p if n < first1 then
%p 0 ;
%p elif modp(n-first1,k) = 0 then
%p 1;
%p else
%p 0;
%p end if;
%p end proc:
%p for n from 1 to 40 do
%p for k from 1 do
%p if n>= A000325(k) then
%p printf("%d,",A330887(n,k)) ;
%p else
%p break;
%p end if;
%p end do:
%p printf("\n") ;
%p end do: # _R. J. Mathar_, Oct 02 2020
%Y Row sums give A117277.
%Y Triangles of the same family are A051731, A237048, A303300, this sequence, A334460.
%Y Cf. A000326, A330888.
%K nonn,tabf
%O 1
%A _Omar E. Pol_, Apr 30 2020