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 22 results. Next

A208519 Triangle of coefficients of polynomials v(n,x) jointly generated with A208518; see the Formula section.

Original entry on oeis.org

1, 2, 2, 3, 5, 3, 4, 9, 11, 5, 5, 14, 26, 23, 8, 6, 20, 50, 65, 45, 13, 7, 27, 85, 145, 150, 86, 21, 8, 35, 133, 280, 385, 329, 160, 34, 9, 44, 196, 490, 840, 952, 692, 293, 55, 10, 54, 276, 798, 1638, 2310, 2232, 1413, 529, 89, 11, 65, 375, 1230, 2940, 4956
Offset: 1

Views

Author

Clark Kimberling, Feb 28 2012

Keywords

Comments

coefficient of x^(n-1): Fibonacci(n+1) = A000045(n+1)
col 1: A000027
col 2: A000096
col 3: A051925
row sums: A002878 (bisection of Lucas sequence)
alternating row sums: A000045(n-2), Fibonacci numbers

Examples

			First five rows:
1
2...2
3...5....3
4...9....11...5
5...14...26...23...8
First five polynomials v(n,x):
1
2 + 2x
3 + 5x + 3x^2
4 + 9x + 11x^2 + 5x^3
5 + 14x + 26x^2 + 23x^3 + 8x^4
		

Crossrefs

Cf. A208518.

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + x*v[n - 1, x];
    v[n_, x_] := x*u[n - 1, x] + (x + 1)*v[n - 1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]   (* A208518 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]   (* A208519 *)

Formula

u(n,x)=u(n-1,x)+x*v(n-1,x),
v(n,x)=x*u(n-1,x)+(x+1)*v(n-1,x)+1,
where u(1,x)=1, v(1,x)=1.

A210755 Triangle of coefficients of polynomials u(n,x) jointly generated with A210756; see the Formula section.

Original entry on oeis.org

1, 2, 3, 3, 11, 7, 4, 26, 38, 17, 5, 50, 124, 121, 41, 6, 85, 314, 499, 362, 99, 7, 133, 679, 1555, 1805, 1043, 239, 8, 196, 1316, 4054, 6672, 6096, 2926, 577, 9, 276, 2352, 9318, 20326, 26048, 19610, 8049, 1393, 10, 375, 3948, 19482, 53932, 90706
Offset: 1

Views

Author

Clark Kimberling, Mar 25 2012

Keywords

Comments

Row n starts with n and ends with A001333(n).
Column 2: A051925
Row sums: A002450
Alternating row sums: 1,-1,-1,-1,-1,-1,...
For a discussion and guide to related arrays, see A208510.

Examples

			First five rows:
1
2...3
3...11...7
4...26...38....17
5...50...124...121...41
First three polynomials u(n,x): 1, 2 + 3x, 3 + 11x + 7x^2.
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := (x + 1)*u[n - 1, x] + 2 x*v[n - 1, x] + 1;
    v[n_, x_] := (x + 1)*u[n - 1, x] + (x + 1)*v[n - 1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A210755 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A210756 *)
    Table[u[n, x] /. x -> 1, {n, 1, z}]  (* A002450 *)
    Table[v[n, x] /. x -> 1, {n, 1, z}]  (* A002450 *)

Formula

u(n,x)=(x+1)*u(n-1,x)+2x*v(n-1,x)+1,
v(n,x)=(x+1)*u(n-1,x)+(x+1)*v(n-1,x)+1,
where u(1,x)=1, v(1,x)=1.

A104634 Triangle T(n,k) = (k-1-n)*(k-2-n)*(k+2*n)/6, 1<=k<=n.

Original entry on oeis.org

1, 5, 2, 14, 8, 3, 30, 20, 11, 4, 55, 40, 26, 14, 5, 91, 70, 50, 32, 17, 6, 140, 112, 85, 60, 38, 20, 7, 204, 168, 133, 100, 70, 44, 23, 8, 285, 240, 196, 154, 115, 80, 50, 26, 9, 385, 330, 276, 224, 175, 130, 90, 56, 29, 10, 506, 440, 375, 312, 252, 196, 145, 100, 62, 32, 11, 650, 572, 495, 420, 348, 280, 217, 160, 110, 68, 35, 12, 819, 728, 638, 550, 465, 384
Offset: 1

