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-10 of 15 results. Next

A386650 Product of first n quadrinomial coefficients (A005725) for n > 0 with a(0) = 1.

Original entry on oeis.org

1, 1, 3, 30, 930, 93930, 31560480, 35600221440, 136099646565120, 1776236487321381120, 79580723341459838319360, 12296654209275691297430868480, 6578267322410960919238807125534720, 12223446894741861497849104893155093176320, 79112201841847644246811045518121813092796661760
Offset: 0

Views

Author

Paul D. Hanna, Aug 08 2025

Keywords

Comments

Conjecture: 2*a(n) = A214590(n) - 2 for n >= 1, where A214590(n) is the number of nXnXn triangular 0..3 arrays with every horizontal row having the same average value.

Examples

			The quadrinomial coefficients A005725(n) = [x^n] (1 + x + x^2 + x^3)^n for n >= 0 begin [1, 1, 3, 10, 31, 101, 336, 1128, 3823, ...], where a(n) equals the product of the terms A005725(0) through A005725(n).
		

Crossrefs

Programs

  • Mathematica
    Table[Product[HypergeometricPFQ[{(1-k)/2, -k, -k/2}, {1/2, 1}, -1], {k, 0, n}], {n, 0, 15}] (* Vaclav Kotesovec, Aug 09 2025 *)
  • PARI
    {a(n) = prod(k=0, n, polcoef((1 + x + x^2 + x^3)^k, k) )}
    for(n=0, 15, print1(a(n), ", "))

Formula

a(n) = Product_{k=0..n} A005725(k) for n >= 0.
a(n) ~ c * exp(n/2) * (11 + 217/(6371 + 624*sqrt(78))^(1/3) + (6371 + 624*sqrt(78))^(1/3))^(-1 + n/2 + n^2/2) * ((39 + (4563 - 78*sqrt(78))^(1/3) + (4563 + 78*sqrt(78))^(1/3))/13)^(n/2) / (2^(-11/4 + 2*n + n^2) * 3^((-3 + 2*n + n^2)/2) * Pi^(n/2 + 1/4) * n^((4290 - 1421*78^(2/3)/(804726 - 73709*sqrt(78))^(1/3) - (78*(804726 - 73709*sqrt(78)))^(1/3) + 4056*n)/8112)), where c = 0.77060824350557924602665408964165291884080801923663... - Vaclav Kotesovec, Aug 09 2025

A036765 Number of ordered rooted trees with n non-root nodes and all outdegrees <= three.

Original entry on oeis.org

1, 1, 2, 5, 13, 36, 104, 309, 939, 2905, 9118, 28964, 92940, 300808, 980864, 3219205, 10626023, 35252867, 117485454, 393133485, 1320357501, 4449298136, 15038769672, 50973266380, 173214422068, 589998043276, 2014026871496, 6889055189032, 23608722350440
Offset: 0

Views

Author

Keywords

Comments

Number of Dyck n-paths that avoid UUUU. For example, a(4)=13 counts all 14 Dyck 4-paths except UUUUDDDD. - David Callan, Dec 09 2004
Number of restricted growth strings for Dyck paths with at most 2 consecutive rises (this is equivalent to the comment above, see example). - Joerg Arndt, Oct 31 2012
Let A(x) be the g.f. for the sequence of numbers of Dyck words with at most k consecutive ones (paths with at most k consecutive up-steps 'U', Restricted Growth Strings with at most k-1 consecutive rises), then B(x) := x*A(x) is the series reversion of x/(1+x+x^2+...+x^k). - Joerg Arndt, Oct 31 2012
a(n) is the number of ordered unlabeled rooted trees on n+1 nodes where each node has no more than 3 children. - Geoffrey Critzer, Jan 05 2013
a(n) = number of noncrossing partitions of [n] in which all blocks are of size <= 3. - David Callan, Aug 27 2014

Examples

			a(4) = 13 since the top row of M^4 = (13, 8, 4, 1, 1).
