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 61-70 of 74 results. Next

A158494 Boundary area of the T-square fractal.

Original entry on oeis.org

4, 24, 80, 248, 768, 2360, 7200, 21848, 66048, 199160, 599520, 1802648, 5416128, 16264760, 48827040, 146546648, 439771008, 1319575160, 3959249760, 11878797848, 35638490688, 106919666360, 320767387680, 962318940248, 2886990375168, 8661038234360
Offset: 1

Views

Author

Andrew V. Sutherland, Mar 20 2009

Keywords

Comments

Consider the n-th iteration of the T-square fractal (as defined in the links) drawn on an integer lattice scaled so that the shortest edge on the boundary of the fractal has unit length a(n)gives the number of lattice squares in the unshaded region that are adjacent to a square in the shaded region. For n=1 there is a single shaded square and a(1) counts the 4 adjacent unshaded squares. Proposed by Simone Severini.

Crossrefs

Cf. A000392.

Programs

  • Mathematica
    CoefficientList[Series[4*(1 - 5*x^2 + 2*x^3 + 4*x^4)/((1 - x)*(1 - 2*x)*(1 - 3*x)), {x, 0, 30}], x] (* Wesley Ivan Hurt, Jan 20 2017 *)
  • PARI
    a(n)=4*((n==1)+(n==2)*6+(n>=3)*(1-2^(n-1)+23*3^(n-3))) \\ Jaume Oliver Lafont, Mar 22 2009
    
  • PARI
    Vec(4*x*(1-5*x^2+2*x^3+4*x^4) / ((1-x)*(1-2*x)*(1-3*x)) + O(x^30)) \\ Colin Barker, May 22 2017

Formula

a(1)=4, a(2)=24, a(3)=80; for n>3, a(n) = 3*a(n-1) + 2^n - 8.
G.f.: 4*x*(1 - 5*x^2 + 2*x^3 + 4*x^4) / ((1 - x)*(1 - 2*x)*(1 - 3*x)). - Jaume Oliver Lafont, Mar 21 2009
From Colin Barker, May 22 2017: (Start)
a(n) = 4 - 2^(n+1) + 92*3^(n-3) for n>2.
a(n) = 6*a(n-1) - 11*a(n-2) + 6*a(n-3) for n>5. (End)

Extensions

Edited by Charles R Greathouse IV, Oct 28 2009

A245023 Number of cases of tie (no winner) in the n-person rock-paper-scissors game.

Original entry on oeis.org

3, 3, 9, 39, 153, 543, 1809, 5799, 18153, 55983, 171009, 519159, 1569753, 4733823, 14250609, 42850119, 128746953, 386634063, 1160688609, 3483638679, 10454061753, 31368476703, 94118013009, 282379204839, 847187946153, 2541664501743, 7625194831809, 22875987148599, 68628766752153, 205887910869183, 617666953833009
Offset: 1

Views

Author

Jaeyool Park, Jul 10 2014

Keywords

Examples

			R, P, S = each Rock, Paper, Scissors. For n = 2 RR, PP, SS. 3 cases. and for n = 3 RRR, PPP, SSS, RPS, PRS, RSP, PSR, SPR, SRP. 9 cases.
RRS (and RSR, SRR) is not a tie case because there are two winners. SPP (and PPS, PSP) is not a tie case because there is a winner even though the 2nd and 3rd places cannot be determined.  - _Wolfdieter Lang_, Jul 31 2014
		

Crossrefs

Cf. A101052.

Programs

Formula

