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 21-30 of 38 results. Next

A177882 Trisection of A001317.

Original entry on oeis.org

1, 15, 85, 771, 4369, 65535, 327685, 3342387, 16843009, 252645135, 1431655765, 12884901891, 73014444049, 1095216660735, 5519032976645, 56294136361779, 281479271743489, 4222189076152335, 23925738098196565
Offset: 0

Views

Author

Vladimir Shevelev, Dec 14 2010

Keywords

Comments

For n>=1, all terms are in A001969.
Or rows of triangle A008287 mod 2 converted to decimal.

Crossrefs

Programs

  • Mathematica
    f[n_] := BitXor[n, BitShiftLeft[n, 1]]; Table[Nest[f, 1, x], {x, 0, 54, 3}]
  • PARI
    a(n) = subst(lift(Pol(Mod([1, 1, 1, 1], 2), 'x)^n), 'x, 2);
    vector(19, n, a(n-1))  \\ Gheorghe Coserea, Jun 12 2016
    
  • Python
    def A177882(n): return sum((bool(~(3*n)&3*n-k)^1)<Chai Wah Wu, May 02 2023

Formula

a(n) = A001317(3*n).

Extensions

Definition rewritten by N. J. A. Sloane, Jan 01 2011

A120987 Triangle read by rows: T(n,k) is the number of ternary words of length n with k strictly increasing runs (0 <= k <= n; for example, the ternary word 2|01|12|02|1|1|012|2 has 8 strictly increasing runs).

Original entry on oeis.org

1, 0, 3, 0, 3, 6, 0, 1, 16, 10, 0, 0, 15, 51, 15, 0, 0, 6, 90, 126, 21, 0, 0, 1, 77, 357, 266, 28, 0, 0, 0, 36, 504, 1107, 504, 36, 0, 0, 0, 9, 414, 2304, 2907, 882, 45, 0, 0, 0, 1, 210, 2850, 8350, 6765, 1452, 55, 0, 0, 0, 0, 66, 2277, 14355, 25653, 14355, 2277, 66, 0, 0, 0, 0, 12
Offset: 0

Views

Author

Emeric Deutsch, Jul 23 2006

Keywords

Comments

Sum of entries in row n is 3^n (A000244).
Sum of entries in column k is A099464(k+1) (a trisection of the tribonacci numbers).
Row n contains 1 + floor(2n/3) nonzero terms.
T(n,n) = (n+1)*(n+2)/2 (the triangular numbers (A000217)).
Sum_{k=0..n} k*T(n,k) = (2n+1)*3^(n-1) = 3*A081038(n-1) for n >= 1.
T(n,k) = A120987(n,n-k).

Examples

			T(5,2) = 6 because we have 012|01, 012|02, 012|12, 01|012, 02|012 and 12|012 (the runs are separated by |).
Triangle starts:
  1;
  0,   3;
  0,   3,   6;
  0,   1,  16,  10;
  0,   0,  15,  51,  15;
  0,   0,   6,  90, 126,  21;
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd. ed., 1994, p. 24, p. 154.

Crossrefs

Nb(s,2,q) = A027907(q,s). - Giuliano Cabrele, Dec 11 2015

Programs

  • Maple
    G:=1/(1-3*t*z-3*t*(1-t)*z^2-t*(1-t)^2*z^3): Gser:=simplify(series(G,z=0,33)): P[0]:=1: for n from 1 to 13 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 0 to 12 do seq(coeff(P[n],t,j),j=0..n) od; # yields sequence in triangular form
  • Mathematica
    Flatten[Table[Sum[(-1)^j*Binomial[n + 1, j]*Binomial[3 k - 3 j, n], {j, 0, k}], {n, 0, 10}, {k, 0, n}]] (* G. C. Greubel, Dec 20 2015 *)
  • MuPAD
    // binomial c. defined as in linked document
    Cb:=(x,m)->if(0<=m and is(m in Z), binomial(x,m), 0):
    // closed formula derived and proved in the linked document
    // Qsc(r,q,m) with r=2
    T(n,k):=(n,k)->_plus((-1)^(k-j)*Cb(n+1,k-j)*Cb(3*j, n)$j=0..k):
    // Giuliano Cabrele, Dec 11 2015

Formula

T(n,k) = trinomial(n+1,3n-3k+2) = trinomial(n+1,3k-n) (conjecture).
G.f.: 1/(1-3tz-3t(1-t)z^2-t(1-t)^2*z^3).
Can anyone prove the conjecture (either from the g.f. or combinatorially from the definition)?
From Giuliano Cabrele, Mar 02 2008: (Start)
The conjecture is compatible with the g.f., which can be rewritten as (1-t)/(1-t(1+(1-t)z)^3) and expanded to give T(n,k) = Sum_{j=0..k} (-1)^(k-j)*C(3j, n)*C(n+1, k-j) = Sum_{j=0..k} (-1)^j*C(n+1,j)*C(3k-3j,n) = trinomial(n+1,3k-n) = A027907(n+1,3k-n).
Also (1-t)/(1-t(1+(1-t)z)^2) equals the g.f. for the case of binary words, A119900, where Sum_{j=0..k} (-1)^(k-j)*C(2j,n)*C(n+1,k-j) = C(n+1,2k-n). Changing the exponent to 1 gives 1/(1-zt), the g.f. for the case of unary words, the expansion coefficients of which can be written as Kronecker delta(k-n)^(n+1) = Sum_{j=0..k} (-1)^(k-j)*C(j, n)*C(n+1,k-j).
So the conjecture shifts to that the g.f. is (1-t)/(1-t(1+(1-t)z)^m) and coefficients T(m,n,k) = Sum_{j=0..k} (-1)^(k-j)*C(mj,n)*C(n+1, k-j) may apply to the general case of m-ary words. (End)
Sum_{k=0..n} T(n,k) *(-1)^(n-k) = A157241(n+1). - Philippe Deléham, Oct 25 2011
The generalized conjecture above can in fact be proved, as described in the file "Words Partitioned according to Number of Strictly Increasing Runs" linked above. - Giuliano Cabrele, Dec 11 2015

A349813 Triangle read by rows: row 1 is [3]; for n >= 1, row n gives coefficients of expansion of (-3 - x + x^2 + 3*x^3)*(1 + x + x^2 + x^3)^(n-1) in order of increasing powers of x.

Original entry on oeis.org

3, -3, -1, 1, 3, -3, -4, -3, 0, 3, 4, 3, -3, -7, -10, -10, -4, 4, 10, 10, 7, 3, -3, -10, -20, -30, -31, -20, 0, 20, 31, 30, 20, 10, 3, -3, -13, -33, -63, -91, -101, -81, -31, 31, 81, 101, 91, 63, 33, 13, 3, -3, -16, -49, -112, -200, -288, -336, -304, -182, 0, 182, 304, 336, 288, 200, 112, 49, 16, 3
Offset: 0

Views

Author

N. J. A. Sloane, Dec 23 2021

Keywords

Comments

The row polynomials can be further factorized, since -3 - x + x^2 + 3*x^3 = -(1-x)*(3 + 4*x + 3*x^2) and 1 + x + x^2 + x^3 = (1+x)*(1+x^2).
The rule for constructing this triangle (ignoring row 0) is the same as that for A008287: each number is the sum of the four numbers immediately above it in the previous row. Here row 1 is [-3, -1, 1, 3] instead of [1, 1, 1, 1].

Examples

			Triangle begins:
   3;
  -3,  -1,   1,   3;
  -3,  -4,  -3,   0,   3,    4,   3;
  -3,  -7, -10, -10,  -4,    4,  10,  10,  7,  3;
  -3, -10, -20, -30, -31,  -20,   0,  20, 31, 30,  20, 10,  3;
  -3, -13, -33, -63, -91, -101, -81, -31, 31, 81, 101, 91, 63, 33, 13, 3;
  ...
		

Crossrefs

The right half of the triangle gives A349814.

Programs

  • Maple
    t1:=-3-x+x^2+3*x^3;
    m:=1+x+x^2+x^3;
    lprint([3]);
    for n from 1 to 12 do
    w1:=expand(t1*m^(n-1));
    w4:=series(w1,x,3*n+1);
    w5:=seriestolist(w4);
    lprint(w5);
    od:

A005719 Quadrinomial coefficients.

Original entry on oeis.org

2, 12, 40, 101, 216, 413, 728, 1206, 1902, 2882, 4224, 6019, 8372, 11403, 15248, 20060, 26010, 33288, 42104, 52689, 65296, 80201, 97704, 118130, 141830, 169182, 200592, 236495, 277356, 323671, 375968, 434808, 500786, 574532, 656712, 748029, 849224, 961077
Offset: 2

Views

Author

Keywords

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n)= A008287(n, 5), n >= 2 (sixth column of quadrinomial coefficients).

Programs

Formula

a(n)= binomial(n, 2)*(n^3+11*n^2+46*n-24)/60, n >= 2.
G.f.: (x^2)*(2-2*x^2+x^3)/(1-x)^6. (numerator polynomial is N4(5, x) from A063421.)
a(n) = 2*binomial(n,2) + 6*binomial(n,3) + 4*binomial(n,4) + binomial(n,5) (see comment in A071675). - Vladimir Shevelev and Peter J. C. Moses, Jun 22 2012

A005720 Quadrinomial coefficients.

Original entry on oeis.org

1, 10, 44, 135, 336, 728, 1428, 2598, 4455, 7282, 11440, 17381, 25662, 36960, 52088, 72012, 97869, 130986, 172900, 225379, 290444, 370392, 467820, 585650, 727155, 895986, 1096200, 1332289, 1609210, 1932416, 2307888, 2742168, 3242393, 3816330, 4472412, 5219775
Offset: 2

Views

Author

Keywords

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n)= A008287(n, 6), n >= 2 (seventh column of quadrinomial coefficients).

Programs

  • Maple
    A005720:=-(1+3*z-5*z**2+2*z**3)/(z-1)**7; [Conjectured by Simon Plouffe in his 1992 dissertation.]
  • Mathematica
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{1,10,44,135,336,728,1428},40] (* or *) Table[Binomial[n+1,3] (n^3+15n^2+86n-120)/120,{n,2,41}] (* Harvey P. Dale, Jun 23 2011 *)
  • PARI
    a(n)=(n^6 + 15*n^5 + 85*n^4 - 135*n^3 - 86*n^2 + 120*n)/720 \\ Charles R Greathouse IV, Jun 23 2011