From _Joerg Arndt_, Oct 31 2012: (Start)
a(5)=36 because there are 36 Dyck words of length 5 that avoid "1111":
[ #]      RGS                rises         Dyck word
[ 1]    [ . . . . . ]     [ . . . . . ]    1.1.1.1.1.
[ 2]    [ . . . . 1 ]     [ . . . . 1 ]    1.1.1.11..
[ 3]    [ . . . 1 . ]     [ . . . 1 . ]    1.1.11..1.
[ 4]    [ . . . 1 1 ]     [ . . . 1 . ]    1.1.11.1..
[ 5]    [ . . . 1 2 ]     [ . . . 1 2 ]    1.1.111...
[ 6]    [ . . 1 . . ]     [ . . 1 . . ]    1.11..1.1.
[ 7]    [ . . 1 . 1 ]     [ . . 1 . 1 ]    1.11..11..
[ 8]    [ . . 1 1 . ]     [ . . 1 . . ]    1.11.1..1.
[ 9]    [ . . 1 1 1 ]     [ . . 1 . . ]    1.11.1.1..
[10]    [ . . 1 1 2 ]     [ . . 1 . 1 ]    1.11.11...
[11]    [ . . 1 2 . ]     [ . . 1 2 . ]    1.111...1.
[12]    [ . . 1 2 1 ]     [ . . 1 2 . ]    1.111..1..
[13]    [ . . 1 2 2 ]     [ . . 1 2 . ]    1.111.1...
[--]    [ . . 1 2 3 ]     [ . . 1 2 3 ]    1.1111....
[14]    [ . 1 . . . ]     [ . 1 . . . ]    11..1.1.1.
[15]    [ . 1 . . 1 ]     [ . 1 . . 1 ]    11..1.11..
[16]    [ . 1 . 1 . ]     [ . 1 . 1 . ]    11..11..1.
[17]    [ . 1 . 1 1 ]     [ . 1 . 1 . ]    11..11.1..
[18]    [ . 1 . 1 2 ]     [ . 1 . 1 2 ]    11..111...
[19]    [ . 1 1 . . ]     [ . 1 . . . ]    11.1..1.1.
[20]    [ . 1 1 . 1 ]     [ . 1 . . 1 ]    11.1..11..
[21]    [ . 1 1 1 . ]     [ . 1 . . . ]    11.1.1..1.
[22]    [ . 1 1 1 1 ]     [ . 1 . . . ]    11.1.1.1..
[23]    [ . 1 1 1 2 ]     [ . 1 . . 1 ]    11.1.11...
[24]    [ . 1 1 2 . ]     [ . 1 . 1 . ]    11.11...1.
[25]    [ . 1 1 2 1 ]     [ . 1 . 1 . ]    11.11..1..
[26]    [ . 1 1 2 2 ]     [ . 1 . 1 . ]    11.11.1...
[27]    [ . 1 1 2 3 ]     [ . 1 . 1 2 ]    11.111....
[28]    [ . 1 2 . . ]     [ . 1 2 . . ]    111...1.1.
[29]    [ . 1 2 . 1 ]     [ . 1 2 . 1 ]    111...11..
[30]    [ . 1 2 1 . ]     [ . 1 2 . . ]    111..1..1.
[31]    [ . 1 2 1 1 ]     [ . 1 2 . . ]    111..1.1..
[32]    [ . 1 2 1 2 ]     [ . 1 2 . 1 ]    111..11...
[33]    [ . 1 2 2 . ]     [ . 1 2 . . ]    111.1...1.
[34]    [ . 1 2 2 1 ]     [ . 1 2 . . ]    111.1..1..
[35]    [ . 1 2 2 2 ]     [ . 1 2 . . ]    111.1.1...
[36]    [ . 1 2 2 3 ]     [ . 1 2 . 1 ]    111.11....
[--]    [ . 1 2 3 . ]     [ . 1 2 3 . ]    1111....1.
[--]    [ . 1 2 3 1 ]     [ . 1 2 3 . ]    1111...1..
[--]    [ . 1 2 3 2 ]     [ . 1 2 3 . ]    1111..1...
[--]    [ . 1 2 3 3 ]     [ . 1 2 3 . ]    1111.1....
[--]    [ . 1 2 3 4 ]     [ . 1 2 3 4 ]    11111.....
(Dots are used for zeros for readability.)
(End)
		

Crossrefs

Right hand column of triangle A064580. The sequence of sequences A000007 (0^n), A000012 (constant 1), A001006 (Motzkin), A036765, A036766, ... tends to A000108 (Catalan).
Column k=3 of A288942.

Programs

  • Magma
    [&+[Binomial(n+1, n-2*k)*Binomial(n+1, k)/(n+1): k in [0..n]]: n in [0..30]]; // Vincenzo Librandi, Oct 16 2018
  • Maple
    r := 3; [ seq((1/n)*add( (-1)^j*binomial(n,j)*binomial(2*n-2-j*(r+1), n-1),j=0..floor((n-1)/(r+1))), n=1..30) ];
    # second Maple program:
    b:= proc(u, o) option remember; `if`(u+o=0, 1,
          add(b(u-j, o+j-1), j=1..min(1, u))+
          add(b(u+j-1, o-j), j=1..min(3, o)))
        end:
    a:= n-> b(0, n):
    seq(a(n), n=0..30);  # Alois P. Heinz, Aug 28 2017
  • Mathematica
    InverseSeries[Series[y/(1+y+y^2+y^3), {y, 0, 24}], x] (* then A(x)=y(x)/x *) (* Len Smiley, Apr 11 2000 *)
    b[u_, o_, k_] := b[u, o, k] = If[u + o == 0, 1, Sum[b[u - j, o + j - 1, k], {j, 1, Min[1, u]}] + Sum[b[u + j - 1, o - j, k], {j, 1, Min[k, o]}]];
    a[n_] := b[0, n, 3];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Nov 05 2017, after Alois P. Heinz *)
    Table[HypergeometricPFQ[{-n-1, (1-n)/2, -n/2}, {1, 3/2}, -1], {n, 0, 28}] (* Vladimir Reshetnikov, Oct 15 2018 *)
  • PARI
    {a(n)=sum(j=0,n\2,binomial(n+1, n-2*j)*binomial(n+1,j))/(n+1)}
    
  • PARI
    {a(n)=local(A=1+x+x*O(x^n));for(i=1,n,A=1+x*A+(x*A)^2+(x*A)^3);polcoeff(A,n)}
    
  • PARI
    {a(n)=local(A=1+x);for(i=1,n,A=exp(sum(m=1, n, sum(j=0, m, binomial(m, j)^2*(x*A+x*O(x^n))^j)*x^m/m)));polcoeff(A, n, x)}
    
  • PARI
    {a(n)=local(A=1+x);for(i=1,n,A=exp(sum(m=1, n, sum(j=0, n, binomial(m+j, j)^2*(x*A+x*O(x^n))^j)*(1-x*A)^(2*m+1)*x^m/m)));polcoeff(A, n, x)}
    
  • PARI
    {a(n)=local(A=1+x);for(i=1,n,A=1/(1-x+x*O(x^n))*exp(sum(m=1,n,A^m*sum(k=0,m-1,binomial(m-1,k)*binomial(m,k)*x^k)/(1-x)^(2*m)*x^(2*m)/m) +x*O(x^n)));polcoeff(A,n)} /* Paul D. Hanna */
    
  • PARI
    {a(n)=local(A=1+x);for(i=1,n,A=1/(1-x+x*O(x^n))*exp(sum(m=1,n,A^m*sum(k=0,n,binomial(m+k-1,k)*binomial(m+k,k)*x^k)*x^(2*m)/m) +x*O(x^n)));polcoeff(A,n)} /* Paul D. Hanna */
    
  • PARI
    Vec(serreverse(x/(1+x+x^2+x^3)+O(x^66))/x) /* Joerg Arndt, Jun 10 2011 */
    

