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.

Previous Showing 11-20 of 42 results. Next

A067311 Triangle read by rows: T(n,k) gives number of ways of arranging n chords on a circle with k simple intersections (i.e., no intersections with 3 or more chords) - positive values only.

Original entry on oeis.org

1, 1, 2, 1, 5, 6, 3, 1, 14, 28, 28, 20, 10, 4, 1, 42, 120, 180, 195, 165, 117, 70, 35, 15, 5, 1, 132, 495, 990, 1430, 1650, 1617, 1386, 1056, 726, 451, 252, 126, 56, 21, 6, 1, 429, 2002, 5005, 9009, 13013, 16016, 17381, 16991, 15197, 12558, 9646, 6916, 4641, 2912, 1703, 924, 462, 210, 84, 28, 7, 1
Offset: 0

Views

Author

Henry Bottomley, Jan 14 2002

Keywords

Comments

Row n contains 1 + n(n-1)/2 entries. - Emeric Deutsch, Jun 03 2009
Row sums are A001147 (double factorials).
Columns include A000108 (Catalan) for k=0 and A002694 for k=1.
Coefficients of Touchard-Riordan polynomials defined on page 3 of the Chakravarty and Kodama paper, related to the array A039599 through the polynomial numerators of Eqn. 2.1. - Tom Copeland, May 26 2016

Examples

			Rows start:
   1;
   1;
   2,   1;
   5,   6,   3,   1;
  14,  28,  28,  20,  10,   4,   1;
  42, 120, 180, 195, 165, 117,  70,  35,  15,   5,   1;
etc.,
i.e., there are 5 ways of arranging 3 chords with no intersections, 6 with one, 3 with two and 1 with three.
		

References

  • P. Flajolet and M. Noy, Analytic combinatorics of chord diagrams; in Formal Power Series and Algebraic Combinatorics, pp. 191-201, Springer, 2000.

Crossrefs

A067310 has a different view of the same table.
Cf. A039599.

Programs

  • Maple
    p := proc (n) options operator, arrow: sort(simplify((sum((-1)^j*q^((1/2)*j*(j-1))*binomial(2*n, n+j), j = -n .. n))/(1-q)^n)) end proc; for n from 0 to 7 do seq(coeff(p(n), q, i), i = 0 .. (1/2)*n*(n-1)) end do; # yields sequence in triangular form; Emeric Deutsch, Jun 03 2009
  • Mathematica
    nmax = 15; se[n_] := se[n] = Series[ Sum[(-1)^j*q^(j(j-1)/2)*Binomial[2 n, n+j], {j, -n, n}]/(1-q)^n , {q, 0, nmax}];
    t[n_, k_] := Coefficient[se[n], q^k]; t[n_, 0] = Binomial[2 n, n]/(n + 1);
    Select[Flatten[Table[t[n, k], {n, 0, nmax}, {k, 0, 2nmax}] ], Positive] [[1 ;; 55]]
    (* Jean-François Alcover, Jun 22 2011, after Emeric Deutsch *)
  • PARI
    M(n)=1/(1-q)^n*sum(k=0, n, (-1)^k * ( binomial(2*n,n-k)-binomial(2*n,n-k-1)) * q^(k*(k+1)/2) );
    for (n=0,10, print( Vec(polrecip(M(n))) ) ); /* print rows */
    /* Joerg Arndt, Oct 01 2012 */

Formula

T(n,k) = Sum_{j=0..n-1} (-1)^j * C((n-j)*(n-j+1)/2-1-k, n-1) * (C(2n, j) - C(2n, j-1)).
Generating polynomial of row n is (1-q)^(-n)*Sum_{j=-n..n} (-1)^j*q^(j*(j-1)/2)*binomial(2*n,n+j). - Emeric Deutsch, Jun 03 2009
O.g.f. as a continued fraction: 1/(1 - t/(1 - (1 + x)*t/(1 - (1 + x + x^2)*t/(1 - (1 + x + x^2 + x^3)*t/(1 - ...))))) = 1 + t + (2 + x)*t^2 + (5 + 6*x +3*x^2 + x^4)*t^3 + .... See Chakravarty and Kodama, equation 3.8. - Peter Bala, Jun 13 2019

Extensions

a(55) onwards from Andrew Howroyd, Nov 22 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

A145841 Number of 5-compositions of n.

Original entry on oeis.org

