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 101-110 of 135 results. Next

A160175 Expansion of 1/(1 - 2*x - 2*x^2 - 2*x^3 - 2*x^4).

Original entry on oeis.org

1, 2, 6, 18, 54, 160, 476, 1416, 4212, 12528, 37264, 110840, 329688, 980640, 2916864, 8676064, 25806512, 76760160, 228319200, 679123872, 2020019488, 6008445440, 17871816000, 53158809600, 158118181056, 470314504192, 1398926621696, 4161036233088
Offset: 0

Views

Author

Geoffrey Critzer, May 03 2009, May 06 2009

Keywords

Comments

a(n) is the number of ways two opposing baseball teams could score a combined total of n runs (tallying the score just prior to each "batter up!") considering the order of the scoring as important. Equivalently, a(n) is the number of 2-colored tilings of an n-board with tiles of length at most 4.
a(n) is the number of compositions (ordered partitions) of n into parts <= 4 with 2 sorts of each part. - Joerg Arndt, Aug 06 2019

References

  • Arthur Benjamin and Jennifer Quinn, Proofs that Really Count, Mathematical Association of America, 2003, p. 36.

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/(1-2*x-2*x^2-2*x^3-2*x^4))); // G. C. Greubel, Sep 24 2018
  • Mathematica
    RecurrenceTable[{a[n] == 2(a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4]), a[0] == 1, a[1] == 2, a[2] == 6, a[3] == 18}, a, {n, 0, 20}]
    LinearRecurrence[{2,2,2,2},{1,2,6,18},30] (* Harvey P. Dale, Oct 27 2013 *)
    CoefficientList[Series[1/(1-2*x-2*x^2-2*x^3-2*x^4), {x, 0, 50}], x] (* G. C. Greubel, Sep 24 2018 *)
  • PARI
    x='x+O('x^30); Vec(1/(1-2*x-2*x^2-2*x^3-2*x^4)) \\ G. C. Greubel, Sep 24 2018
    

Formula

a(n) = 2*(a(n-1) + a(n-2) + a(n-3) + a(n-4)).

Extensions

More terms from Harvey P. Dale, Oct 27 2013

A181297 Triangle read by rows: T(n,k) is the number of 2-compositions of n having k even entries (0<=k<=n).

Original entry on oeis.org

1, 0, 2, 1, 0, 6, 0, 8, 0, 16, 3, 0, 35, 0, 44, 0, 28, 0, 132, 0, 120, 8, 0, 160, 0, 460, 0, 328, 0, 92, 0, 748, 0, 1528, 0, 896, 21, 0, 642, 0, 3117, 0, 4916, 0, 2448, 0, 290, 0, 3552, 0, 12062, 0, 15456, 0, 6688, 55, 0, 2380, 0, 17119, 0, 44318, 0, 47760, 0, 18272, 0, 888, 0
Offset: 0

Views

Author

Emeric Deutsch, Oct 12 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.
For the statistics "number of odd entries" see A181295.

Examples

			T(2,2) = 6 because we have (0 / 2), (2 / 0), (1,0 / 0,1), (0,1 / 1,0), (1,1 / 0,0), (0,0 / 1,1) (the 2-compositions are written as (top row / bottom row)).
Triangle starts:
  1;
  0,2;
  1,0,6;
  0,8,0,16;
  3,0,35,0,44;
		

Crossrefs

Programs

  • Maple
    G := (1-z^2)^2/(1-3*z^2+z^4-2*s*z-2*s^2*z^2+s^2*z^4): Gser := simplify(series(G, z = 0, 15)): for n from 0 to 11 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 11 do seq(coeff(P[n], s, k), k = 0 .. n) end do; # yields sequence in triangular form

Formula