Views

Author

Gary W. Adamson, Mar 18 2005

Keywords

Examples

			The first few rows are:
1;
5, 2;
14, 8, 3;
30, 20, 11, 4;
55, 40, 26, 14, 5;
91, 70, 50, 32, 17, 6;
...
		

Crossrefs

Cf. A000330 (column 1), A007290 (column 2), A051925 (column 3), A001296 (row sums), A104633, A000332.

Programs

  • Magma
    [[(k-1-n)*(k-2-n)*(k+2*n)/6: k in [1..n]]: n in [1..20]]; // G. C. Greubel, Aug 12 2018
  • Maple
    A104634 := proc(n,k) (k-1-n)*(k-2-n)*(k+2*n)/6 ; end proc:
    seq(seq(A104634(n,k),k=1..n),n=1..15) ; # R. J. Mathar, Aug 31 2011
  • Mathematica
    Table[(k-1-n)*(k-2-n)*(k+2*n)/6, {n, 1, 20}, {k, 1, n}] // Flatten (* G. C. Greubel, Aug 12 2018 *)
  • PARI
    for(n=1,20, for(k=1,n, print1((k-1-n)*(k-2-n)*(k+2*n)/6, ", "))) \\ G. C. Greubel, Aug 12 2018
    

Formula

The triangle is created by the matrix product A002260 * A004736, both infinite lower triangular matrices.

Extensions

Definition in closed form provided by R. J. Mathar, Aug 31 2011

A110952 Triangle read by rows: T(n,k) = number of permutations of [n] where the first increasing run has length k and the last increasing run has length n-k-1, 0

Original entry on oeis.org

1, 3, 3, 6, 11, 6, 10, 26, 26, 10, 15, 50, 71, 50, 15, 21, 85, 155, 155, 85, 21, 28, 133, 295, 379, 295, 133, 28, 36, 196, 511, 799, 799, 511, 196, 36, 45, 276, 826, 1519, 1849, 1519, 826, 276, 45, 55, 375, 1266, 2674, 3829, 3829, 2674, 1266, 375, 55, 66, 495, 1860
Offset: 3

Views

Author

David Scambler, Nov 22 2006

Keywords

Comments

Permutations of [n] with exactly 2 descents and the descents are adjacent. Adjusting for initial index: row sums are A045618; first diagonal is A000217, the triangular numbers; 2nd diagonal is A051925; and 3rd diagonal is A001701, generalized Stirling numbers.

Examples

			Triangle (beginning with n=3, k=1) is:
   1
   3  3
   6 11  6
  10 26 26 10
  15 50 71 50 15
  ...
For n=5, k = 2: T(5,2) = 11 = permutations of [5] with first run 2 long and last run 5-2-1 = 2 long, namely {14325, 15324, 15423, 24315, 25314, 25413, 34215, 35214, 35412, 45213, 45312}.
		

Crossrefs

Formula

T(n,k) = k*C(n,k+1) - C(n,k) + 1.

A264750 Number of sequences of 5 throws of an n-sided die (with faces numbered 1, 2, ..., n) in which the sum of the throws first reaches or exceeds n on the 5th throw.

Original entry on oeis.org

5, 29, 99, 259, 574, 1134, 2058, 3498, 5643, 8723, 13013, 18837, 26572, 36652, 49572, 65892, 86241, 111321, 141911, 178871, 223146, 275770, 337870, 410670, 495495, 593775, 707049, 836969, 985304, 1153944, 1344904, 1560328, 1802493, 2073813, 2376843, 2714283
Offset: 5

Views

Author

Louis Rogliano, Nov 23 2015

Keywords

Comments

Sequence gives the second column of A185508. [Bruno Berselli, Nov 24 2015]
Number of 5-tuples (t_1, ..., t_5) with 1 <= t_j <= n, Sum_{j <= 4} t_j < n and Sum_{j<=5} t_j >= n. - Robert Israel, Nov 25 2015