1, 5, 40, 310, 2395, 18501, 142920, 1104060, 8528890, 65885880, 508970002, 3931805460, 30373291380, 234634403620, 1812556389540, 14002041536004, 108166106338760, 835585763004880, 6454920038905520, 49864411953151840, 385203777033190008, 2975708406629602400
Offset: 0

Views

Author

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

Keywords

Comments

A 5-composition of n is a matrix with five 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

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

Programs

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

Formula

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

Extensions

Offset changed from 1 to 0 by Alois P. Heinz, Aug 31 2015

A020727 Pisot sequence P(2,7): a(0)=2, a(1)=7, thereafter a(n+1) is the nearest integer to a(n)^2/a(n-1).

Original entry on oeis.org

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
Offset: 0

Views

Author

Keywords

Comments

Also Pisot sequence T(2,7). - R. K. Guy
It appears that a(n) = 4*a(n-1) - 2*a(n-2) (holds at least up to n = 1000 but is not known to hold in general).
The recurrence holds up to n = 10^5. - Ralf Stephan, Sep 03 2013
Empirical g.f.: (2-x)/(1-4*x+2*x^2). - Colin Barker, Feb 21 2012

Crossrefs

It appears that this is a subsequence of A003480.
See A008776 for definitions of Pisot sequences.

Programs

  • Magma
    Iv:=[2,7]; [n le 2 select Iv[n] else Floor(Self(n-1)^2/Self(n-2)): n in [1..30]]; // Bruno Berselli, Feb 04 2016
    
  • Mathematica
    RecurrenceTable[{a[0] == 2, a[1] == 7, a[n] == Floor[a[n - 1]^2/a[n - 2]]}, a, {n, 0, 30}] (* Bruno Berselli, Feb 04 2016 *)
  • PARI
    pisotP(nmax, a1, a2) = {
      a=vector(nmax); a[1]=a1; a[2]=a2;
      for(n=3, nmax, a[n] = ceil(a[n-1]^2/a[n-2]-1/2));
      a
    }
    pisotP(50, 2, 7) \\ Colin Barker, Aug 08 2016

Extensions

Edited by N. J. A. Sloane, Aug 17 2009 at the suggestion of R. J. Mathar.

A181327 Triangle read by rows: T(n,k) is the number of 2-compositions of n having k columns with an even sum (0<=k<=floor(n/2)).

Original entry on oeis.org

1, 2, 4, 3, 12, 12, 32, 41, 9, 86, 140, 54, 232, 451, 246, 27, 624, 1416, 1008, 216, 1680, 4357, 3811, 1215, 81, 4522, 13192, 13692, 5832, 810, 12172, 39455, 47380, 25254, 5400, 243, 32764, 116820, 159296, 102024, 29700, 2916, 88192, 343029, 523549
Offset: 0

Views

Author

Emeric Deutsch, Oct 13 2010

Keywords

Comments

A 2-composition of n is a nonnegative matrix with two rows, such that each column has at least one nonzero entry and whose entries sum up to n.
Row n has 1+floor(n/2) entries.
The sum of entries in row n is A003480(n).
T(n,0) = A181329(n).
Sum(k*T(n,k), k>=0) = A181328(n).
For the statistic "number of column with an odd sum" see A181308.

Examples

			T(2,1) = 3 because we have (0 / 2), (1 / 1), and (2 / 0) (the 2-compositions are written as (top row / bottom row)).
Triangle starts:
1;
2;
4,    3;
12,  12;
32,  41,  9;
86, 140, 54;
		

Crossrefs

