%I
%S 1,1,1,2,1,0,1,2,1,0,3,1,2,0,1,0,0,1,2,3,1,0,0,4,1,2,0,0,1,0,3,0,1,2,
%T 0,0,1,0,0,4,1,2,3,0,5,1,0,0,0,0,1,2,0,0,0,1,0,3,4,0,1,2,0,0,0,1,0,0,
%U 0,5,1,2,3,0,0,6,1,0,0,4,0,0,1,2,0,0,0,0,1,0,3,0,0,0,1,2,0,0,5,0,1,0,0,4,0,0,1,2,3,0,0,6
%N Irregular triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists k's interleaved with k1 zeros, and the first element of column k is in row k(k+1)/2.
%C Conjecture 1: T(n,k) is the number of parts in the partition of n into k consecutive parts, if T(n,k) > 0.
%C Conjecture 2: row sums give A204217, which should be also the total number of parts in all partitions of n into consecutive parts.
%C (The conjectures are true. See _Joerg Arndt_'s proof in the Links section.)  _Omar E. Pol_, Jun 14 2017
%C From _Omar E. Pol_, May 05 2020: (Start)
%C Theorem: Let T(n,k) be an irregular triangle read by rows in which column k lists k's interleaved with k1 zeros, and the first element of column k is in the row that is the kth (m+2)gonal number, with n >= 1, k >= 1, m >= 0. T(n,k) is also the number of parts in the partition of n into k consecutive parts that differ by m, including n as a valid partition. Hence the sum of row n gives the total number of parts in all partitions of n into consecutive parts that differ by m.
%C About the above theorem, this is the case for m = 1. For m = 0 see the triangle A127093, in which row sums give A000203. For m = 2 see the triangle A330466, in which row sums give A066839 (conjectured). For m = 3 see the triangle A330888, in which row sums give A330889.
%C Note that there are infinitely many triangles of this kind, with m >= 0. Also, every triangle can be represented with a diagram of overlapping curves, in which every column of triangle is represented by a periodic curve. (End)
%H Joerg Arndt, <a href="http://list.seqfan.eu/pipermail/seqfan/2017June/017633.html">Proof of the conjectures of A204217 and A285914</a>, SeqFan Mailing Lists, Jun 03 2017.
%F T(n,k) = k*A237048(n,k).
%e Triangle begins (rows 1..28):
%e 1;
%e 1;
%e 1, 2;
%e 1, 0;
%e 1, 2;
%e 1, 0, 3;
%e 1, 2, 0;
%e 1, 0, 0;
%e 1, 2, 3;
%e 1, 0, 0, 4;
%e 1, 2, 0, 0;
%e 1, 0, 3, 0;
%e 1, 2, 0, 0;
%e 1, 0, 0, 4;
%e 1, 2, 3, 0, 5;
%e 1, 0, 0, 0, 0;
%e 1, 2, 0, 0, 0;
%e 1, 0, 3, 4, 0;
%e 1, 2, 0, 0, 0;
%e 1, 0, 0, 0, 5;
%e 1, 2, 3, 0, 0, 6;
%e 1, 0, 0, 4, 0, 0;
%e 1, 2, 0, 0, 0, 0;
%e 1, 0, 3, 0, 0, 0;
%e 1, 2, 0, 0, 5, 0;
%e 1, 0, 0, 4, 0, 0;
%e 1, 2, 3, 0, 0, 6;
%e 1, 0, 0, 0, 0, 0, 7;
%e ...
%e In accordance with the conjectures, for n = 15 there are four partitions of 15 into consecutive parts: [15], [8, 7], [6, 5, 4] and [5, 4, 3, 2, 1]. These partitions are formed by 1, 2, 3 and 5 consecutive parts respectively, so the 15th row of the triangle is [1, 2, 3, 0, 5].
%e Illustration of initial terms:
%e Row _
%e 1 _1
%e 2 _1 _
%e 3 _1 2
%e 4 _1 _0
%e 5 _1 2 _
%e 6 _1 _03
%e 7 _1 2 0
%e 8 _1 _0 _0
%e 9 _1 2 3 _
%e 10 _1 _0 04
%e 11 _1 2 _00
%e 12 _1 _0 3 0
%e 13 _1 2 0 _0
%e 14 _1 _0 _04 _
%e 15 _1 2 3 05
%e 16 _1 _0 0 00
%e 17 _1 2 _0 _00
%e 18 _1 _0 3 4 0
%e 19 _1 2 0 0 _0
%e 20 _1 _0 _0 05 _
%e 21 _1 2 3 _006
%e 22 _1 _0 0 4 00
%e 23 _1 2 _0 0 00
%e 24 _1 _0 3 0 _00
%e 25 _1 2 0 _05 0
%e 26 _1 _0 _0 4 0 _0
%e 27 _1 2 3 0 06 _
%e 28 1 0 0 0 007
%e ...
%e Note that the k's are placed exactly below the kth horizontal line segment of every row.
%e The above structure is related to the triangle A237591, also to the lefthand part of the triangle A237593, and also to the lefthand part of the front view of the pyramid described in A245092.
%t With[{nn = 6}, Table[Boole[If[EvenQ@ k, Mod[(n  k/2), k] == 0, Mod[n, k] == 0]] k, {n, nn (nn + 3)/2}, {k, Floor[((Sqrt[8 n + 1]  1)/2)]}]] // Flatten (* _Michael De Vlieger_, Jun 15 2017, after Python by _Indranil Ghosh_ *)
%o (Python)
%o from sympy import sqrt
%o import math
%o def a237048(n, k):
%o return int(n%k == 0) if k%2 else int(((n  k//2)%k) == 0)
%o def T(n, k): return k*a237048(n, k)
%o for n in range(1, 29): print([T(n, k) for k in range(1, int(math.floor((sqrt(8*n + 1)  1)/2)) + 1)]) # _Indranil Ghosh_, Apr 30 2017
%o (PARI) t(n, k) = if (k % 2, (n % k) == 0, ((n  k/2) % k) == 0); \\ A237048
%o tabf(nn) = {for (n=1, nn, for (k=1, floor((sqrt(1+8*n)1)/2), print1(k*t(n, k), ", "); ); print(); ); } \\ _Michel Marcus_, Nov 04 2019
%Y Row n has length A003056(n).
%Y Column k starts in row A000217(k).
%Y The number of positive terms in row n is A001227(n), the number of partitions of n into consecutive parts.
%Y Cf. A000203, A066839, A196020, A204217, A235791, A236104, A237048, A237591, A237593, A245092, A261699, A285898, A262626, A330889.
%Y Triangles of the same family are A127093, this sequence, A330466, A330888.
%K nonn,tabf
%O 1,4
%A _Omar E. Pol_, Apr 28 2017