Formula

a(n)= binomial(n+1, 3)*(n^3+15*n^2+86*n-120)/120, n >= 2.
G.f.: (x^2)*(1+3*x-5*x^2+2*x^3)/(1-x)^7. (numerator polynomial is N4(6, x) from A063421).
a(0)=1, a(1)=10, a(2)=44, a(3)=135, a(4)=336, a(5)=728, a(6)=1428, a(n)=7*a(n-1)-21*a(n-2)+35*a(n-3)-35*a(n-4)+21*a(n-5)-7*a(n-6)+a(n-7). - Harvey P. Dale, Jun 23 2011
a(n) = binomial(n,2) + 7*binomial(n,3) + 10*binomial(n,4) + 5*binomial(n,5) + binomial(n,6) (see comment in A071675). - Vladimir Shevelev and Peter J. C. Moses, Jun 22 2012

A163181 T(n,k) is the number of weak compositions of k into n parts no greater than (n-1) for n>=1, 0<=k<=n(n-1).

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 6, 7, 6, 3, 1, 1, 4, 10, 20, 31, 40, 44, 40, 31, 20, 10, 4, 1, 1, 5, 15, 35, 70, 121, 185, 255, 320, 365, 381, 365, 320, 255, 185, 121, 70, 35, 15, 5, 1, 1, 6, 21, 56, 126, 252, 456, 756, 1161, 1666, 2247, 2856, 3431, 3906, 4221, 4332, 4221, 3906, 3431
Offset: 1