a(n) = 3^n - 3*(2^n-2) = 3 * A101052(n-1), n >= 1.
a(n) = 5*a(n-1)-5*a(n-2)-5*a(n-3)+6*a(n-4). - Colin Barker, Jul 26 2014
G.f.: -3*x*(8*x^2-5*x+1) / ((x-1)*(2*x-1)*(3*x-1)). - Colin Barker, Jul 26 2014
a(n) = 3 + 3!*S2(n, 3) with S2(n, k) = A008277(n, k) (Stirling numbers of the second kind). S2(n,3)= A000392(n). Proof: Use the formula given in A000392. Hint for an independent proof: consider the partition array A036040 for the multinomial M_3 numbers. Only partitions of n with number of parts m = 1, 2 and 3 matter here. Each partition defines a pattern for a multilist, like 2^1,3^2 defines the n=8, m=3 pattern [..][...][...]. The corresponding M_3 number 280 = C(8,2)*C(6,3)/2 gives the number of possibilities to form from objects, here R,R,P,P,P,S,S,S, lists of length 8 (the order is relevant). If m=1 then M_3 = 1 and for n one has 3 lists [n times R], [n times P] and [n times S] (no winner), If m=2 or 3 each of the M_3(n,m,j) (j=1..p(n,m), the number of partitions of n with m parts) comes 3! times from the permutation of the R, P and S symbols. The sum of the M_3 numbers over like m gives the Stirling2 numbers. If m=2 there are always winners for each n (only two symbols are present in each list). If m=1 or m=3 there is no winner. - Wolfdieter Lang, Aug 01 2014

Extensions

Typo in data fixed by Colin Barker, Jul 26 2014

A285852 Rectangular array read by rows: T(n,k) is the number of words of length n on alphabet {0,1,2} that have exactly k records, n>=0, 0<=k<=3.

Original entry on oeis.org

1, 0, 0, 0, 0, 3, 0, 0, 0, 6, 3, 0, 0, 14, 12, 1, 0, 36, 39, 6, 0, 98, 120, 25, 0, 276, 363, 90, 0, 794, 1092, 301, 0, 2316, 3279, 966, 0, 6818, 9840, 3025, 0, 20196, 29523, 9330, 0, 60074, 88572, 28501, 0, 179196, 265719, 86526
Offset: 0

Views

Author

Geoffrey Critzer, Apr 27 2017

Keywords

Comments

A record in a word a_1,a_2,...,a_n is a letter a_j that is larger than all the preceding letters. That is, a_j>a_i for all i

Examples

			1,    0,    0,   0;
0,    3,    0,   0;
0,    6,    3,   0;
0,   14,   12,   1;
0,   36,   39,   6;
0,   98,  120,  25;
0,  276,  363,  90;
0,  794, 1092, 301;
0, 2316, 3279, 966;
		

Crossrefs

Column k=0 gives A000007.
Column k=1 gives A001550.
Column k=2 gives A029858.
Column k=3 gives A000392.
Row sums give A000244.

Programs

  • Mathematica
    nn = 12;CoefficientList[Series[Product[1 + u z/(1 - j z), {j, 1, 3}], {z, 0, nn}], {z,u}] // Grid

Formula

G.f.: Product_{j=1..3} (1 + y*x/(1 - j*x)). Generally for words on alphabet {0,1,...,r} the o.g.f. is Product_{j=1..r} (1 + y*x/(1 - j*x)).

A372118 Square array A(n, k) = ((k+2)^(n+2) - 2 * (k+1)^(n+2) + k^(n+2))/2 for k, n >= 0 read by ascending antidiagonals.

Original entry on oeis.org

1, 3, 1, 7, 6, 1, 15, 25, 9, 1, 31, 90, 55, 12, 1, 63, 301, 285, 97, 15, 1, 127, 966, 1351, 660, 151, 18, 1, 255, 3025, 6069, 4081, 1275, 217, 21, 1, 511, 9330, 26335, 23772, 9751, 2190, 295, 24, 1, 1023, 28501, 111645, 133057, 70035, 19981, 3465, 385, 27, 1
Offset: 0

Author

Werner Schulte, Apr 19 2024

Keywords

Comments