Formula

a(n) = (1/(n+1))*Sum_{j=0..floor(n/2)} binomial(n+1, n-2*j)*binomial(n+1, j). G.f. A(z) satisfies A=1+z*A+(z*A)^2+(z*A)^3. - Emeric Deutsch, Nov 29 2003
G.f.: F(x)/x where F(x) is the reversion of x/(1+x+x^2+x^3). - Joerg Arndt, Jun 10 2011
From Paul D. Hanna, Feb 13 2011: (Start)
O.g.f.: A(x) = exp( Sum_{n>=1} (Sum_{k=0..n} C(n,k)^2*x^k*A(x)^k) * x^n/n ).
O.g.f.: A(x) = exp( Sum_{n>=1} (Sum_{k>=0} C(n+k,k)^2*x^k*A(x)^k)*(1-x*A(x))^(2*n+1)* x^n/n ). (End)
From Paul D. Hanna, Feb 24 2011: (Start)
O.g.f.: A(x) = (1/(1-x))*exp( Sum_{n>=1} A(x)^n*(Sum_{k=0..n-1} C(n-1,k)*C(n,k)*x^k)/(1-x)^(2*n) * x^(2*n)/n ).
O.g.f.: A(x) = (1/(1-x))*exp( Sum_{n>=1} A(x)^n*(Sum_{k>=0} C(n+k-1,k)*C(n+k,k)*x^k) * x^(2*n)/n ). (End)
Let M = an infinite quadradiagonal matrix with all 1's in every diagonal: (sub, main, super, and super-super), and the rest zeros. V = vector [1,0,0,0,...]. The sequence = left column terms of M*V iterates. - Gary W. Adamson, Jun 06 2011
An infinite square production matrix M for the sequence is:
1, 1, 0, 0, 0, 0, ...
1, 0, 1, 0, 0, 0, ...
2, 1, 0, 1, 0, 0, ...
3, 2, 1, 0, 1, 0, ...
4, 3, 2, 1, 0, 1, ...
5, 4, 3, 2, 1, 0, ...
..., such that a(n) is the top left term of M^n. - Gary W. Adamson, Feb 21 2012
D-finite with recurrence: 2*(n+1)*(2*n+3)*(13*n-1)*a(n) = (143*n^3 + 132*n^2 - 17*n - 18)*a(n-1) + 4*(n-1)*(26*n^2 + 11*n - 6)*a(n-2) + 16*(n-2)*(n-1)*(13*n + 12)*a(n-3). - Vaclav Kotesovec, Sep 09 2013
a(n) ~ c*d^n/n^(3/2), where d = 1/12*((6371+624*sqrt(78))^(2/3)+11*(6371+624*sqrt(78))^(1/3)+217)/(6371+624*sqrt(78))^(1/3) = 3.610718613276... is the root of the equation -16-8*d-11*d^2+4*d^3=0 and c = sqrt(f/Pi) = 0.9102276936417..., where f = 1/9984*(9295 + (13*(45085576939 - 795629568*sqrt(78)))^(1/3) + (13*(45085576939 + 795629568*sqrt(78)))^(1/3)) is the root of the equation -128+1696*f-9295*f^2+3328*f^3=0. - Vaclav Kotesovec, Sep 10 2013
From Peter Bala, Jun 21 2015: (Start)
The coefficient of x^n in A(x)^r equals r/(n + r)*Sum_{k = 0..floor(n/2)} binomial(n + r,k)*binomial(n + r,n - 2*k) by the Lagrange-Bürmann formula.
O.g.f. A(x) = exp(Sum_{n >= 1} A005725(n)*x^n/n), where A005725(n) = Sum_{k = 0..floor(n/2)} binomial(n,k)*binomial(n,n - 2*k). Cf. A186241, A198951, A200731. (End)
a(n) = hypergeom([-n-1, (1-n)/2, -n/2], [1, 3/2], -1). - Vladimir Reshetnikov, Oct 15 2018