Views

Author

Geoffrey Critzer, Jul 22 2009

Keywords

Comments

T(n,k) is the number of length n sequences on an alphabet of {0,1,2,...,n-1} that have a sum of k. Equivalently T(n,k) is the number of functions f:{1,2,...,n}->{0,1,2,...,n-1} such that Sum(f(i)=k, i=1...n).
Row n is also row n of the array of q-nomial coefficients. - Matthew Vandermast, Oct 31 2010

Examples

			T(3,4) = 6 because there are 6 ternary sequences of length three that sum to 4: [0, 2, 2], [1, 1, 2], [1, 2, 1], [2, 0, 2], [2, 1, 1], [2, 2, 0].
		

Crossrefs

The maximum of row n is in column k=n(n-1)/2 = A000217(n-1).
For q-nomial arrays, see A000012, A007318, A027907, A008287, A035343, A063260, A063265, A171890. See also A181567. - Matthew Vandermast, Oct 31 2010

Programs

  • Maple
    b:= proc(n, k, l) option remember; `if`(k=0, 1,
          `if`(l=0, 0, add(b(n, k-j, l-1), j=0..min(n-1, k))))
        end:
    T:= (n, k)-> b(n, k, n):
    seq(seq(T(n, k), k=0..n*(n-1)), n=1..8);  # Alois P. Heinz, Feb 21 2013
  • Mathematica
    (*warning very inefficient*) Table[Distribution[Map[Total, Strings[Range[n], n]]], {n, 1, 6}]//Grid
    nn=100;Table[CoefficientList[Series[Sum[x^i,{i,0,n-1}]^n,{x,0,nn}],x],{n,1,10}]//Grid (* Geoffrey Critzer, Feb 21 2013*)

