cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A003480 a(0) = 1, a(1) = 2, for n > 1, a(n) = 4*a(n-1) - 2*a(n-2).

Original entry on oeis.org

1, 2, 7, 24, 82, 280, 956, 3264, 11144, 38048, 129904, 443520, 1514272, 5170048, 17651648, 60266496, 205762688, 702517760, 2398545664, 8189147136, 27959497216, 95459694592, 325919783936, 1112759746560, 3799199418368, 12971278180352, 44286713884672, 151204299177984
Offset: 0

Views

Author

Keywords

Comments

Gives the number of L-convex polyominoes with n cells, that is convex polyominoes where any two cells can be connected by a path internal to the polyomino and which has at most 1 change of direction (i.e., one of the four orientation of the L). - Simone Rinaldi (rinaldi(AT)unisi.it), Feb 19 2007
Joe Keane (jgk(AT)jgk.org) observes that this sequence (beginning at 2) is "size of raises in pot-limit poker, one blind, maximum raising".
Dimensions of the graded components of the Hopf algebra of noncommutative multi-symmetric functions of level 2. For level r, the sequence would be the INVERT transform of binomial(n+r-1,n). - Jean-Yves Thibon (jyt(AT)univ-mlv.fr), Jun 26 2008
The sum of the numbers in the n-th row of the summatory Pascal triangle (A059576). - Ron R. King, Jan 22 2009
(1 + 2x + 7x^2 + 24x^3 + ...) = 1 / (1 - 2x - 3x^2 - 4x^3 - ...). - Gary W. Adamson, Jul 27 2009
Let M be a triangle with the odd-indexed Fibonacci numbers (1, 2, 5, 13, ...) in every column, with the leftmost column shifted upwards one row. A003480 = lim_{n->oo} M^n, the left-shifted vector considered as a sequence. The analogous operation using the even-indexed Fibonacci numbers generates A001835 starting with offset 1. - Gary W. Adamson, Jul 27 2010
a(n) is the number of generalized compositions of n when there are i+1 different types of the part i, (i=1,2,...). - Milan Janjic, Sep 24 2010
Let h(t) = (1-t)^2/(2*(1-t)^2-1) = 1/(1-(2*t + 3*t^2 + 4*t^3 + ...)),
an o.g.f. for A003480, then
A001003(n) = (1/n!)*((h(t)*d/dt)^n) t, evaluated at t=0, with initial n=1. - Tom Copeland, Sep 06 2011
Excluding the initial 1, a(n) is the 2nd subdiagonal of A228405. - Richard R. Forberg, Sep 02 2013

References

  • G. Castiglione and A. Restivo, L-convex polyominoes: a survey, Chapter 2 of K. G. Subranian et al., eds., Formal Models, Languages and Applications, World Scientific, 2015.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A059576 and of A181289. Second differences of A007070.
Column k=2 of A261780.

Programs

  • Haskell
    a003480 n = a003480_list !! n
    a003480_list = 1 : 2 : 7 : (tail $ zipWith (-)
       (tail $ map (* 4) a003480_list) (map (* 2) a003480_list))
    -- Reinhard Zumkeller, Jan 16 2012, Oct 03 2011
  • Maple
    INVERT([seq(n+1,n=1..20)]); # Jean-Yves Thibon (jyt(AT)univ-mlv.fr), Jun 26 2008
  • Mathematica
    a[0]=1; a[1]=2; a[2]=7; a[n_]:=a[n]=4*a[n-1] - 2*a[n-2]; Table[a[n],{n,0,24}] (* Jean-François Alcover, Mar 22 2011 *)
    Join[{1},LinearRecurrence[{4,-2},{2,7},40]] (* Harvey P. Dale, Oct 23 2011 *)
  • PARI
    a(n)=polcoeff((1-x)^2/(1-4*x+2*x^2)+x*O(x^n),n)
    
  • PARI
    a(n)=local(x); if(n<1,n==0,x=(2+quadgen(8))^n; imag(x)+real(x)/2)
    

Formula