Extensions

Name clarified by Andrew Howroyd, Dec 04 2017

A305161 Number A(n,k) of compositions of n into exactly n nonnegative parts <= k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 3, 1, 0, 1, 1, 3, 7, 1, 0, 1, 1, 3, 10, 19, 1, 0, 1, 1, 3, 10, 31, 51, 1, 0, 1, 1, 3, 10, 35, 101, 141, 1, 0, 1, 1, 3, 10, 35, 121, 336, 393, 1, 0, 1, 1, 3, 10, 35, 126, 426, 1128, 1107, 1, 0, 1, 1, 3, 10, 35, 126, 456, 1520, 3823, 3139, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Aug 17 2018

Keywords

Examples

			A(3,1) = 1: 111.
A(3,2) = 7: 012, 021, 102, 111, 120, 201, 210.
A(3,3) = 10: 003, 012, 021, 030, 102, 111, 120, 201, 210, 300.
A(4,2) = 19: 0022, 0112, 0121, 0202, 0211, 0220, 1012, 1021, 1102, 1111, 1120, 1201, 1210, 2002, 2011, 2020, 2101, 2110, 2200.
A(4,3) = 31: 0013, 0022, 0031, 0103, 0112, 0121, 0130, 0202, 0211, 0220, 0301, 0310, 1003, 1012, 1021, 1030, 1102, 1111, 1120, 1201, 1210, 1300, 2002, 2011, 2020, 2101, 2110, 2200, 3001, 3010, 3100.
Square array A(n,k) begins:
  1, 1,    1,    1,    1,    1,    1,    1,    1, ...
  0, 1,    1,    1,    1,    1,    1,    1,    1, ...
  0, 1,    3,    3,    3,    3,    3,    3,    3, ...
  0, 1,    7,   10,   10,   10,   10,   10,   10, ...
  0, 1,   19,   31,   35,   35,   35,   35,   35, ...
  0, 1,   51,  101,  121,  126,  126,  126,  126, ...
  0, 1,  141,  336,  426,  456,  462,  462,  462, ...
  0, 1,  393, 1128, 1520, 1667, 1709, 1716, 1716, ...
  0, 1, 1107, 3823, 5475, 6147, 6371, 6427, 6435, ...
		

Crossrefs

Rows n=0-1 give: A000012, A057427.
Main diagonal gives A088218 or A001700(n-1) for n>0.
A(n+1,n) gives A048775.
Cf. A180281.