Programs

  • Maple
    G := (1-z^2)^2/(1-2*z-2*z^2+z^4-3*t*z^2+t*z^4): Gser := simplify(series(G, z = 0, 15)): for n from 0 to 12 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 12 do seq(coeff(P[n], t, k), k = 0 .. floor((1/2)*n)) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, 1,
           expand(add(add(`if`(i=0 and j=0, 0, b(n-i-j)*
           `if`(irem(i+j,2)=0, x, 1)), i=0..n-j), j=0..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Mar 16 2014
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Expand[Sum[Sum[If[i == 0 && j == 0, 0, b[n-i-j] * If[Mod[i+j, 2] == 0, x, 1]], {i, 0, n-j}], {j, 0, n}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n]]; Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, May 27 2015, after Alois P. Heinz *)

Formula

G.f.: G(t,z) = (1-z)^2*(1+z)^2/(1-2*z-2*z^2+z^4-3*t*z^2+t*z^4).
The g.f. of column k is z^{2k}*(1-z^2)^2*(3-z^2)^k/(1-2z-2z^2+z^4)^{k+1}
The g.f. H(t,s,z), where z marks size and t (s) marks number of columns with an odd (even) sum, is H=(1-z^2)^2/(1-2z^2+z^4-2tz-3sz^2+sz^4).

A322402 Triangle read by rows: The number of chord diagrams with n chords and k topologically connected components, 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 4, 6, 5, 0, 27, 36, 28, 14, 0, 248, 310, 225, 120, 42, 0, 2830, 3396, 2332, 1210, 495, 132, 0, 38232, 44604, 29302, 14560, 6006, 2002, 429, 0, 593859, 678696, 430200, 204540, 81900, 28392, 8008, 1430, 0, 10401712, 11701926, 7204821, 3289296, 1263780, 431256, 129948, 31824, 4862
Offset: 0

Views

Author

R. J. Mathar, Dec 06 2018

Keywords

Comments

If all subsets are allowed instead of just pairs (chords), we get A324173. The rightmost column is A000108 (see Riordan). - Gus Wiseman, Feb 27 2019

Examples

			From _Gus Wiseman_, Feb 27 2019: (Start)
Triangle begins:
  1
  0      1
  0      1      2
  0      4      6      5
  0     27     36     28     14
  0    248    310    225    120     42
  0   2830   3396   2332   1210    495    132
  0  38232  44604  29302  14560   6006   2002    429
  0 593859 678696 430200 204540  81900  28392   8008   1430
Row n = 3 counts the following chord diagrams (see link for pictures):
  {{1,3},{2,5},{4,6}}  {{1,2},{3,5},{4,6}}  {{1,2},{3,4},{5,6}}
  {{1,4},{2,5},{3,6}}  {{1,3},{2,4},{5,6}}  {{1,2},{3,6},{4,5}}
  {{1,4},{2,6},{3,5}}  {{1,3},{2,6},{4,5}}  {{1,4},{2,3},{5,6}}
  {{1,5},{2,4},{3,6}}  {{1,5},{2,3},{4,6}}  {{1,6},{2,3},{4,5}}
                       {{1,5},{2,6},{3,4}}  {{1,6},{2,5},{3,4}}
                       {{1,6},{2,4},{3,5}}
(End)
		

Crossrefs

Cf. A000699 (k = 1 column), A001147 (row sums), A000108 (diagonal), A002694 (subdiagonal k = n - 1).

Formula

The g.f. satisfies g(z,w) = 1+w*A000699(w*g^2), where A000699(z) is the g.f. of A000699.

Extensions

Offset changed to 0 by Gus Wiseman, Feb 27 2019

A116484 Expansion of (-1+3*x)/(5*x^2 + 1 - 2*x).

Original entry on oeis.org

-1, 1, 7, 9, -17, -79, -73, 249, 863, 481, -3353, -9111, -1457, 42641, 92567, -28071, -518977, -897599, 799687, 6087369, 8176303, -14084239, -69049993, -67678791, 209892383, 758178721, 466895527, -2857102551, -8048682737, -1811852719
Offset: 0

Views

Author

Creighton Dement, Feb 17 2006

Keywords

Comments

Binomial transform of signed powers of 2: (-1, 2, 4, -8, -16, 32, 64, -128, -256, 512, 1024). Inverse binomial transform of (-1, 0, 8, 32, 64, 0, -512, -2048, -4096, 0, 32768, 131072, 262144, 0, -2097152, -8388608). Compare with A116483.
Floretion Algebra Multiplication Program, FAMP Code: 2basekforseq[A*B] with A = - .5'i + .5'j - .5i' + .5j' + 'kk' - .5'ik' - .5'jk' - .5'ki' - .5'kj' and B = - .5'j + .5'k - .5j' + .5k' - 'ii' - .5'ij' - .5'ik' - .5'ji' - .5'ki' ; 1vesforseq = A000004

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(-1+3x)/(5x^2+1-2x),{x,0,40}],x] (* or *) LinearRecurrence[{2,-5},{-1,1},40] (* Harvey P. Dale, Jun 24 2013 *)

Formula

