1, 1, 1, 3, 2, 1, 12, 8, 3, 1, 60, 40, 15, 4, 1, 360, 240, 90, 24, 5, 1, 2520, 1680, 630, 168, 35, 6, 1, 20160, 13440, 5040, 1344, 280, 48, 7, 1, 181440, 120960, 45360, 12096, 2520, 432, 63, 8, 1, 1814400, 1209600, 453600, 120960, 25200, 4320, 630, 80, 9, 1
Offset: 1
T(4,3) = 3 because 1243, 1342 and 2341 are the only permutations of [4] having length of first run equal to 3.
1;
1, 1;
3, 2, 1;
12, 8, 3, 1;
60, 40, 15, 4, 1;
360, 240, 90, 24, 5, 1;
2520, 1680, 630, 168, 35, 6, 1;
...
A145839
Number of 3-compositions of n.
Original entry on oeis.org
1, 3, 15, 73, 354, 1716, 8318, 40320, 195444, 947380, 4592256, 22260144, 107902088, 523036176, 2535324816, 12289536016, 59571339552, 288761470848, 1399719859808, 6784893012864, 32888561860032, 159421452802624, 772767131681280, 3745851196992000
Offset: 0
Simone Rinaldi (rinaldi(AT)unisi.it), Oct 21 2008
- G. Louchard, Matrix compositions: a probabilistic approach, Proceedings of GASCom and Bijective Combinatorics 2008, Bibbiena, Italy, pp. 159-170.
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Sela Fried, Even-up words and their variants, arXiv:2505.14196 [math.CO], 2025. See p. 8.
- Milan Janjic, On Linear Recurrence Equations Arising from Compositions of Positive Integers, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.7.
- Emanuele Munarini, Maddalena Poneti, and Simone Rinaldi, Matrix compositions, JIS 12 (2009) 09.4.8.
- Index entries for linear recurrences with constant coefficients, signature (6,-6,2).
-
I:=[3,15,73]; [1] cat [n le 3 select I[n] else 6*Self(n-1) - 6*Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Mar 07 2021
-
a:= proc(n) option remember; `if`(n=0, 1,
add(a(n-j)*binomial(j+2, 2), j=1..n))
end:
seq(a(n), n=0..25); # Alois P. Heinz, Sep 01 2015
-
Table[Sum[Binomial[n+3*k-1,n]/2^(k+1),{k,0,Infinity}],{n,0,20}] (* Vaclav Kotesovec, Dec 31 2013 *)
a[n_]:= a[n]= If[n==0, 1, Sum[Binomial[n-j+2, 2]*a[j], {j,0,n-1}]]; Table[a[n], {n, 0, 20}] (* G. C. Greubel, Mar 07 2021 *)
-
@CachedFunction
def a(n):
if n==0: return 1
else: return sum( binomial(n-j+2,2)*a(j) for j in (0..n-1))
[a(n) for n in (0..25)] # G. C. Greubel, Mar 07 2021
A155038
Triangle read by rows: T(n,k) is the number of compositions of n with first part k.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 8, 4, 2, 1, 1, 16, 8, 4, 2, 1, 1, 32, 16, 8, 4, 2, 1, 1, 64, 32, 16, 8, 4, 2, 1, 1, 128, 64, 32, 16, 8, 4, 2, 1, 1, 256, 128, 64, 32, 16, 8, 4, 2, 1, 1, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 1, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 1, 2048, 1024, 512
Offset: 1
T(5,2) = 4 because the compositions of 5 with first part 2 are: [2,3], [2,2,1], [2,1,2], and [2,1,1,1]. - _Emeric Deutsch_, Jan 12 2018
Table begins:
1,
1, 1,
2, 1, 1,
4, 2, 1, 1,
8, 4, 2, 1, 1,
16, 8, 4, 2, 1, 1,
32, 16, 8, 4, 2, 1, 1,
64, 32, 16, 8, 4, 2, 1, 1,
Production matrix begins:
1, 1
1, 0, 1
1, 0, 0, 1
1, 0, 0, 0, 1
1, 0, 0, 0, 0, 1
1, 0, 0, 0, 0, 0, 1
1, 0, 0, 0, 0, 0, 0, 1
1, 0, 0, 0, 0, 0, 0, 0, 1
... - _Philippe Deléham_, Oct 04 2014
- Reinhard Zumkeller, Rows n = 1..100 of table, flattened
- Jean-Luc Baril, Javier F. González, and José L. Ramírez, Last symbol distribution in pattern avoiding Catalan words, Univ. Bourgogne (France, 2022).
- Emeric Deutsch, L. Ferrari and S. Rinaldi, Production Matrices and Riordan arrays, arXiv:math/0702638 [math.CO], 2007.
-
a155038 n k = a155038_tabl !! (n-1) !! (k-1)
a155038_row n = a155038_tabl !! (n-1)
a155038_tabl = iterate
(\row -> zipWith (+) (row ++ [0]) (init row ++ [0,1])) [1]
-- Reinhard Zumkeller, Aug 08 2013
-
T := proc(n, k) if k = n then 1 elif k < n then 2^(n-k-1) else 0 end if end proc: for n to 13 do seq(T(n, k), k = 1 .. n) end do; # yields sequence in triangular form - Emeric Deutsch, Jan 12 2018
G:= (1-2*x+t*x^2)/((1-2*x)*(1-t*x)): Gser := simplify(series(G, x = 0, 15)): for n to 14 do P[n] := coeff(Gser, x, n) end do: for n to 14 do seq(coeff(P[n], t, j), j = 1 .. n) end do; # yields sequence in triangular form - Emeric Deutsch, Jan 19 2018
-
nn = 15; a = 1/(1 - y x); f[list_] := Select[list, # > 0 &];Map[f, CoefficientList[Series[ a/(1 - x/(1 - x)), {x, 0, nn}], {x, y}]] // Flatten (* Geoffrey Critzer, Feb 15 2012 *)
A155031
Triangle T(n, k) = 0 if n==0 (mod k) otherwise -1 with T(n, n) = 1 and T(n, 0) = 0, read by rows.
Original entry on oeis.org
1, 0, 1, 0, -1, 1, 0, 0, -1, 1, 0, -1, -1, -1, 1, 0, 0, 0, -1, -1, 1, 0, -1, -1, -1, -1, -1, 1, 0, 0, -1, 0, -1, -1, -1, 1, 0, -1, 0, -1, -1, -1, -1, -1, 1, 0, 0, -1, -1, 0, -1, -1, -1, -1, 1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1, -1, 1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1
Offset: 1
Table begins:
1;
0, 1;
0, -1, 1;
0, 0, -1, 1;
0, -1, -1, -1, 1;
0, 0, 0, -1, -1, 1;
0, -1, -1, -1, -1, -1, 1;
0, 0, -1, 0, -1, -1, -1, 1;
0, -1, 0, -1, -1, -1, -1, -1, 1;
-
[k eq n select 1 else (k eq 1 or n mod k eq 0) select 0 else -1: k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 08 2021
-
T[n_, k_]:= If[k==n, 1, If[k==1 || Mod[n, k]==0, 0, -1]];
Table[T[n, k], {n, 12}, {k, n}] //Flatten (* G. C. Greubel, Mar 08 2021 *)
-
flatten([[1 if k==n else 0 if (k==1 or n%k==0) else -1 for k in [1..n]] for n in [1..12]]) # G. C. Greubel, Mar 08 2021
A174557
Triangle T(n, k) = -floor(n/k) with T(n, n) = 1, read by rows.
Original entry on oeis.org
1, -2, 1, -3, -1, 1, -4, -2, -1, 1, -5, -2, -1, -1, 1, -6, -3, -2, -1, -1, 1, -7, -3, -2, -1, -1, -1, 1, -8, -4, -2, -2, -1, -1, -1, 1, -9, -4, -3, -2, -1, -1, -1, -1, 1, -10, -5, -3, -2, -2, -1, -1, -1, -1, 1, -11, -5, -3, -2, -2, -1, -1, -1, -1, -1, 1, -12, -6, -4, -3, -2, -2, -1, -1, -1, -1, -1, 1
Offset: 1
Table begins:
1;
-2, 1;
-3, -1, 1;
-4, -2, -1, 1;
-5, -2, -1, -1, 1;
-6, -3, -2, -1, -1, 1;
-7, -3, -2, -1, -1, -1, 1;
-8, -4, -2, -2, -1, -1, -1, 1;
-9, -4, -3, -2, -1, -1, -1, -1, 1;
-10, -5, -3, -2, -2, -1, -1, -1, -1, 1;
-
[k eq n select 1 else -Floor(n/k): k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 06 2021
-
Table[If[k==n, 1, -Floor[n/k]], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Mar 06 2021 *)
-
flatten([[1 if k==n else -(n//k) for k in [1..n]] for n in [1..12]]) # G. C. Greubel, Mar 06 2021
Comments