Depending on some fixed integer m >= 0 we define a family of square arrays A(m; n, k) = (Sum_{i=0..m} (-1)^i * binomial(m, i) * (k + m - i)^(n+m)) / m! for k, n >= 0. Special cases are: A004248 (m=0), A343237 (m=1) and this array (m=2). The A(m; n, k) satisfy: A(m; n, k) = (k+m) * A(m; n-1, k) + A(m-1; n, k) with initial values A(0; n, k) = k^n and A(m; 0, k) = 1.
Further properties are conjectures:
(1) O.g.f. of column k is Prod_{i=k..k+m} 1 / (1 - i * t);
(2) E.g.f. of row n is exp(x) * (Sum_{k=0..n} binomial(k+m, m) * A048993(n+m, k+m) * x^k);
(3) The LU decompositions of these arrays are given by the upper triangular matrix U which is the transpose of A007318 and the lower triangular matrix L, where L is defined L(m; n, k) = A048993(n+m, k+m) * (k+m)! / m!, i.e., A(m; n, k) = Sum_{i=0..k} L(m; n, i) * binomial(k, i).
The three conjectures are true, see links. - Sela Fried, Jul 07 2024

Examples

			Square array A(n, k) starts:
n\k :    0     1       2       3        4         5         6         7
=======================================================================
  0 :    1     1       1       1        1         1         1         1
  1 :    3     6       9      12       15        18        21        24
  2 :    7    25      55      97      151       217       295       385
  3 :   15    90     285     660     1275      2190      3465      5160
  4 :   31   301    1351    4081     9751     19981     36751     62401
  5 :   63   966    6069   23772    70035    170898    365001    706104
  6 :  127  3025   26335  133057   481951   1398097   3463615   7628545
  7 :  255  9330  111645  724260  3216795  11075670  31794105  79669320
  etc.
		

Crossrefs

Rows: A000012 (n=0), A008585 (n=1), A227776 (n=2).
Columns: A000225 (k=0), A000392 (k=1), A016269 (k=2), A016753 (k=3), A016103 (k=4), A019757 (k=5), A020570 (k=6), A020782 (k=7).
Main diagonal: A281596(n+2).

Programs

  • Mathematica
    A372118[n_, k_] := ((k+2)^(n+2) - 2*(k+1)^(n+2) + k^(n+2))/2;
    Table[A372118[n-k, k], {n, 0, 10}, {k, 0, n}] (* Paolo Xausa, Jul 10 2024 *)
  • PARI
    A(n, k) = ((k+2)^(n+2) - 2 * (k+1)^(n+2) + k^(n+2))/2

Formula

A(n, k) = (k+2) * A(n-1, k) + (k+1)^(n+1) - k^(n+1) for n > 0.
Conjectures:
(1) O.g.f. of column k is Prod_{i=k..k+2} 1 / (1 - i * t);
(2) E.g.f. of row n is exp(x) * (Sum_{k=0..n} binomial(k+2, 2) * A048993(n+2, k+2) * x^k);
(3) The LU decomposition of this array is given by the upper triangular matrix U which is the transpose of A007318 and the lower triangular matrix L, where L is defined L(n, k) = A048993(n+2, k+2) * (k+2)! / 2!, i.e., A(n, k) = Sum_{i=0..k} L(n, i) * binomial(k, i).
The three conjectures are true. See comments. - Sela Fried, Jul 09 2024

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

Original entry on oeis.org

1, 12, 86, 480, 2307, 10044, 40792, 157440, 584693, 2107596, 7420218, 25634880, 87207559, 292924668, 973531964, 3206704800, 10482373305, 34042285260, 109930177630, 353238247200, 1130137576331, 3601849005372, 11440208166816, 36225346150080, 114391746903037, 360325587293004
Offset: 0

Author

Seiichi Manyama, May 12 2025

Keywords

Crossrefs

Column k=3 of A383843.

Programs

  • PARI
    a(n) = sum(k=0, n, stirling(k+3, 3, 2)*stirling(n-k+3, 3, 2));

Formula

a(n) = 12*a(n-1) - 58*a(n-2) + 144*a(n-3) - 193*a(n-4) + 132*a(n-5) - 36*a(n-6).
a(n) = Sum_{k=0..n} Stirling2(k+3,3) * Stirling2(n-k+3,3).

A016198 Expansion of g.f. 1/((1-x)*(1-2*x)*(1-5*x)).

Original entry on oeis.org

1, 8, 47, 250, 1281, 6468, 32467, 162590, 813461, 4068328, 20343687, 101722530, 508620841, 2543120588, 12715635707, 63578244070, 317891351421, 1589457019248, 7947285620527, 39736429151210, 198682147853201, 993410743460308, 4967053725690147, 24835268645227950
Offset: 0

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Programs