Examples

			From _Jon E. Schoenfield_, Nov 26 2015: (Start)
For n=5, the a(5) = 5 sequences (i.e., quintuples or 5-tuples) are {1,1,1,1,1}, {1,1,1,1,2}, {1,1,1,1,3}, {1,1,1,1,4} and {1,1,1,1,5}. (Each of the first four throws must be a 1; otherwise, the sum of the throws would reach or exceed 5 before the 5th throw.)
For n=6, each of the quintuples must have four throws whose sum is less than 6, followed by a fifth throw that brings the sum to at least 6, so the a(6) = 29 quintuples are the 5 quintuples {1,1,1,1,t_5} where t_5 is any value in 2..6 and the four sets of 6 quintuples {1,1,1,2,t_5}, {1,1,2,1,t_5}, {1,2,1,1,t_5} and {2,1,1,1,t_5} where t_5 is any value in 1..6. (End)
		

Crossrefs

Cf. A000096 (k=2), A051925 (k=3), A215862 (k=4).
Cf. A185508.

Programs

  • Magma
    [(n-4)*(n-3)*(n-2)*(n-1)*(4*n+5)/120: n in [5..40]]; // Vincenzo Librandi, Nov 24 2015
    
  • Maple
    A264750:=n->(n-4)*(n-3)*(n-2)*(n-1)*(4*n+5)/120: seq(A264750(n), n=5..50); # Wesley Ivan Hurt, Nov 24 2015
  • Mathematica
    f[n_, k_] := Module[
    {i, total = 0, part, perm},
    part = IntegerPartitions[n, {k}];
    perm = Flatten[Table[Permutations[part[[i]]], {i, 1, Length[part]}],      1];
    For[i = 1, i <= Length[perm], i++,    total += n + 1 - perm[[i, k]]    ];
    Return[total];   ]
    And the sequences are obtained by:
    h[k_] := Table[f[i, k], {i, k, number_of_terms_wanted}]
    Table[(n - 4) (n - 3) (n - 2) (n - 1) (4 n + 5)/120, {n, 5, 40}] (* Bruno Berselli, Nov 24 2015 *)
  • PARI
    Vec(x^5*(5-x)/(1-x)^6 + O(x^100)) \\ Colin Barker, Nov 23 2015
    
  • PARI
    for(n=5, 40, print1((n-4)*(n-3)*(n-2)*(n-1)*(4*n+5)/120", ")); \\ Bruno Berselli, Nov 24 2015
    
  • Sage
    [(n-4)*(n-3)*(n-2)*(n-1)*(4*n+5)/120 for n in (5..40)] # Bruno Berselli, Nov 24 2015

Formula

From Colin Barker, Nov 23 2015: (Start)
a(n) = (n - 4)*(n - 3)*(n - 2)*(n - 1)*(4*n + 5)/120.
a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6) for n>10.
G.f.: x^5*(5 - x) / (1 - x)^6. (End)

Extensions

Offset changed by Robert Israel, Nov 25 2015
Formulae, b-file adapted to the new offset and definition rephrased by the Editors of the OEIS, Nov 26 2015

A047732 First differences are A005563.

Original entry on oeis.org

1, 4, 12, 27, 51, 86, 134, 197, 277, 376, 496, 639, 807, 1002, 1226, 1481, 1769, 2092, 2452, 2851, 3291, 3774, 4302, 4877, 5501, 6176, 6904, 7687, 8527, 9426, 10386, 11409, 12497, 13652, 14876, 16171, 17539, 18982, 20502, 22101, 23781, 25544, 27392, 29327
Offset: 0

Views

Author

Patternfinder(AT)webtv.net (Robert Newstedt)

Keywords

Comments

Number of 3-permutations of n elements avoiding the patterns 132, 321. See Bonichon and Sun. - Michel Marcus, Aug 19 2022

Crossrefs