a(n) = (n+1)*a(0) + n*a(1) + ... + 3*a(n-2) + 2*a(n-1). - Amarnath Murthy, Aug 17 2002
G.f.: (1-x)^2/(1-4*x+2*x^2). - Simon Plouffe in his 1992 dissertation
a(n) = A007070(n)/2, n > 0.
G.f.: 1/( 1 - Sum_{k>=1} (k+1)*x^k ).
a(n+1)*a(n+1) - a(n+2)*a(n) = 2^n, n > 0. - D. G. Rogers, Jul 12 2004
For n > 0, a(n) = ((2+sqrt(2))^(n+1) - (2-sqrt(2))^(n+1))/(4*sqrt(2)). - Rolf Pleisch, Aug 03 2009
If the leading 1 is removed, 2, 7, 24, ... is the binomial transform of 2, 5, 12, 29, ..., which is A000129 without its first 2 terms, and the second binomial transform of 2, 3, 4, 6, ..., which is A029744, again without its leading 1. - Al Hakanson (hawkuu(AT)gmail.com), Aug 08 2009
a(n) = Sum((1+p_1)*(1+p_2)*...*(1+p_m)), summation being over all compositions (p_1, p_2, ..., p_m) of n. Example: a(3)=24; indeed, the compositions of 3 are (1,1,1), (1,2), (2,1), (3) and we have 2*2*2 + 2*3 + 3*2 + 4 = 24. - Emeric Deutsch, Oct 17 2010
a(n) = Sum_{k>=0} binomial(n+2*k-1,n) / 2^(k+1). - Vaclav Kotesovec, Dec 31 2013
E.g.f.: (1 + exp(2*x)*(cosh(sqrt(2)*x) + sqrt(2)*sinh(sqrt(2)*x)))/2. - Stefano Spezia, May 20 2024

A261780 Number A(n,k) of compositions of n where each part i is marked with a word of length i over a k-ary alphabet whose letters appear in alphabetical order; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 3, 7, 4, 0, 1, 4, 15, 24, 8, 0, 1, 5, 26, 73, 82, 16, 0, 1, 6, 40, 164, 354, 280, 32, 0, 1, 7, 57, 310, 1031, 1716, 956, 64, 0, 1, 8, 77, 524, 2395, 6480, 8318, 3264, 128, 0, 1, 9, 100, 819, 4803, 18501, 40728, 40320, 11144, 256, 0
Offset: 0

Views

Author

Alois P. Heinz, Aug 31 2015

Keywords

Comments

Also the number of k-compositions of n: matrices with k rows of nonnegative integers with positive column sums and total element sum n.
A(2,2) = 7: (matrices and corresponding marked compositions are given)
[1 1] [0 0] [1 0] [0 1] [1] [2] [0]
[0 0] [1 1] [0 1] [1 0] [1] [0] [2]
1a1a, 1b1b, 1a1b, 1b1a, 2ab, 2aa, 2bb.

Examples

			A(3,2) = 24: 3aaa, 3aab, 3abb, 3bbb, 2aa1a, 2aa1b, 2ab1a, 2ab1b, 2bb1a, 2bb1b, 1a2aa, 1a2ab, 1a2bb, 1b2aa, 1b2ab, 1b2bb, 1a1a1a, 1a1a1b, 1a1b1a, 1a1b1b, 1b1a1a, 1b1a1b, 1b1b1a, 1b1b1b.
Square array A(n,k) begins:
  1,  1,   1,    1,     1,      1,      1, ...
  0,  1,   2,    3,     4,      5,      6, ...
  0,  2,   7,   15,    26,     40,     57, ...
  0,  4,  24,   73,   164,    310,    524, ...
  0,  8,  82,  354,  1031,   2395,   4803, ...
  0, 16, 280, 1716,  6480,  18501,  44022, ...
  0, 32, 956, 8318, 40728, 142920, 403495, ...
		

Crossrefs

Rows n=0-2 give: A000012, A001477, A005449.
Main diagonal gives A261783.
Cf. A261718 (same for partitions), A261781.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1,
          add(A(n-j, k)*binomial(j+k-1, k-1), j=1..n))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    a[n_, k_] := SeriesCoefficient[(1-x)^k/(2*(1-x)^k-1), {x, 0, n}]; Table[ a[n-k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Feb 07 2017 *)

Formula

G.f. of column k: (1-x)^k/(2*(1-x)^k-1).
A(n,k) = Sum_{i=0..k} C(k,i) * A261781(n,k-i).
A(n,k) = Sum_{j>=0} (1/2)^(j+1) * binomial(n-1+k*j,n). - Seiichi Manyama, Aug 06 2024

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

Views

Author

Simone Rinaldi (rinaldi(AT)unisi.it), Oct 21 2008

Keywords

Comments

A 3-composition of n is a matrix with three rows, such that each column has at least one nonzero element and whose elements sum up to n.
Matrix inverse of (A000217(A004736)*A154990). - Mats Granvik, Jan 19 2009
(1 +3*x +15*x^2 +73*x^3 + ...) = 1/(1 -3*x -6*x^2 -10*x^3 -15*x^4 - ...). - Gary W. Adamson, Jul 27 2009
For n>1, a(n) is the number of generalized compositions of n-1 when there are i^2/2 +3i/2 +1 different types of i, (i=1,2,...). - Milan Janjic, Sep 24 2010

References

  • G. Louchard, Matrix compositions: a probabilistic approach, Proceedings of GASCom and Bijective Combinatorics 2008, Bibbiena, Italy, pp. 159-170.

Crossrefs

Cf. A003480 (2-compositions), A145840 (4-compositions), A145841 (5-compositions).
Column k=3 of A261780.

Programs

  • Magma
    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
  • Maple
    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
  • Mathematica
    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 *)
  • Sage
    @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
    