Formula

a(n) = (25*5^n - 16*2^n + 3)/12. - Bruno Berselli, Feb 09 2011
a(n) = [(5^0-2^0) + (5^1-2^1) + ... + (5^n-2^n)]/3. - r22lou(AT)cox.net, Nov 14 2005
a(0)=1, a(n) = 5*a(n-1) + 2^(n+1) - 1. - Vincenzo Librandi, Feb 07 2011
From Elmo R. Oliveira, Mar 26 2025: (Start)
E.g.f.: exp(x)*(25*exp(4*x) - 16*exp(x) + 3)/12.
a(n) = 8*a(n-1) - 17*a(n-2) + 10*a(n-3).
a(n) = A016127(n+1) - A003463(n+2). (End)

Extensions

More terms from Wesley Ivan Hurt, May 05 2014

A118979 O.g.f: -12*x^3/(-1+x)/(-1+2*x)/(-1+3*x) = -2-2/(-1+3*x)-6/(-1+x)+6/(-1+2*x) .

Original entry on oeis.org

12, 72, 300, 1080, 3612, 11592, 36300, 111960, 342012, 1038312, 3139500, 9467640, 28501212, 85700232, 257493900, 773268120, 2321377212, 6967277352, 20908123500, 62736953400, 188236026012, 564758409672, 1694375892300
Offset: 3

Author

Roger L. Bagula, May 25 2006

Keywords

Comments

Negative of the determinant of a series of 3 X 3 matrices, related to Stirling's numbers of the second kind by a factor of 12 (cf. A000392, A028243).

Crossrefs

Programs

  • Mathematica
    M = {{1, 1, 1}, {2^n, 4, 2}, {3^n, 9, 3}} a = Table[ -Det[M], {n, 3, 30}]

Formula

Let M = {{1, 1, 1}, {2^n, 4, 2}, {3^n, 9, 3}}. Then a(n) = -Det[M]
a(n) = 6*(1-2^n)+2*3^n = 12*A000392(n).

Extensions

Edited by N. J. A. Sloane, Dec 13 2007

A126679 Product_{i=3..n} Stirling_2(i,3).

Original entry on oeis.org

1, 6, 150, 13500, 4063500, 3925341000, 11874156525000, 110785880378250000, 3157508376660503250000, 273206569798926704209500000, 71477668823644198988810437500000, 56393736371790563676201770874375000000, 133940819650376139577910502205498936875000000, 956563276525616170757609342853980880495071250000000
Offset: 3

Author

N. J. A. Sloane, Feb 13 2007

Keywords

Crossrefs

Partial products of A000392.

A133789 Let P(A) denote the power set of an n-element set A. Then a(n) = the number of pairs of elements {x,y} of P(A) for which either 0) x and y are disjoint and for which x is not a subset of y and y is not a subset of x, 1) x and y are disjoint and for which either x is a subset of y or y is a subset of x, or 2) x and y intersect but for which x is not a subset of y and y is not a subset of x.

Original entry on oeis.org

0, 1, 4, 16, 70, 316, 1414, 6196, 26590, 112156, 466774, 1923076, 7863310, 31972396, 129459334, 522571156, 2104535230, 8460991036, 33972711094, 136277478436, 546270602350, 2188566048076, 8764718254054, 35090241492916, 140455083984670, 562102715143516
Offset: 0

Author

Ross La Haye, Jan 03 2008, Jan 08 2008

Keywords

Comments

Also, number of even binomial coefficient in rows 0 to 2^n of Pascal's triangle. [Aaron Meyerowitz, Oct 29 2013]