Programs

  • Magma
    I:=[1, 4, 12, 27]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jun 28 2012
  • Mathematica
    CoefficientList[Series[(1+2*x^2-x^3)/((1-x)^4),{x,0,50}],x] (* Vincenzo Librandi, Jun 28 2012 *)
    LinearRecurrence[{4,-6,4,-1},{1,4,12,27},50] (* Harvey P. Dale, Aug 22 2015 *)

Formula

a(n) = A051925(n+1) + 1. - Alex Ratushnyak, Jun 27 2012
From Vincenzo Librandi, Jun 28 2012: (Start)
G.f.: (1 + 2*x^2 - x^3)/(1-x)^4.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
a(n) = (2*n^3 + 9*n^2 + 7*n + 6)/6. (End)
a(n) = A000330(n+1) - n. - John Tyler Rascoe, Jun 24 2022

A145068 Zero followed by partial sums of A059100, starting at n=1.

Original entry on oeis.org

0, 3, 9, 20, 38, 65, 103, 154, 220, 303, 405, 528, 674, 845, 1043, 1270, 1528, 1819, 2145, 2508, 2910, 3353, 3839, 4370, 4948, 5575, 6253, 6984, 7770, 8613, 9515, 10478, 11504, 12595, 13753, 14980, 16278, 17649, 19095, 20618, 22220, 23903, 25669
Offset: 1

Views

Author

Keywords

Examples

			a(2) = a(1) + 1^2 + 2 = 0 + 1 + 2 = 3; a(3) = a(2) + 2^2 + 2 = 3 + 4 + 2 = 9.
		

Crossrefs

Cf. A059100 (n^2+2), A002522 (n^2 + 1), A145066 (partial sums of A002522, starting at n=1), A008865 (n^2 - 2), A145067 (zero followed by partial sums of A008865), A005563 ((n+1)^2 - 1), A051925 (zero followed by partial sums of A005563).

Programs

  • Mathematica
    lst={0};s=0;Do[s+=n^2+2;AppendTo[lst,s],{n,5!}];lst
  • PARI
    {a=-2; for(n=0, 42, print1(a=a+n^2+2, ","))}

Formula

G.f.: x*(3-3*x+2*x^2)/(1-x)^4.
a(1) = 0; a(n) = sum_{j=1..n-1} A059100(j) = a(n-1) + (n-1)^2 + 2 for n > 1.

Extensions

Edited by Klaus Brockhaus, Oct 21 2008

A194130 a(n) = n!/gcd(n,3).

Original entry on oeis.org

1, 2, 2, 24, 120, 240, 5040, 40320, 120960, 3628800, 39916800, 159667200, 6227020800, 87178291200, 435891456000, 20922789888000, 355687428096000, 2134124568576000, 121645100408832000, 2432902008176640000, 17030314057236480000, 1124000727777607680000
Offset: 1

Views

Author

Paul Curtz, Aug 16 2011

Keywords

Crossrefs

Programs

  • Maple
    A194130 := proc(n)
            n!/igcd(n,3) ;
    end proc:
    seq(A194130(n),n=1..30) ;
  • Mathematica
    Table[n!/GCD[n,3],{n,20}] (* Harvey P. Dale, Aug 08 2019 *)

Extensions

Definition and offset corrected by R. J. Mathar, Aug 18 2011

A206492 Sums of rows of the sequence of triangles with nonnegative integers and row widths defined by A004738.

Original entry on oeis.org

0, 3, 3, 9, 21, 19, 11, 25, 45, 74, 66, 49, 26, 55, 90, 134, 190, 170, 138, 97, 50, 103, 162, 230, 310, 405, 365, 310, 243, 167, 85, 173, 267, 370, 485, 615, 763, 693, 605, 502, 387, 263, 133, 269, 411, 562, 725, 903, 1099, 1316, 1204, 1071, 920, 754, 576, 389
Offset: 1

Views

Author

Alex Ratushnyak, Jun 28 2012

Keywords

Comments