G.f.: G(t,z) = (1-z^2)^2/(1-3*z^2+z^4-2*s*z-2*s^2*z^2+s^2*z^4).
The g.f. H(t,s,z), where z marks the size of the 2-composition and t (s) marks the number of odd (even) entries, is H=1/(1-h), where h=z(t+sz)(2s+tz-sz^2)/(1-z^2)^2.
Sum_{k=0..n} T(n,k) = A003480(n).
T(2*n-1,0) = 0.
T(2*n,0) = A000045(2*n) (Fibonacci numbers).
T(n,k) = 0 if n and k have opposite parities.
T(n,n) = A002605(n+1).
Sum_{k=0..n} k*T(n,k) = A181298(n).

A199324 Triangle T(n,k), read by rows, given by (-1,1,-1,0,0,0,0,0,0,0,...) DELTA (1,0,0,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, -1, 1, 0, -1, 1, 1, -1, -1, 1, -1, 3, -2, -1, 1, 0, -2, 5, -3, -1, 1, 1, -2, -2, 7, -4, -1, 1, -1, 5, -7, -1, 9, -5, -1, 1, 0, -3, 12, -15, 1, 11, -6, -1, 1, 1, -3, -3, 21, -26, 4, 13, -7, -1, 1, -1, 7, -15, 3, 31, -40, 8, 15, -8, -1, 1, 0, -4, 22, -42
Offset: 0

Views

Author

Philippe Deléham, Nov 12 2011

Keywords

Examples

			Triangle begins :
1
-1, 1
0, -1, 1
1, -1, -1, 1
-1, 3, -2, -1, 1
0, -2, 5, -3, -1, 1
1, -2, -2, 7, -4, -1, 1
-1, 5, -7, -1, 9, -5, -1, 1
		

Crossrefs

Cf. A026729, A063967, A129267, A176971 (diagonals sums).

Formula

T(n,k)=T(n-1,k-1)+T(n-2,k-1)-T(n-1,k)-T(n-2,k), T(0,0)=1.
G.f.: 1/(1-(y-1)*x-(y-1)*x^2).
Sum_{k, 0<=k<=n}T(n,k)*x^k = A000748(n), A108520(n), A049347(n), A000007(n), A000045(n+1), A002605(n+1), A030195(n+1), A057087(n), A057088(n), A057089(n), A057090(n), A057091(n), A057092(n), A057093(n) for x = -2,-1,0,1,2,3,4,5,6,7,8,9,10,11 respectively.

A368155 Triangular array T(n,k), read by rows: coefficients of strong divisibility sequence of polynomials p(1,x) = 1, p(2,x) = 1 + 3*x, p(n,x) = u*p(n-1,x) + v*p(n-2,x) for n >= 3, where u = p(2,x), v = 1 - 3*x - 2*x^2.

Original entry on oeis.org

1, 1, 3, 2, 3, 7, 3, 9, 5, 15, 5, 15, 26, 3, 31, 8, 30, 43, 63, -15, 63, 13, 54, 104, 87, 144, -81, 127, 21, 99, 203, 273, 115, 333, -275, 255, 34, 177, 416, 549, 609, -9, 806, -789, 511, 55, 315, 811, 1263, 1146, 1260, -725, 2043, -2071, 1023, 89, 555, 1573
Offset: 1

Views

Author

Clark Kimberling, Jan 20 2024

Keywords

Comments

Because (p(n,x)) is a strong divisibility sequence, for each integer k, the sequence (p(n,k)) is a strong divisibility sequence of integers.

Examples

			First eight rows:
   1
   1    3
   2    3     7
   3    9     5    15
   5   15    26     3    31
   8   30    43    63   -15    63
  13   54   104    87   144   -81    127
  21   99   203   273   115   333   -275   255
Row 4 represents the polynomial p(4,x) = 3 + 9*x + 5*x^2 + 15*x^3, so (T(4,k)) = (3,9,5,15), k=0..3.
		

Crossrefs

Cf. A000045 (column 1); A000225, (p(n,n-1)); A001787 (row sums), (p(n,1)); A002605 (alternating row sums), (p(n,-1)); A004254, (p(n,-2)); A057084, (p(n,-3)); A094440, A367208, A367209, A367210, A367211, A367297, A367298, A367299, A367300, A367301, A368150, A368151, A368152, A368153, A368154, A368156.

Programs

  • Mathematica
    p[1, x_] := 1; p[2, x_] := 1 + 3 x; u[x_] := p[2, x]; v[x_] := 1 - 3x - 2x^2;
    p[n_, x_] := Expand[u[x]*p[n - 1, x] + v[x]*p[n - 2, x]]
    Grid[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]
    Flatten[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]

Formula

p(n,x) = u*p(n-1,x) + v*p(n-2,x) for n >= 3, where p(1,x) = 1, p(2,x) = 1 + 3*x, u = p(2,x), and v = 1 - 3*x - 2*x^2.
p(n,x) = k*(b^n - c^n), where k = -1/sqrt(5 - 6*x + x^2), b = (1/2)*(3*x + 1 - 1/k), c = (1/2)*(2*x + 1 + 1/k).

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

Original entry on oeis.org

1, 2, 5, 12, 30, 76, 196, 512, 1352, 3600, 9648, 25984, 70240, 190400, 517184, 1406976, 3831936, 10445056, 28488448, 77735936, 212186624, 579320832, 1581966336, 4320477184, 11800692736, 32233951232
Offset: 0

Views

Author

Keywords

Comments

Number of (s(0), s(1), ..., s(n+1)) such that 0 < s(i) < 6 and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n+1, s(0) = 1, s(n+1) = 2. - Herbert Kociemba, Jun 17 2004

Crossrefs

First differences are in A094297.
Cf. A002605.

Programs

Formula

a(n) = (3*2^(n+1) - sqrt(3)*(1-sqrt(3))^(n+1) + sqrt(3)*(1+sqrt(3))^(n+1))/12. - Herbert Kociemba, Jun 17 2004
2*a(n) = 2^n + A002605(n+1). - R. J. Mathar, Sep 11 2019
a(n) = 4*a(n-1)-2*a(n-2)-4*a(n-3). - Wesley Ivan Hurt, May 14 2021

A052611 Expansion of e.g.f. 1/(1-2*x-2*x^2).

Original entry on oeis.org

1, 2, 12, 96, 1056, 14400, 236160, 4515840, 98703360, 2426941440, 66305433600, 1992646656000, 65328154214400, 2320237766246400, 88746105588940800, 3636883029491712000, 158978387626426368000, 7383729547341987840000
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Crossrefs

Programs

  • Magma
    [n le 2 select n else 2*(n-1)*Self(n-1) + 2*(n-1)*(n-2)*Self(n-2): n in [1..41]]; // G. C. Greubel, Jan 31 2023
    
  • Maple
    spec := [S,{S=Sequence(Union(Z,Z,Prod(Z,Union(Z,Z))))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    With[{nn=20},CoefficientList[Series[1/(1-2x-2x^2),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Apr 14 2015 *)
    Table[n!*(-I*Sqrt[2])^(n)*ChebyshevU[n,I/Sqrt[2]], {n,0,40}] (* G. C. Greubel, Jan 31 2023 *)
  • SageMath
    A002605=BinaryRecurrenceSequence(2,2,0,1)
    def A052611(n): return factorial(n)*A002605(n+1)
    [A052611(n) for n in range(41)] # G. C. Greubel, Jan 31 2023

Formula

E.g.f.: 1/(1 - 2*x - 2*x^2).
a(n) = 2^n * A080599(n).
a(n) = 2*n*a(n+1) + 2*n*(n-1)*a(n), a(0) = 1, a(1) = 2.
a(n) = (n!/6) * Sum_{p = RootOf(2*z^2+2*z-1)} (1+2*p)*p^(-n-1).
a(n) = n!*A002605(n+1). - R. J. Mathar, Nov 27 2011

A072946 Coefficient of the highest power of q in the expansion of nu(0)=1, nu(1)=b and for n>=2, nu(n)=b*nu(n-1)+lambda*(n-1)_q*nu(n-2) with (b,lambda)=(2,2), where (n)_q=(1+q+...+q^(n-1)) and q is a root of unity.

Original entry on oeis.org

1, 2, 6, 4, 12, 8, 24, 16, 48, 32, 96, 64, 192, 128, 384, 256, 768, 512, 1536, 1024, 3072, 2048, 6144, 4096, 12288, 8192, 24576, 16384, 49152, 32768, 98304, 65536, 196608, 131072, 393216, 262144, 786432, 524288, 1572864, 1048576, 3145728, 2097152
Offset: 0

Views

Author

Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 21 2002

Keywords

Comments

Instead of listing the coefficients of the highest power of q in each nu(n), if we listed the coefficients of the smallest power of q (i.e., constant terms), we get a weighted Fibonacci numbers described by f(0)=1, f(1)=1, for n>=2, f(n)=2f(n-1)+2f(n-2).

Examples

			nu(0)=1,
nu(1)=2,
nu(2)=6,
nu(3)=16+4q,
nu(4)=44+20q+12q^2,
nu(5)=120+80q+64q^2+40q^3+8q^4,
nu(6)=328+288q+280q^2+232q^3+168q^4+64q^5+24q^6.
By listing the coefficients of the highest power in each nu(n) we get 1,2,6,4,12,8,24,...
		

Crossrefs

Essentially the same as A162255 and A164073.
Cf. A002605.

Programs

  • Mathematica
    LinearRecurrence[{0,2},{1,2,6},50] (* Harvey P. Dale, Dec 31 2015 *)

Formula

For given b and lambda, the recurrence relation is given by; t(0)=1, t(1)=b, t(2)=b^2+lambda and for n>=3, t(n)=lambda*T(n-2).
O.g.f.: (1+2*x+4*x^2)/(1-2*x^2). - R. J. Mathar, Dec 05 2007

Extensions

More terms from R. J. Mathar, Dec 05 2007

A084157 a(n) = 8*a(n-1) - 16*a(n-2) + 12*a(n-4) with a(0)=0, a(1)=1, a(2)=4, a(3)=22.

Original entry on oeis.org

0, 1, 4, 22, 112, 556, 2704, 13000, 62080, 295312, 1401664, 6644320, 31472896, 149017792, 705395968, 3338614912, 15800258560, 74772443392, 353840161792, 1674425579008, 7923565146112, 37494981225472, 177428889407488
Offset: 0

Views

Author

Paul Barry, May 16 2003

Keywords

Comments

Binomial transform of A084156.

Crossrefs

Programs

  • Magma
    I:=[0,1,4,22]; [n le 4 select I[n] else 8*Self(n-1) -16*Self(n-2) +12*Self(n-4): n in [1..41]]; // G. C. Greubel, Oct 11 2022
    
  • Mathematica
    LinearRecurrence[{8,-16,0,12},{0,1,4,22},30] (* Harvey P. Dale, Feb 19 2017 *)
  • SageMath
    A083881 = BinaryRecurrenceSequence(6,-6,1,3)
    A026150 = BinaryRecurrenceSequence(2,2,1,1)
    def A084157(n): return (A083881(n) - A026150(n))/2
    [A084157(n) for n in range(41)] # G. C. Greubel, Oct 11 2022

Formula

a(n) = (A083881(n) - A026150(n))/2.
a(n) = 8*a(n-1) - 16*a(n-2) + 12*a(n-4).
a(n) = ((3+sqrt(3))^n + (3-sqrt(3))^n - (1+sqrt(3))^n - (1-sqrt(3))^n)/4.
G.f.: x*(1-4*x+6*x^2)/((1-2*x-2*x^2)*(1-6*x+6*x^2)).
E.g.f.: exp(2*x)*sinh(x)*cosh(sqrt(3)*x).
From G. C. Greubel, Oct 11 2022: (Start)
a(2*n) = A003462(n)*A026150(2*n) = A003462(n)*A080040(2*n)/2.
a(2*n+1) = (1/2)*(3^(n+1)*A002605(2*n+1) - A026150(2*n+1)). (End)

A086404 Square array of numbers T(n,k) = ((1+sqrt(3))*(k+sqrt(3))^n-(1-sqrt(3))*(k-sqrt(3))^n)/(2*sqrt(3)), read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 6, 3, 1, 4, 11, 16, 9, 1, 5, 18, 41, 44, 9, 1, 6, 27, 84, 153, 120, 27, 1, 7, 38, 151, 396, 571, 328, 27, 1, 8, 51, 248, 857, 1872, 2131, 896, 81, 1, 9, 66, 381, 1644, 4893, 8856, 7953, 2448, 81, 1, 10, 83, 556, 2889, 10984, 28003, 41904, 29681
Offset: 0

Views

Author

Paul Barry, Jul 19 2003

Keywords

Examples

			Rows begin
  1, 1,  3,   3,   9, ...
  1, 2,  6,  16,  44, ...
  1, 3, 11,  41, 153, ...
  1, 4, 18,  84, 396, ...
  1, 5, 27, 151, 857, ...
		

Crossrefs

Rows include A002605, A079935, A086405. Main diagonal is A086406. Rows are successive binomial transforms of (1, 1, 3, 3, 9, 9, ...).
Cf. A086350.

A099040 Riordan array (1, 2+2x).

Original entry on oeis.org

1, 0, 2, 0, 2, 4, 0, 0, 8, 8, 0, 0, 4, 24, 16, 0, 0, 0, 24, 64, 32, 0, 0, 0, 8, 96, 160, 64, 0, 0, 0, 0, 64, 320, 384, 128, 0, 0, 0, 0, 16, 320, 960, 896, 256, 0, 0, 0, 0, 0, 160, 1280, 2688, 2048, 512, 0, 0, 0, 0, 0, 32, 960, 4480, 7168, 4608, 1024, 0, 0, 0, 0, 0, 0, 384, 4480, 14336, 18432, 10240, 2048
Offset: 0

Views

Author

Paul Barry, Sep 23 2004

Keywords

Comments

Row sums give A002605. Diagonal sums give A052907.
The Riordan array (1,s+t*x) defines T(n,k) = binomial(k,n-k)*s^k*(t/s)^(n-k). The row sums satisfy a(n) = s*a(n-1) + t*a(n-2) and the diagonal sums satisfy a(n) = s*a(n-2) + t*a(n-3).
T(n,k) is the number of compositions of n into two types of parts of size 1 and 2 that have exactly k parts. - Geoffrey Critzer, Aug 18 2012.
Triangle T(n,k), 0<=k<=n, read by rows, given by [0, 1, -1, 0, 0, 0, 0, ...] DELTA [2, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Sep 22 2020

Examples

			Rows begin {1}, {0,2}, {0,2,4}, {0,0,8,8}, {0,0,4,24,16}, {0,0,0,24,64,32},...
T(3,2)=8 because we have: 1+2,1+2',1'+2,1'+2',2+1,2+1',2'+1,2'+1' where a part of the second type is designated by '. - _Geoffrey Critzer_, Aug 18 2012
		

Crossrefs

Programs

  • Mathematica
    nn = 8; CoefficientList[Series[1/(1 - 2 y x - 2 y x^2), {x, 0, nn}], {x, y}] // Grid  (* Geoffrey Critzer, Aug 18 2012 *)

Formula

Number triangle T(n, k) = 2^k*binomial(k, n-k).
Columns have g.f. (2x+2x^2)^k.
T(n,k) = A026729(n,k)*2^k. - Philippe Deléham, Jul 28 2006
O.g.f.: 1/(1-2*y*x-2*y*x^2). - Geoffrey Critzer, Aug 18 2012.
Previous Showing 101-110 of 135 results. Next