a(n) = 3*A045873(n) - A045873(n+1). - R. J. Mathar, Apr 23 2009
E.g.f.: exp(x)*(sin(2*x) - cos(2*x)). - Arkadiusz Wesolowski, Aug 31 2012
a(0)=-1, a(1)=1, a(n) = 2*a(n-1) - 5*a(n-2). - Harvey P. Dale, Jun 24 2013
a(n) = (1/2)*((-1 - i)*(1 + 2*i)^n - (1 - i)*(1 - 2*i)^n), n >= 0, where i=sqrt(-1). - Taras Goy, Apr 20 2019

A126764 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 orientations of the letter L).

Original entry on oeis.org

1, 1, 2, 6, 15, 35, 76, 156, 310, 590, 1098, 1984, 3515, 6094, 10398, 17434, 28837, 47038, 75820, 120794, 190479, 297365, 460056, 705576, 1073473, 1620680, 2429352, 3616580, 5349359, 7863564, 11491946, 16700534, 24140606, 34716813, 49682700, 70766326, 100343410
Offset: 0

Views

Author

N. J. A. Sloane, based on email from Simone Rinaldi (rinaldi(AT)unisi.it), Feb 23 2007

Keywords

Comments

This sequence counts fixed L-convex polyominoes. See crossrefs for the free case. - Allan C. Wechsler, Jan 27 2023

Crossrefs

See A360055 for the free case.

Programs

  • Mathematica
    nmax = 50; f[k_, x_] := f[k, x] = (If[k == 0, 1, If[k == 1, 1 + 2*x - x^2, Normal[Series[2*f[k-1, x] - (1 - x^k)^2 * f[k-2, x], {x, 0, nmax}]]]]); CoefficientList[Series[1 + Sum[x^k * f[k-1, x]/((Product[(1 - x^j)^2, {j, 1, k-1}] * (1 - x^k))), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Jun 06 2021 *)

Formula

The reference gives a generating function.
Conjecture: a(n) ~ c * exp(Pi*sqrt(13*n/6)) / n^(3/2), where c = 13*sqrt(2) / 768. - Anthony Guttmann and Vaclav Kotesovec, Jun 09 2021

Extensions

Definition corrected at the suggestion of Emeric Deutsch, Mar 03 2007
More terms from Vaclav Kotesovec, Jun 06 2021

A116483 Expansion of (1 + x) / (5*x^2 - 2*x + 1).

Original entry on oeis.org

1, 3, 1, -13, -31, 3, 161, 307, -191, -1917, -2879, 3827, 22049, 24963, -60319, -245453, -189311, 848643, 2643841, 1044467, -11130271, -27482877, 685601, 138785587, 274143169, -145641597, -1661999039, -2595790093, 3118415009, 19215780483
Offset: 0

Views

Author

Creighton Dement, Feb 17 2006

Keywords

Comments

Binomial transform of signed powers of 2: (1, 2, -4, -8, 16, 32, -64, -128, ...).
Inverse binonomial transform of (1, 4, 8, 0, -64, -256, -512, 0, 4096, 16384, 32768, 0, -262144, -1048576, -2097152, 0, ...).
G.f.*(1-x)/(1+x) (i.e, convolution with 1,-2,2,-2,2,-2, ... ) yields A006495.
Floretion Algebra Multiplication Program, FAMP Code: 2ibaseforseq[A*B] with A = - .5'i + .5'j - .5i' + .5j' + 'kk' - .5'ik' - .5'jk' - .5'ki' - .5'kj' and B = - .5'j + .5'k - .5j' + .5k' - 'ii' - .5'ij' - .5'ik' - .5'ji' - .5'ki' ;

Crossrefs

Programs

  • PARI
    a(n)={local(v=Vec((1+2*I*x)^n)); sum(k=1,#v, real(v[k])+imag(v[k]));}
    /* cf. A138749 */ /* Joerg Arndt, Jul 06 2011 */
    
  • PARI
    Vec((1 + x) / (5*x^2 - 2*x + 1) + O(x^50)) \\ Colin Barker, Aug 25 2017

Formula

a(n) = 2*a(n-1) -5*a(n-2). - Paul Curtz, Apr 18 2011
a(n) = (1/2 + i/2)*((1 - 2*i)^n - i*(1 + 2*i)^n) where i=sqrt(-1). - Colin Barker, Aug 25 2017
Previous Showing 11-20 of 42 results. Next