Row widths: A004738(n): 1, 2, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5...
Pits: A051925(n+1): 0, 3, 11, 26, 50, 85, 133, 196, 276, 375, 495, 638...
Peak tops: A007290(n+3): 2, 8, 20, 40, 70, 112, 168, 240, 330, 440, 572...
Peak bases: A084990(n+1): 1, 6, 17, 36, 65, 106, 161, 232, 321, 430, 561...

Examples

			The sequence of triangles begins:
0
1 2
3
4 5
6 7 8
9 10
11
12 13
14 15 16
17 18 19 20
21 22 23
24 25
26
27 28
29 30 31
32 33 34 35
36 37 38 39 40
41 42 43 44
45 46 47
48 49
50
51 52
		

Crossrefs

Cf. A027480: sums of rows of a triangle with increasing row widths: 0; 1,2; 3,4,5; 6,7,8,9; ...

Programs

  • Python
    curSign=-1
    curLength=sum=0
    rowLength=topLength=1
    for n in range(1232):
        sum += n
        curLength += 1
        if curLength==rowLength:
            print(sum, end=',')
            curLength = sum = 0
            if rowLength==1 or rowLength==topLength:
                curSign = -curSign
            topLength += (rowLength==1)
            rowLength += curSign

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

Original entry on oeis.org

1, 3, 1, 11, -2, 26, -10, 50, -25, 85, -49, 133, -84, 196, -132, 276, -195, 375, -275, 495, -374, 638, -494, 806, -637, 1001, -805, 1225, -1000, 1480, -1224, 1768, -1479, 2091, -1767, 2451, -2090, 2850, -2450, 3290, -2849, 3773, -3289, 4301, -3772, 4876, -4300, 5500, -4875, 6175, -5499, 6903, -6174, 7686, -6902
Offset: 0

Views

Author

Stefano Maruelli, Dec 19 2013

Keywords

Comments

The sequence can be generated in the following way:
--------------------------- --------------------------
[0] [1] [2] [3] [4] ... [i]
--------------------------- --------------------------
[0] 1, 1, 1, 1, 1, ... t(0,i) = 1
[1] 7, 6, 5, 4, 3, ... t(1,i) = t(1,i-1) - t(0,i)
[2] 19, 13, 8, 4, 1, ... t(2,i) = t(2,i-1) - t(1,i)
[3] 37, 24, 16, 12, 11, ... t(3,i) = t(3,i-1) - t(2,i)
[4] 61, 37, 21, 9, -2, ... t(4,i) = t(4,i-1) - t(3,i)
[5] 91, 54, 33, 24, 26, ... etc.
[6] 127, 73, 40, 16, -10, ...
[7] 169, 96, 56, 40, 50, ...
[8] 217, 121, 65, 25, -25, ...
[9] 271, 150, 85, 60, 85, ...
...
Column 0 is A003215;
column 1 is A032528;
column 2 is A001082;
column 3 is A241496;
column 4 is this sequence.
The third differences are 16, -35, 64, -105, 160, ..., a signed variant of A077415. - R. J. Mathar, Apr 18 2014

Crossrefs

Cf. A077415; A058373: a(2k) = -A058373(k); A051925: a(2k+1) = A051925(k+2).
Columns of the table in Comments section: A001082, A003215, A032528.

Programs

  • Mathematica
    Table[1 + n (n + 5) (9 - (2 n + 5) (-1)^n)/48, {n, 0, 60}] (* Bruno Berselli, Apr 22 2014 *)
    CoefficientList[Series[(1+4x+x^2)/((1-x)^3(1+x)^4),{x,0,60}],x] (* or *) LinearRecurrence[{-1,3,3,-3,-3,1,1},{1,3,1,11,-2,26,-10},60] (* Harvey P. Dale, Jan 27 2022 *)

Formula

G.f.: (1 + 4*x + x^2) / ((1 - x)^3*(1 + x)^4). - R. J. Mathar, Apr 18 2014
a(n) = a(-n-5) = 1 + n*(n + 5)*(9 - (2*n + 5)*(-1)^n)/48. [Bruno Berselli, Apr 22 2014]
Previous Showing 11-20 of 22 results. Next