Formula

O.g.f. for row n is ((1-x^n)/(1-x))^n. For k<=(n-1), T(n,k) = C(n+k-1,k).

A349815 Triangle read by rows: row 1 is [1]; for n >= 1, row n gives coefficients of expansion of (-1 - x + x^2 + x^3)*(1 + x + x^2 + x^3)^(n-1) in order of increasing powers of x.

Original entry on oeis.org

1, -1, -1, 1, 1, -1, -2, -1, 0, 1, 2, 1, -1, -3, -4, -4, -2, 2, 4, 4, 3, 1, -1, -4, -8, -12, -13, -8, 0, 8, 13, 12, 8, 4, 1, -1, -5, -13, -25, -37, -41, -33, -13, 13, 33, 41, 37, 25, 13, 5, 1, -1, -6, -19, -44, -80, -116, -136, -124, -74, 0, 74, 124, 136, 116, 80, 44, 19, 6, 1, -1, -7, -26, -70, -149, -259, -376, -456, -450, -334, -124, 124, 334, 450, 456, 376, 259, 149, 70, 26, 7, 1
Offset: 0

Views

Author

N. J. A. Sloane, Dec 23 2021

Keywords

Comments

The row polynomials can be further factorized, since -3 - x + x^2 + 3*x^3 = -(1-x)*(1+x)^2 and 1 + x + x^2 + x^3 = (1+x)*(1+x^2).
The rule for constructing this triangle (ignoring row 0) is the same as that for A008287: each number is the sum of the four numbers immediately above it in the previous row. Here row 1 is [-1, -1, 1, 3] instead of [1, 1, 1, 1].
This is a companion to A008287 and A349813.

Examples

			Triangle begins:
   1;
  -1, -1,   1,   1;
  -1, -2,  -1,   0,   1,   2,   1;
  -1, -3,  -4,  -4,  -2,   2,   4,   4,  3,  1;
  -1, -4,  -8, -12, -13,  -8,   0,   8, 13, 12,  8,  4,  1;
  -1, -5, -13, -25, -37, -41, -33, -13, 13, 33, 41, 37, 25, 13, 5, 1;
  ...
		

Crossrefs

The right half of the triangle gives A349816. For the central nonzero entries see A349818.

Programs

  • Maple
    t1:=-1-x+x^2+x^3;
    m:=1+x+x^2+x^3;
    lprint([3]);
    for n from 1 to 12 do
    w1:=expand(t1*m^(n-1));
    w4:=series(w1,x,3*n+1);
    w5:=seriestolist(w4);
    lprint(w5);
    od:

A349933 Array read by ascending antidiagonals: the s-th column gives the central s-binomial coefficients.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 6, 3, 1, 1, 20, 19, 4, 1, 1, 70, 141, 44, 5, 1, 1, 252, 1107, 580, 85, 6, 1, 1, 924, 8953, 8092, 1751, 146, 7, 1, 1, 3432, 73789, 116304, 38165, 4332, 231, 8, 1, 1, 12870, 616227, 1703636, 856945, 135954, 9331, 344, 9, 1, 1, 48620, 5196627, 25288120, 19611175, 4395456, 398567, 18152, 489, 10, 1
Offset: 0

Views

Author

Stefano Spezia, Dec 06 2021

Keywords

Examples

			The array begins:
n\s |   0     1     2     3     4
----+----------------------------
  0 |   1     1     1     1     1 ...
  1 |   1     2     3     4     5 ...
  2 |   1     6    19    44    85 ...
  3 |   1    20   141   580  1751 ...
  4 |   1    70  1107  8092 38165 ...
  ...
		