Formula

a(n+3) = 6*a(n+2) - 6*a(n+1) + 2*a(n).
G.f.: (1-x)^3/(2*(1-x)^3 - 1).
a(n) = Sum_{k>=0} C(n+3*k-1,n) / 2^(k+1). - Vaclav Kotesovec, Dec 31 2013
a(n) = Sum_{j=0..n-1} binomial(n-j+2, 2)*a(j) with a(0) = 1. - G. C. Greubel, Mar 07 2021

Extensions

Offset corrected by Alois P. Heinz, Aug 31 2015

A145840 Number of 4-compositions of n.

Original entry on oeis.org

1, 4, 26, 164, 1031, 6480, 40728, 255984, 1608914, 10112368, 63558392, 399478064, 2510804924, 15780945024, 99186608832, 623409013632, 3918258753416, 24627092844352, 154786536605216, 972866430709568, 6114673231661936, 38432026791933696, 241553493927992448
Offset: 0

Views

Author

Simone Rinaldi (rinaldi(AT)unisi.it), Oct 21 2008

Keywords

Comments

A 4-composition of n is a matrix with four rows, such that each column has at least one nonzero element and whose elements sum up to n.

References

  • G. Louchard, Matrix compositions: a probabilistic approach, Proceedings of GASCom and Bijective Combinatorics 2008, Bibbiena, Italy, pp. 159-170.
  • E. Munarini, M. Poneti and S. Rinaldi, Matrix compositions, Proceedings of Formal Power Series and Algebraic Combinatorics 2006, San Diego, USA, J. Remmel, M. Zabrocki (Editors) 445-456.

Crossrefs

Column k=4 of A261780.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
          add(a(n-j)*binomial(j+3, 3), j=1..n))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Sep 01 2015
  • Mathematica
    Table[Sum[Binomial[n+4*k-1,n]/2^(k+1),{k,0,Infinity}],{n,0,20}] (* Vaclav Kotesovec, Dec 31 2013 *)

Formula

a(n+4) = 8*a(n+3)-12*a(n+2)+8*a(n+1)-2*a(n).
G.f.: (1-x)^4/(2*(1-x)^4-1).
a(n) = sum(k>=0, C(n+4*k-1,n) / 2^(k+1)). - Vaclav Kotesovec, Dec 31 2013

Extensions

Offset corrected by Alois P. Heinz, Aug 31 2015

A374455 Expansion of o.g.f. 1/(1 - 5*x - 10*x^2 - 10*x^3 - 5*x^4 - x^5).

Original entry on oeis.org

1, 5, 35, 235, 1580, 10626, 71460, 480570, 3231845, 21734235, 146163251, 982951365, 6610371480, 44454906580, 298960311840, 2010515259876, 13520763292345, 90927457083265, 611489327404315, 4112280377388895, 27655184063541876, 185981775414350150, 1250731895575163300
Offset: 0

Views

Author

Enrique Navarrete, Jul 08 2024

Keywords

Comments

a(n) is the number of generalized compositions of n using parts of size at most 5 where there are binomial(5,i) types of i (see example).
The coefficients of 1/(1 - C(k,1)*x - C(k,2)*x^2 - C(k,3)*x^3 - ... - C(k,k)*x^k) give the number of generalized compositions of n using parts of size at most k where there are binomial(k,i) types of i.

Examples

			The following table gives the type of composition, the number of such compositions, and the total number of compositions of n = 5 using parts of size at most 5 where there are binomial(5,i) types of i (ie. 5 types of 1, 10 types of 2, 10 types of 3, 5 types of 4, and 1 type of 5):
    Type                     Number              Total
    5                          1                     1
    4+1                        2                    50
    3+2                        2                   200
    3+1+1                      3                   750
    2+2+1                      3                  1500
    2+1+1+1                    4                  5000
    1+1+1+1+1+1                1                  3125,
    adding to a(5)=10626.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[1/(1-5*x-10*x^2-10*x^3-5*x^4-x^5),{x,0,22}],x] (* Stefano Spezia, Jul 09 2024 *)

Formula

a(n) = 5*a(n-1) + 10*a(n-2) + 10*a(n-3) + 5*a(n-4) + a(n-5), n=>5.
a(n) = Sum_{k>=0} (1/2)^(k+1) * binomial(5*k,n). - Seiichi Manyama, Aug 03 2024

Extensions

a(20) corrected by Georg Fischer, Oct 28 2024
Showing 1-5 of 5 results.