Examples

			a(3) = 16 because for P(A) = {{},{1},{2},{3},{1,2},{1,3},{2,3},{1,2,3}} we see that
{1} and {2},
{1} and {3},
{2} and {3},
{1} and {2,3},
{2} and {1,3},
{3} and {1,2}
are disjoint, while
{} and {1},
{} and {2},
{} and {3},
{} and {1,2},
{} and {1,3},
{} and {2,3},
{} and {1,2,3}
are disjoint and one is a subset of the other and
{1,2} and {1,3},
{1,2} and {2,3},
{1,3} and {2,3}
are intersecting, but neither is a subset of the other.
Also, through row 8 of Pascal's triangle the a(3)=16 even entries are 2 (so a(0)=0 and a(1)=1) then 4,6,4 (so a(2)=4) then 10,10 then  6,20,6 then 8,28,56,70,56,28,8. [_Aaron Meyerowitz_, Oct 29 2013]
		

Formula

a(n) = (1/2)(4^n - 2*3^n + 3*2^n - 2).
O.g.f.: x*(1-6*x+11*x^2)/[(-1+x)*(-1+2*x)*(-1+3*x)*(-1+4*x)]. - R. J. Mathar, Jan 11 2008
a(n) = A084869(n)-1 = A016269(n-2)+2^n-1. - Vladeta Jovovic, Jan 04 2008, corrected by Eric Rowland, May 15 2017
a(n) = 3*StirlingS2(n+1,4) + StirlingS2(n+1,3) + StirlingS2(n+1,2). - Ross La Haye, Jan 11 2008
a(n) = 3*StirlingS2(n+1,4) + StirlingS2(n+1,3) + StirlingS2(n+1,2). - Ross La Haye, Jan 11 2008
a(n) = 10*a(n-1)-35*a(n-2)+50*a(n-3)-24*a(n-4). [Aaron Meyerowitz, Oct 29 2013]

Extensions

Edited by N. J. A. Sloane, Jan 20 2008 to incorporate suggestions from several contributors.

A134063 a(n) = (1/2)*(3^n - 2^(n+1) + 3).

Original entry on oeis.org

1, 1, 2, 7, 26, 91, 302, 967, 3026, 9331, 28502, 86527, 261626, 788971, 2375102, 7141687, 21457826, 64439011, 193448102, 580606447, 1742343626, 5228079451, 15686335502, 47063200807, 141197991026, 423610750291, 1270865805302, 3812664524767, 11438127792026
Offset: 0

Author

Ross La Haye, Jan 11 2008

Keywords

Comments

Let P(A) be the power set of an n-element set A. Then a(n-1) = the number of pairs of elements {x,y} of P(A) for which either 0) x and y are disjoint and for which x is not a subset of y and y is not a subset of x, or 1) x and y are intersecting and for which either x is a proper subset of y or y is a proper subset of x, or 2) x = y.
The inverse binomial transform yields A033484 with another leading 1. - R. J. Mathar, Jul 06 2009

Examples

			a(3) = 7 because for P(A) = {{},{1},{2},{1,2}} we have: case 0 {{1},{2}}, case 1 {{1},{1,2}}, {{2},{1,2}}, case 2 {{},{}}, {{1},{1}}, {{2},{2}}, {{1,2},{1,2}}.
		

Crossrefs

Programs

  • Maple
    f := n -> (1/2)*(3^n - 2^(n+1) + 3);
  • Mathematica
    Table[(3^n-2^(n+1)+3)/2,{n,0,30}] (* or *) LinearRecurrence[{6,-11,6},{1,1,2},30] (* Harvey P. Dale, May 05 2020 *)

Formula

a(n) = 3*StirlingS2(n,3) + StirlingS2(n,2) + 1.
a(n) = StirlingS2(n+1,3) + 1. - Ross La Haye, Jan 21 2008
a(n) = 6 a(n-1)-11 a(n-2) +6 a(n-3) (n >= 3). Also a(n) = 4 a(n-1)-3 a(n-2)+ 2^{n-2} (n >= 3). - Tian-Xiao He (the(AT)iwu.edu), Jul 02 2009
G.f.: -(1-4*x+6*x^2)/((x-1)*(3*x-1)*(2*x-1)). a(n+1)-a(n)=A001047(n+1). [R. J. Mathar, Jul 06 2009]

Extensions

Edited by N. J. A. Sloane, Jul 06 2009
Previous Showing 61-70 of 74 results. Next