Programs

  • Maple
    A:= (n, k)-> coeff(series(((x^(k+1)-1)/(x-1))^n, x, n+1), x, n):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
    # second Maple program:
    b:= proc(n, i, k) option remember; `if`(n=0, 1,
          `if`(i=0, 0, add(b(n-j, i-1, k), j=0..min(n, k))))
        end:
    A:= (n, k)-> b(n$2, k):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i == 0, 0, Sum[b[n - j, i - 1, k], {j, 0, Min[n, k]}]]];
    A[n_, k_] := b[n, n, k];
    Table[A[n, d - n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, May 05 2019, after Alois P. Heinz *)

Formula

A(n,k) = [x^n] ((x^(k+1)-1)/(x-1))^n.
A(n,k) - A(n,k-1) = A180281(n,k) for n,k > 0.
A(n,k) = A(n,n) for all k >= n.

A213742 Triangle of numbers C^(3)(n,k) of combinations with repetitions from n different elements over k for each of them not more than three appearances allowed.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 6, 10, 1, 4, 10, 20, 31, 1, 5, 15, 35, 65, 101, 1, 6, 21, 56, 120, 216, 336, 1, 7, 28, 84, 203, 413, 728, 1128, 1, 8, 36, 120, 322, 728, 1428, 2472, 3823, 1, 9, 45, 165, 486, 1206, 2598, 4950, 8451, 13051, 1, 10
Offset: 0

Views

Author

Keywords

Comments

The left side of triangle consists of 1's, while the right side is formed by A005725. Further, T(n,0)=1, T(n,1)=n, T(n,2)=A000217(n) for n>1, T(n,3)=A000292(n) for n>=3, T(n,4)=A005718(n) for n>=2, T(n,5)=A005719(n) for n>=5, T(n,6)=A005720(n) for n>=6, T(n,7)=A001919(n) for n>=7, T(n,8)=A064055(n) for n>=5.

Examples

			Triangle begins
n/k.|..0.....1.....2.....3.....4.....5.....6.....7
==================================================
.0..|..1
.1..|..1.....1
.2..|..1.....2.....3
.3..|..1.....3.....6....10
.4..|..1.....4....10....20....31
.5..|..1.....5....15....35....65....101
.6..|..1.....6....21....56...120....216...336
.7..|..1.....7....28....84...203....413...728....1128
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Sum[(-1)^r Binomial[n,r] Binomial[n-# r+k-1,n-1],{r,0,Floor[k/#]}],{n,0,15},{k,0,n}]/.{0}->{1}]&[4] (* Peter J. C. Moses, Apr 16 2013 *)

Formula

C^(3)(n,k)=sum{r=0,...,floor(k/4)}(-1)^r*C(n,r)*C(n-4*r+k-1, n-1)

A213743 Triangle T(n,k), read by rows, of numbers T(n,k)=C^(4)(n,k) of combinations with repetitions from n different elements over k for each of them not more than four appearances allowed.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 6, 10, 1, 4, 10, 20, 35, 1, 5, 15, 35, 70, 121, 1, 6, 21, 56, 126, 246, 426, 1, 7, 28, 84, 210, 455, 875, 1520, 1, 8, 36, 120, 330, 784, 1652, 3144, 5475, 1, 9, 45, 165, 495, 1278, 2922, 6030, 11385, 19855, 1, 10, 55, 220, 715, 1992, 4905, 10890, 22110, 41470, 72403
Offset: 0

Views

Author

Keywords

Comments

The left side of triangle consists of 1's, while the right side is formed by A187925. Further, T(n,0)=1, T(n,1)=n, T(n,2)=A000217(n) for n>1, T(n,3)=A000292(n) for n>=3, T(n,4)=A000332(n) for n>=7, T(n,5)=A027659(n) for n>=3, T(n,6)=A064056(n) for n>=4, T(n,7)=A064057(n) for n>=5, T(n,8)=A064058(n) for n>=6, T(n,9)=A000575(n) for n>=6.

Examples

			Triangle begins
  n/k.|..0.....1.....2.....3.....4.....5.....6.....7
  ==================================================
  .0..|..1
  .1..|..1.....1
  .2..|..1.....2.....3
  .3..|..1.....3.....6....10
  .4..|..1.....4....10....20....35
  .5..|..1.....5....15....35....70....121
  .6..|..1.....6....21....56...126....246...426
  .7..|..1.....7....28....84...210....455...875....1520
T(4,2)=C^(4)(4,2): From 4 elements {1,2,3,4}, we have the following 10 allowed combinations of 2 elements: {1,1}, {1,2}, {1,3}, {1,4}, {2,2}, {2,3}, {2,4}, {3,3}, {3,4}, {4,4}.
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Sum[(-1)^r Binomial[n,r] Binomial[n-# r+k-1,n-1],{r,0,Floor[k/#]}],{n,0,15},{k,0,n}]/.{0}->{1}]&[5] (* Peter J. C. Moses, Apr 16 2013 *)

Formula

C^(4)(n,k) = Sum_{r=0...floor(k/5)} (-1)^r*C(n,r)*C(n-5*r+k-1, n-1).

A213744 Triangle of numbers C^(5)(n,k) of combinations with repetitions from n different elements over k for each of them not more than 5 appearances allowed.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 6, 10, 1, 4, 10, 20, 35, 1, 5, 15, 35, 70, 126, 1, 6, 21, 56, 126, 252, 456, 1, 7, 28, 84, 210, 462, 917, 1667, 1, 8, 36, 120, 330, 792, 1708, 3368, 6147, 1, 9, 45, 165, 495, 1287, 2994, 6354, 12465, 22825, 1, 10
Offset: 0

Views

Author

Keywords

Comments

For k<=4, the triangle coincides with triangle A213743.
We have over columns of the triangle: T(n,0)=1, T(n,1)=n, T(n,2)=A000217(n) for n>1, T(n,3)=A000292(n) for n>=3, T(n,4)=A000332(n) for n>=7, T(n,5)=A000389(n) for n>=9, T(n,6)=A062989(n) for n>=5, T(n,7)=A063262 for n>=5, T(n,8)=A063263 for n>=6, T(n,9)=A063264 for n>=7.

Examples

			Triangle begins
n/k.|..0.....1.....2.....3.....4.....5.....6.....7
==================================================
.0..|..1
.1..|..1.....1
.2..|..1.....2.....3
.3..|..1.....3.....6....10
.4..|..1.....4....10....20....35
.5..|..1.....5....15....35....70....126
.6..|..1.....6....21....56...126....252...456
.7..|..1.....7....28....84...210....462...917....1667
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Sum[(-1)^r Binomial[n,r] Binomial[n-# r+k-1,n-1],{r,0,Floor[k/#]}],{n,0,15},{k,0,n}]/.{0}->{1}]&[6] (* Peter J. C. Moses, Apr 16 2013 *)

Formula

C^(5)(n,k)=sum{r=0,...,floor(k/6)}(-1)^r*C(n,r)*C(n-6*r+k-1, n-1)

A213745 Triangle of numbers C^(6)(n,k) of combinations with repetitions from n different elements over k for each of them not more than 6 appearances allowed.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 6, 10, 1, 4, 10, 20, 35, 1, 5, 15, 35, 70, 126, 1, 6, 21, 56, 126, 252, 462, 1, 7, 28, 84, 210, 462, 924, 1709, 1, 8, 36, 120, 330, 792, 1716, 3424, 6371, 1, 9, 45, 165, 495, 1287, 3003, 6426, 12789, 23905, 1, 10
Offset: 0

Views

Author

Keywords

Comments

For k<=5, the triangle coincides with triangle A213744.
We have over columns of the triangle: T(n,0)=1, T(n,1)=n, T(n,2)=A000217(n) for n>1, T(n,3)=A000292(n) for n>=3, T(n,4)=A000332(n) for n>=7, T(n,5)=A000389(n) for n>=9, T(n,6)=A000579(n) for n>=11, T(n,7)=A063267 for n>=5, T(n,8)=A063417 for n>=6, T(n,9)=A063418 for n>=7.

Examples

			Triangle begins
n/k.|..0.....1.....2.....3.....4.....5.....6.....7
==================================================
.0..|..1
.1..|..1.....1
.2..|..1.....2.....3
.3..|..1.....3.....6....10
.4..|..1.....4....10....20....35
.5..|..1.....5....15....35....70....126
.6..|..1.....6....21....56...126....252...462
.7..|..1.....7....28....84...210....462...924....1709
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Sum[(-1)^r Binomial[n,r] Binomial[n-# r+k-1,n-1],{r,0,Floor[k/#]}],{n,0,15},{k,0,n}]/.{0}->{1}]&[7] (* Peter J. C. Moses, Apr 16 2013 *)

Formula

C^(6)(n,k)=sum{r=0,...,floor(k/7)}(-1)^r*C(n,r)*C(n-7*r+k-1, n-1).
A generalization. The numbers C^(t)(n,k) of combinations with repetitions from n different elements over k, for each of them not more than t>=1 appearances allowed, are enumerated by the formula:
C^(t)(n,k)=sum{r=0,...,floor(k/(t+1))}(-1)^r*C(n,r)*C(n-(t+1)*r+k-1, n-1).
In case t=1, it is binomial coefficient C^(t)(n,k)=C(n,k), and we have the combinatorial identity: sum{r=0,...,floor(k/2)}(-1)^r*C(n,r)*C(n-2*r+k-1, n-1)=C(n,k). On the other hand, if t=n, then r=0, and for the corresponding numbers of combinations with repetitions without a restriction on appearances of elements we obtain a well known formula C(n+k-1, n-1) (cf. triangle A059481).
In addition, note that, if k<=t, then C^(t)(n,k)=C(n+k-1, n-1). Therefore, triangle {C^(t+1)(n,k)} coincides with the previous triangle {C^(t)(n,k)} for k<=t.

A245195 a(n) = 2^A014081(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 1, 2, 2, 2, 4, 8, 1, 1, 1, 2, 1, 1, 2, 4, 2, 2, 2, 4, 4, 4, 8, 16, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 1, 2, 2, 2, 4, 8, 2, 2, 2, 4, 2, 2, 4, 8, 4, 4, 4, 8, 8, 8, 16, 32, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 1, 2, 2, 2, 4, 8, 1, 1, 1, 2, 1, 1, 2, 4, 2, 2, 2, 4, 4, 4, 8, 16, 2, 2, 2, 4, 2
Offset: 0

Views

Author

N. J. A. Sloane, Jul 24 2014

Keywords

Comments

This sequence provides a bridge between A245180 (and, presumably, A160239) and A014081.
See A245196 for more about this class of sequences.
Run length transform of A011782: 1,1,2,4,8,16,32,64,... - Chai Wah Wu, Oct 19 2016

Crossrefs

Programs

  • Maple
    # This Maple program applies more generally to a sequence where the recurrence across a block is as follows. The parameters to be set are the sequence G(0), G(1), G(2), ... (the final terms in the blocks), and the multiplier m.
    # For n in the range 2^(k-1) <= n < 2^k, write n = 2^k-2^r+j, with 0 <= r <= k-1 and 0 <= j < 2^(r-1), and j=0 if r=0. Then
    # (if j=0) a(2^k-2^r) = G(k-r-1),
    # (if j>0) a(2^k-2^r+j) = m*G(k-r-1)*a(j).
    # Since Maple gives its lists an offset of 1, it is necessary to add 1 to the arguments of G.
    # For the present sequence, G(n)=2^n and m=1.
    G:=[seq(2^n,n=0..30)];
    m:=1;
    f:=proc(n) option remember; global m,G; local k,r,j,np;
    if n <= 2 then G[0+1] elif n=3 then G[1+1]
    elif n=4 then G[0+1] elif n=5 then m*G[0+1] elif n=6 then G[1+1] elif n=7 then G[2+1]
    else
       k:=1+floor(log[2](n)); np:=2^k-n;
       if np=1 then r:=0; j:=0; else r:=1+floor(log[2](np-1)); j:=2^r-np; fi;
       if j=0 then G[k-r-1+1]; else m*G[k-r-1+1]*f(j); fi;
    fi;
    end;
    [seq(f(n),n=1..520)]:
    # Setting G(n) = A083424(n) and m = 8 gives A245180. Setting G(n) = 2^n and m = 2 gives A048896.
    A245195:=n->add(binomial(n,2*k)*binomial(n,k) mod 2, k=0..floor(n/2)): seq(A245195(n), n=0..200); # Wesley Ivan Hurt, Nov 01 2016
  • Mathematica
    Table[Sum[Mod[Binomial[n, 2 k] Binomial[n, k], 2], {k, 0, n}], {n, 0, 85}] (* Michael De Vlieger, Oct 21 2016 *)
  • PARI
    a(n) = 2^hammingweight(bitand(n, n>>1)) \\ Charles R Greathouse IV, Jul 16 2016
    
  • PARI
    a(n) = sum(k=0, n, binomial(n, 2*k)*binomial(n,k) % 2); \\ Michel Marcus, Oct 21 2016
    
  • Python
    from _future_ import division
    def A277560(n):
        return sum(int(not (~n & 2*k) | (~n & k)) for k in range(n//2+1))
    
  • Python
    def A245195(n): return 1<<(n&(n>>1)).bit_count() # Chai Wah Wu, Feb 11 2023

Formula

The entries may be arranged into blocks of sizes 1,2,4,8,...:
B_0: 1,
B_1: 1, 2,
B_2: 1, 1, 2, 4,
B_3: 1, 1, 1, 2, 2, 2, 4, 8,
B_4: 1, 1, 1, 2, 1, 1, 2, 4, 2, 2, 2, 4, 4, 4, 8, 16,
B_5: 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 1, 2, 2, 2, 4, 8, 2, 2, 2, 4, 2, 2, 4, 8, 4, 4, 4, 8, 8, 8, 16, 32,
...
Consider the block B_{k-1} containing terms a(2^(k-1)), a(2^(k-1)+1), ..., a(2^k-1). It is convenient to index the terms working backwards from the next, 2^k-th, term. For n in the range 2^(k-1) <= n < 2^k, write n = 2^k-2^r+j, with 0 <= r <= k-1 and 0 <= j < 2^(r-1), and j=0 if r=0. Then
(if j=0) a(2^k-2^r) = 2^(k-r-1),
(if j>0) a(2^k-2^r+j) = 2^(k-r-1)*a(j).
a(n) = A162510(A005940(1+n)). - Antti Karttunen, Oct 29 2016
From Robert Israel, Nov 02 2016: (Start)
a(2*k) = a(k).
a(4*k+1) = a(k).
a(4*k+3) = 2*a(2*k+1).
G.f. g(x) satisfies g(x) = x + (2*x+1)*g(x^2) - x*g(x^4). (End)
Also, a(n) = Sum_{k=0..floor(n/2)} ((binomial(n,2k)*binomial(n,k)) mod 2). - Chai Wah Wu, Oct 19 2016 and Robert Israel, Nov 04 2016. For proof, see the article by Chai Wah Wu, Sums of products of binomial coefficients mod 2 and run length transforms of sequences, arXiv:1610.06166, or the Robert Israel link.

Extensions

Changed offset to 0, merged former entry A277560 from Chai Wah Wu (Oct 19 2016) with this sequence. - N. J. A. Sloane, Nov 05 2016

A350406 a(n) = [x^n] 1/(1 + x + x^2 + x^3)^n.

Original entry on oeis.org

1, -1, 1, -1, 5, -26, 91, -246, 597, -1540, 4576, -14521, 44915, -132328, 380290, -1102076, 3268437, -9838428, 29616364, -88538500, 263489380, -785026110, 2348923875, -7053379710, 21204016275, -63716916276, 191394838116, -575200476046, 1730575897202
Offset: 0

Views

Author

Seiichi Manyama, Dec 29 2021

Keywords

Crossrefs

Programs

  • Maple
    a := proc (n) option remember; if n = 0 then 1 elif n = 1 then -1 elif n = 2 then 1 else -(4*n*(n-1)*(5*n-9)*(550*n^3-1045*n^2+164*n+223)*a(n-1) + (n-1)*(5*n+1)*(5075*n^4-22330*n^3+33771*n^2-20232*n+4032)*a(n-2) + (16*n-24)*(4*n-5)*(4*n-7)*(5*n+1)*(5*n-3)*(5*n-4)*a(n-3))/(16*n*(n+1)*(n-1)*(5*n-4)*(5*n-8)*(5*n-9)) end if; end:
    seq(a(n), n = 0..30); # Peter Bala, Mar 18 2023
    a := n -> (-1)^n*hypergeom([1/4 - n/4, 1/2 - n/4, 3/4 - n/4, -n/4, n], [1/4, 1/2, 3/4, 1], 1): seq(simplify(a(n)), n = 0..28); # Peter Luschny, Mar 19 2023
  • Mathematica
    a[n_] := Coefficient[Series[1/(1 + x + x^2 + x^3)^n, {x, 0, n}], x, n]; Array[a, 30, 0] (* Amiram Eldar, Dec 29 2021 *)
  • PARI
    a(n) = (-1)^n*sum(k=0, n, binomial(n-1+k, k)*binomial(n, 4*k));

Formula

a(n) = (-1)^n * Sum_{k=0..n} binomial(n-1+k,k) * binomial(n,4*k).
From Peter Bala, Mar 17 2023: (Start)
a(n) = Sum_{k = 0..floor(n/2)} (-1)^(n-k)*binomial(n+k-1,k)*binomial(2*n-2*k-1,n-2*k).
16*n*(n+1)*(n-1)*(5*n-4)*(5*n-8)*(5*n-9)*a(n) = - ( 4*n*(n-1)*(5*n-9)* (550*n^3-1045*n^2+164*n+223)*a(n-1) + (n-1)*(5*n+1)*(5075*n^4-22330*n^3 +33771*n^2-20232*n+4032)*a(n-2) + 8*(2*n-3)*(4*n-5)*(4*n-7)*(5*n+1)*(5*n-3)*(5*n-4)*a(n-3) ).
Conjecture: the supercongruence a(n*p^r) == a(n*p^(r-1)) (mod p^(2*r)) holds for positive integers n and r and all primes p >= 5. (End)
a(n) = (-1)^n*hypergeom([1/4 - n/4, 1/2 - n/4, 3/4 - n/4, -n/4, n], [1/4, 1/2, 3/4, 1], 1). - Peter Luschny, Mar 19 2023

A214590 Number of nXnXn triangular 0..3 arrays with every horizontal row having the same average value.

Original entry on oeis.org

4, 8, 62, 1862, 187862, 63120962, 71200442882, 272199293130242, 3552472974642762242, 159161446682919676638722, 24593308418551382594861736962, 13156534644821921838477614251069442
Offset: 1

Views

Author

R. H. Hardin, Jul 22 2012

Keywords

Comments

Column 3 of A214595.
a(n) appears to equal 2*A386650(n) + 2 for n >= 1, where A386650(n) = product of first n quadrinomial coefficients (A005725). - Paul D. Hanna, Aug 20 2025

Examples

			Some solutions for n=4
.....2........2........2........2........2........1........2........2
....1.3......1.3......3.1......2.2......3.1......0.2......3.1......2.2
...1.3.2....3.2.1....2.3.1....3.0.3....0.3.3....1.0.2....2.3.1....3.0.3
..1.2.2.3..3.0.3.2..3.2.3.0..0.3.3.2..3.2.1.2..0.0.3.1..3.0.3.2..3.2.0.3
		

Crossrefs

Showing 1-10 of 15 results. Next