A237591 Irregular triangle read by rows: T(n,k) is the difference between the total number of partitions of all positive integers <= n into exactly k consecutive parts, and the total number of partitions of all positive integers <= n into exactly k+1 consecutive parts (n>=1, 1<=k<=A003056(n)).
1, 2, 2, 1, 3, 1, 3, 2, 4, 1, 1, 4, 2, 1, 5, 2, 1, 5, 2, 2, 6, 2, 1, 1, 6, 3, 1, 1, 7, 2, 2, 1, 7, 3, 2, 1, 8, 3, 1, 2, 8, 3, 2, 1, 1, 9, 3, 2, 1, 1, 9, 4, 2, 1, 1, 10, 3, 2, 2, 1, 10, 4, 2, 2, 1, 11, 4, 2, 1, 2, 11, 4, 3, 1, 1, 1, 12, 4, 2, 2, 1, 1, 12, 5, 2, 2, 1, 1, 13, 4, 3, 2, 1, 1, 13, 5, 3, 1, 2, 1, 14, 5, 2, 2, 2, 1
Offset: 1
Examples
Triangle begins: 1; 2; 2, 1; 3, 1; 3, 2; 4, 1, 1; 4, 2, 1; 5, 2, 1; 5, 2, 2; 6, 2, 1, 1; 6, 3, 1, 1; 7, 2, 2, 1; 7, 3, 2, 1; 8, 3, 1, 2; 8, 3, 2, 1, 1; 9, 3, 2, 1, 1; 9, 4, 2, 1, 1; 10, 3, 2, 2, 1; 10, 4, 2, 2, 1; 11, 4, 2, 1, 2; 11, 4, 3, 1, 1, 1; 12, 4, 2, 2, 1, 1; 12, 5, 2, 2, 1, 1; 13, 4, 3, 2, 1, 1; 13, 5, 3, 1, 2, 1; 14, 5, 2, 2, 2, 1; 14, 5, 3, 2, 1, 2; 15, 5, 3, 2, 1, 1, 1; ... For n = 10 the 10th row of triangle A235791 is [10, 4, 2, 1] so row 10 is [6, 2, 1, 1]. From _Omar E. Pol_, Aug 23 2015: (Start) Illustration of initial terms: Row _ 1 _|1| 2 _|2 _| 3 _|2 |1| 4 _|3 _|1| 5 _|3 |2 _| 6 _|4 _|1|1| 7 _|4 |2 |1| 8 _|5 _|2 _|1| 9 _|5 |2 |2 _| 10 _|6 _|2 |1|1| 11 _|6 |3 _|1|1| 12 _|7 _|2 |2 |1| 13 _|7 |3 |2 _|1| 14 _|8 _|3 _|1|2 _| 15 _|8 |3 |2 |1|1| 16 _|9 _|3 |2 |1|1| 17 _|9 |4 _|2 _|1|1| 18 _|10 _|3 |2 |2 |1| 19 _|10 |4 |2 |2 _|1| 20 _|11 _|4 _|2 |1|2 _| 21 _|11 |4 |3 _|1|1|1| 22 _|12 _|4 |2 |2 |1|1| 23 _|12 |5 _|2 |2 |1|1| 24 _|13 _|4 |3 |2 _|1|1| 25 _|13 |5 |3 _|1|2 |1| 26 _|14 _|5 _|2 |2 |2 _|1| 27 _|14 |5 |3 |2 |1|2 _| 28 |15 |5 |3 |2 |1|1|1| ... Also the diagram represents the left part of the front view of the pyramid described in A245092. For the other half front view see A261350. For more information about the pyramid and the symmetric representation of sigma see A237593. (End) From _Omar E. Pol_, Sep 08 2021: (Start) For n = 12 the symmetric representation of sigma(12) in the fourth quadrant is as shown below: . _ | | | | | | | | | | _ _ _| | _| _ _| _| | | _| | _ _|1 _ _ _ _ _ _| | 2 |_ _ _ _ _ _ _|2 7 . The lengths of the successive line segments from the first vertex to the central vertex of the largest Dyck path are [7, 2, 2, 1] respectively, the same as the 12th row of triangle. (End)
Links
- G. C. Greubel, Table of n, a(n) for the first 150 rows
Programs
-
Mathematica
row[n_]:= Floor[(Sqrt[8*n+1] -1)/2]; f[n_,k_]:= Ceiling[(n+1)/k-(k+1)/2] - Ceiling[(n+1)/(k+1)-(k+2)/2]; Table[f[n,k],{n,1,50},{k,1,row[n]}]//Flatten (* Hartmut F. W. Hoft, Apr 08 2014 *)
-
PARI
row235791(n) = vector((sqrtint(8*n+1)-1)\2, i, 1+(n-(i*(i+1)/2))\i); row(n) = {my(orow = concat(row235791(n), 0)); vector(#orow -1, i, orow[i] - orow[i+1]);} \\ Michel Marcus, Mar 27 2014
-
Python
from sympy import sqrt import math def T(n, k): return int(math.ceil((n + 1)/k - (k + 1)/2)) - int(math.ceil((n + 1)/(k + 1) - (k + 2)/2)) for n in range(1, 29): print([T(n, k) for k in range(1, int((sqrt(8*n + 1) - 1)/2) + 1)]) # Indranil Ghosh, Apr 30 2017
Formula
T(n,k) = ceiling((n+1)/k - (k+1)/2) - ceiling((n+1)/(k+1) - (k+2)/2), for 1 <= n and 1 <= k <= floor((sqrt(8n+1)-1)/2). - Hartmut F. W. Hoft, Apr 07 2014
Extensions
3 more rows added by Omar E. Pol, Aug 23 2015
New name from a comment dated Apr 30 2017. - Omar E. Pol, Jun 18 2023
Comments