Crossrefs

Cf. A000984 (s=1), A082758 (s=2), A005721 (s=3), A349936 (s=4), A063419 (s=5), A270918 (n=s), A163269 (s>0).

Programs

  • Mathematica
    T[n_,k_,s_]:=If[k==0,1,Coefficient[(Sum[x^i,{i,0,s}])^n,x^k]]; A[n_,s_]:=T[2n,s n,s]; Flatten[Table[A[n-s,s],{n,0,9},{s,0,n}]]

Formula

A(n, s) = T(2*n, s*n, s), where T(n, k, s) is the s-binomial coefficient defined as the coefficient of x^k in (Sum_{i=0..s} x^i)^n.

A005726 Quadrinomial coefficients.

Original entry on oeis.org

1, 2, 6, 20, 65, 216, 728, 2472, 8451, 29050, 100298, 347568, 1208220, 4211312, 14712960, 51507280, 180642391, 634551606, 2232223626, 7862669700, 27727507521, 97884558992, 345891702456, 1223358393120, 4330360551700
Offset: 1

Views

Author

Keywords

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Programs

  • Maple
    for n from 1 to 40 do printf(`%d,`,coeff(expand(sum(x^j, j=0..3)^n), x, n-1)) od:
    F := (t-1)^2*(t^2+1)^2/(2*t^3-t^2+1);  G := t/((t-1)*(t^2+1)); Ginv := RootOf(numer(G-x),t);  ogf := series(eval(F,t=Ginv),x=0,20); # Mark van Hoeij, Oct 30 2011
  • Mathematica
    Table[Sum[Binomial[n,k]Binomial[n,2k+1],{k,0,Floor[n/2]}],{n,30}] (* Harvey P. Dale, Oct 19 2013 *)

Formula

a(n) = Sum_{k=0..floor(n/2)}, C(n,k) C(n,2k+1). - Paul Barry, May 15 2003
a(n) = Sum[(-1)^k binomial[n,k] binomial[2n-2-4k,n-1],{k,0,Floor[(n-1)/4]}]. - David Callan, Jul 03 2006
G.f.: F(G^(-1)(x)) where F(t) = (t-1)^2*(t^2+1)^2/(2*t^3-t^2+1) and G(t) = t/((t-1)*(t^2+1)). - Mark van Hoeij, Oct 30 2011
Conjecture: 2*(n-1)*(2*n+1)*(13*n-14)*a(n) +(-143*n^3+297*n^2-148*n+12) *a(n-1) -4*(n-1)*(26*n^2-41*n+9)*a(n-2) -16*(n-1)*(n-2)*(13*n-1) *a(n-3)=0. - R. J. Mathar, Nov 13 2012
a(n) = A008287(n,n-1). - Sean A. Irvine, Aug 15 2016

Extensions

More terms from James Sellers, Aug 21 2000

A064055 Ninth column of quadrinomial coefficients.

Original entry on oeis.org

3, 31, 155, 546, 1554, 3823, 8451, 17205, 32802, 59268, 102388, 170261, 273975, 428418, 653242, 973998, 1423461, 2043165, 2885169, 4014076, 5509328, 7467801, 10006725, 13266955, 17416620, 22655178, 29217906
Offset: 0

Views

Author

Wolfdieter Lang, Aug 29 2001

Keywords

Crossrefs

A001919 (eighth column).

Programs

  • Mathematica
    Table[3Binomial[n+3,3]+19Binomial[n+3,4]+30Binomial[n+3,5]+21 Binomial[n+3,6]+ 7 Binomial[n+3,7]+ Binomial[n+3,8],{n,0,30}] (* Harvey P. Dale, Apr 30 2022 *)

Formula

a(n)= A008287(n+3, 8)= binomial(n+3, 3)*(n^5+46*n^4+875*n^3+7118*n^2+23880*n+20160)/(8!/3!), n >= 0.
G.f.: (3+4*x-16*x^2+15*x^3-6*x^4+x^5 )/(1-x)^9, numerator polynomial is N4(8, x) from the array A063421.
a(n) = 3*C(n+3,3) + 19*C(n+3,4) + 30*C(n+3,5) + 21*C(n+3,6) + 7*C(n+3,7) + C(n+3,8) (see comment in A071675). - Vladimir Shevelev and Peter J. C. Moses, Jun 22 2012
Previous Showing 21-30 of 38 results. Next