A285914 Irregular triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists k's interleaved with k-1 zeros, and the first element of column k is in row k(k+1)/2.
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, 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, 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
Offset: 1
Examples
Triangle begins (rows 1..28): 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, 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, 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; 1, 0, 0, 0, 0, 0, 7; ... 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]. Illustration of initial terms: Row _ 1 _|1| 2 _|1 _| 3 _|1 |2| 4 _|1 _|0| 5 _|1 |2 _| 6 _|1 _|0|3| 7 _|1 |2 |0| 8 _|1 _|0 _|0| 9 _|1 |2 |3 _| 10 _|1 _|0 |0|4| 11 _|1 |2 _|0|0| 12 _|1 _|0 |3 |0| 13 _|1 |2 |0 _|0| 14 _|1 _|0 _|0|4 _| 15 _|1 |2 |3 |0|5| 16 _|1 _|0 |0 |0|0| 17 _|1 |2 _|0 _|0|0| 18 _|1 _|0 |3 |4 |0| 19 _|1 |2 |0 |0 _|0| 20 _|1 _|0 _|0 |0|5 _| 21 _|1 |2 |3 _|0|0|6| 22 _|1 _|0 |0 |4 |0|0| 23 _|1 |2 _|0 |0 |0|0| 24 _|1 _|0 |3 |0 _|0|0| 25 _|1 |2 |0 _|0|5 |0| 26 _|1 _|0 _|0 |4 |0 _|0| 27 _|1 |2 |3 |0 |0|6 _| 28 |1 |0 |0 |0 |0|0|7| ... Note that the k's are placed exactly below the k-th horizontal line segment of every row. The above structure is related to the triangle A237591, also to the left-hand part of the triangle A237593, and also to the left-hand part of the front view of the pyramid described in A245092.
Links
- Joerg Arndt, Proof of the conjectures of A204217 and A285914, SeqFan Mailing Lists, Jun 03 2017.
Crossrefs
Row n has length A003056(n).
Column k starts in row A000217(k).
The number of positive terms in row n is A001227(n), the number of partitions of n into consecutive parts.
Programs
-
Mathematica
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 *)
-
PARI
t(n, k) = if (k % 2, (n % k) == 0, ((n - k/2) % k) == 0); \\ A237048 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
-
Python
from sympy import sqrt import math def a237048(n, k): return int(n%k == 0) if k%2 else int(((n - k//2)%k) == 0) def T(n, k): return k*a237048(n, k) 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
Formula
T(n,k) = k*A237048(n,k).
Comments