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 31-40 of 50 results. Next

A336511 Total sum of the left-to-right maxima in all compositions of n.

Original entry on oeis.org

0, 1, 3, 9, 22, 52, 117, 260, 565, 1217, 2593, 5487, 11538, 24146, 50316, 104490, 216337, 446754, 920506, 1892904, 3885719, 7964162, 16300646, 33321640, 68038796, 138784403, 282824924, 575866839, 1171612786, 2381938742, 4839331484, 9825841526, 19938975797
Offset: 0

Views

Author

Alois P. Heinz, Jul 23 2020

Keywords

Examples

			a(4) = 1 + 1 + 2 + 1 + 2 + 2 + 2 + 1 + 3 + 3 + 4 = 22: (1)111, (1)1(2), (1)(2)1, (2)11, (2)2, (1)(3), (3)1, (4).
		

Crossrefs

Cf. A001705 (the same for permutations of [n]), A336482, A336512, A336516, A336771.

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, [1, 0], add((p-> [0,
          `if`(j>m, j*p[1], 0)]+p)(b(n-j, max(m, j))), j=1..n))
        end:
    a:= n-> b(n, -1)[2]:
    seq(a(n), n=0..50);
  • Mathematica
    b[n_, m_] := b[n, m] = If[n == 0, {1, 0}, Sum[Function[p, {0,
         If[j > m, j*p[[1]], 0]} + p][b[n - j, Max[m, j]]], {j, 1, n}]];
    a[n_] := b[n, -1][[2]];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Mar 04 2022, after Alois P. Heinz *)

A355171 a(n) = Sum_{k=0..n} binomial(n, k + 1)*k!*(n + 1)!/(k + 2)!.

Original entry on oeis.org

0, 1, 7, 50, 406, 3804, 41028, 506064, 7084656, 111690720, 1967421600, 38425449600, 825970435200, 19404363283200, 495012834489600, 13632039812966400, 403120633444300800, 12740557701389414400, 428546132879432601600, 15284163618598275072000, 576073025410937628672000
Offset: 0

Views

Author

Peter Luschny, Jun 22 2022

Keywords

Crossrefs

Programs

  • Maple
    a := n -> n*(n + 1)!*hypergeom([1, 1, 1 - n], [2, 3], -1) / 2;
    seq(simplify(a(n)), n = 0..20);
  • Mathematica
    a[n_] := n * (n + 1)! * HypergeometricPFQ[{1, 1, 1 - n}, {2, 3}, -1]/2; Array[a, 21, 0] (* Amiram Eldar, Jun 22 2022 *)
  • Python
    from math import comb, factorial
    def A355171(n):
        f = factorial(n+1)
        return sum(f*comb(n,k+1)//(k+2)//(k+1) for k in range(n+1)) # Chai Wah Wu, Jun 22 2022

Formula

a(n) = n*(n + 1)!*hypergeom([1, 1, 1 - n], [2, 3], -1) / 2.
a(n) = Sum_{k=0..n} (-1)^(k+1)*k!*A066667(n, k + 1).
E.g.f.: log((1 - x) / (1 - 2*x)) / (1 - x)^2. - Mélika Tebni, Jun 23 2022
a(n) ~ 2^(n+2) * (n-1)!. - Vaclav Kotesovec, Feb 17 2024

A081047 Difference of Stirling numbers of the first kind.

Original entry on oeis.org

1, 0, -1, -5, -26, -154, -1044, -8028, -69264, -663696, -6999840, -80627040, -1007441280, -13575738240, -196287356160, -3031488633600, -49811492505600, -867718162483200, -15974614352793600, -309920046408806400, -6320046028584960000
Offset: 0

Views

Author

Paul Barry, Mar 05 2003

Keywords

Crossrefs

Programs

  • Mathematica
    With[{nn = 100}, CoefficientList[Series[(1 + Log[1 - x])/(1 - x), {x, 0, nn}], x] Range[0, nn]!] (* G. C. Greubel, Jan 21 2017 *)

Formula

E.g.f.: (1+log(1-x))/(1-x). - Paul Barry, Nov 26 2008
a(n) = abs(s(n+1, 1))-abs(s(n+1, 2)), where s(n, m) is a (signed) Stirling number of the first kind (A008275). (corrected by Wolfdieter Lang, Jun 20 2011)
a(n) = A094645(n+2,2), n>=0. - _Wolfdieter Lang, Jun 20 2011

A136124 Triangle read by rows: T(n,k) = (-1)^(n+k)*Sum_{j=1..k} s(n,j), where s(n,j) are the signed Stirling numbers of the first kind (n >= 2; 1 <= k <= n-1; s(n,j) = A008275(n,j)).

Original entry on oeis.org

1, 2, 1, 6, 5, 1, 24, 26, 9, 1, 120, 154, 71, 14, 1, 720, 1044, 580, 155, 20, 1, 5040, 8028, 5104, 1665, 295, 27, 1, 40320, 69264, 48860, 18424, 4025, 511, 35, 1, 362880, 663696, 509004, 214676, 54649, 8624, 826, 44, 1, 3628800, 6999840, 5753736, 2655764
Offset: 2

Views

Author

Emeric Deutsch, Dec 23 2007

Keywords

Comments

Sum of entries in row n = n!/2 = A001710(n). T(n,1) = (n-1)! = A000142(n-1). Columns 2,3,4 and 5 yield A001705,A001706,A001707 and A001708, respectively.
See A143491 for the interpretation of these numbers as restricted Stirling numbers of the first kind. See A049444 for a signed version of this array. - Peter Bala, Aug 25 2008
With offset n=0, k=0: triangle T(n,k), read by rows, given by [2,1,3,2,4,3,5,4,6,5,...] DELTA [1,0,1,0,1,0,1,0,1,0,1,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Sep 29 2011
With offset n=0, k=0: T(n,k) is the number of ways to seat n people at any number of round tables and serve exactly k of the tables water, some number of the remaining tables red wine, and the rest of the tables white wine. - Geoffrey Critzer, Mar 13 2015

Examples

			T(6,3)=71 because (-1)^9*[s(6,1)+s(6,2)+s(6,3)]=-(-120+274-225)=71.
Triangle starts:
    1;
    2,   1;
    6,   5,   1;
   24,  26,   9,   1;
  120, 154,  71,  14,   1;
		

Crossrefs

Programs

  • Maple
    A136124_row := proc(n) local k,j; `if`(n=0,1,seq((-1)^(n+1-k)*add(stirling1(n+1,j), j=1..k),k=1..n)) end: seq(print(A136124_row(r)),r=1..6); # Peter Luschny, Sep 29 2011
    with(combinat): T:=proc(n, k) options operator, arrow: (-1)^(n+k)*(sum(stirling1(n,j),j=1..k)) end proc: for n from 2 to 11 do seq(T(n,k),k=1..n-1) end do; # yields sequence in triangular form
  • Mathematica
    nn = 10; Map[Select[#, # > 0 &] &,Range[0,nn]!CoefficientList[Series[Exp[(2 + y) Log[1/(1 - x)]], {x, 0, nn}], {x,y}]] // Flatten (* Geoffrey Critzer, Mar 13 2015 *)

Formula

E.g.f.: Sum[(1/n!)T(n,k)x^n*t^k, k=1..n-1, n>=2]=1/[(1+t)(1-x)^t]-(1+tx)/(1+t). Generating polynomial of row n = t*Product(j+t, j=2..n-1). T(n,k) is the sum of all products of n-k-1 different integers taken from {2,3,...,n-1}. For example, T(6,3) = 2*3 + 2*4 + 2*5 + 3*4 + 3*5 + 4*5 = 71.

A081530 a(n) = running sum of the first n harmonic numbers, multiplied by the LCM of 1..n.

Original entry on oeis.org

1, 5, 26, 77, 522, 669, 5772, 13827, 48610, 55991, 699612, 785633, 11359222, 12530955, 13726712, 29889983, 550271934, 593094837, 12094689300, 12932216325, 13780828710, 14640022575, 356714770680, 376932115005, 1986818142426
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2003

Keywords

Comments

Consider triangle in A081525. Write terms in k-th row with denominator = LCM of terms in that row. Sequence gives sum of numerators of terms in n-th row.

Examples

			(1), 2*(1 + 3/2), 6*(1 + 3/2 + 11/6), 12*(1 + 3/2 + 11/6 + 25/12).
		

Crossrefs

Programs

  • Maple
    H:=n->add(1/i,i=1..n):seq((n+1)*ilcm(seq(j,j=1..n))*(H(n+1)-1),n=1..30); # C. Ronaldo
  • Mathematica
    Table[Sum[HarmonicNumber[k], {k, n}] LCM @@ Range[n], {n, 36}] (* Wouter Meeussen *)

Formula

a(n) = lcm(1..n)*(n+1)*(H(n+1)-1), where H(n) is the n-th harmonic number. - C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 19 2004
Equal to A001705(n) / A025527(n). - Martin Fuller, Jan 03 2006

Extensions

More terms from Wouter Meeussen, Apr 13 2003

A138771 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} whose 2nd cycle has k entries; each cycle is written with the smallest element first and cycles are arranged in increasing order of their first elements (n>=1; 0<=k<=n-1). For example, 1432=(1)(24)(3) has 2 entries in the 2nd cycle; 3421=(1324) has 0 entries in the 2nd cycle.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 6, 11, 5, 2, 24, 50, 26, 14, 6, 120, 274, 154, 94, 54, 24, 720, 1764, 1044, 684, 444, 264, 120, 5040, 13068, 8028, 5508, 3828, 2568, 1560, 720, 40320, 109584, 69264, 49104, 35664, 25584, 17520, 10800, 5040
Offset: 1

Views

Author

Emeric Deutsch, Apr 10 2008

Keywords

Comments

T(n,0)=(n-1)!=A000142(n-1).
T(n,1)=A000254(n-1).
T(n,2)=A001705(n-2).
T(n,3)=2*A001711(n-4).
T(n,4)=6*A001716(n-5).
T(n,n-1)=(n-2)! (n>=2).
Sum(kT(n,k),k=0..n-1)=(n-1)!(n-1)(n+2)/4=A138772(n).

Examples

			T(4,2)=5 because we have (1)(23)(4), (1)(24)(3), (13)(24), (12)(34) and (14)(23).
Triangle starts;
1;
1,1;
2,3,1;
6,11,5,2;
24,50,26,14,6;
120,274,154,94,54,24;
		

Crossrefs

From Johannes W. Meijer, Oct 16 2009: (Start)
A000142 equals for n=>1 the row sums.
a(n) = A165680(n) * A165675(n-1).
(End)

Programs

  • Maple
    T:=proc (n,k) if k = 0 then factorial(n-1) elif n <= k then 0 else (n-1)*T(n-1, k)+factorial(n-2) end if end proc: for n to 9 do seq(T(n, k), k=0..n-1) end do;

Formula

T(n,k)=(n-1)T(n-1,k)+(n-2)! (1<=k<=n-1). The row generating polynomials P[n](t) satisfy: P[n+1](t)=nP[n](t)+(n-1)!(t+t^2+...+t^n).

A203147 (n-1)-st elementary symmetric function of {11, 12, 13, 14, ..., 10 + n}.

Original entry on oeis.org

1, 23, 431, 7750, 140274, 2604744, 50046408, 998853264, 20742534576, 448372820160, 10086271796160, 235977273544320, 5737221760152960, 144817445022243840, 3791415072241843200, 102851265545431603200, 2888120485072388966400
Offset: 1

Views

Author

Clark Kimberling, Dec 29 2011

Keywords

Crossrefs

Programs

  • Mathematica
    t[n_] := Table[k + 10, {k, 1, n}];
    a[n_] := SymmetricPolynomial[n - 1, t[n]]; Table[a[n], {n, 1, 16}]

A074246 Triangle of coefficients, read by rows, where the n-th row forms the polynomial P(n,x) = {Sum_{k=1..n} 1/(k+x)}*{Product_{k=1..n} (k+x)}.

Original entry on oeis.org

1, 3, 2, 11, 12, 3, 50, 70, 30, 4, 274, 450, 255, 60, 5, 1764, 3248, 2205, 700, 105, 6, 13068, 26264, 20307, 7840, 1610, 168, 7, 109584, 236248, 201852, 89796, 22680, 3276, 252, 8, 1026576, 2345400, 2171040, 1077300, 316365, 56700, 6090, 360, 9
Offset: 1

Views

Author

Paul D. Hanna, Sep 19 2002

Keywords

Comments

The n-th row polynomial, P(n,x), has ordered zeros {z_k < z_(k+1), 0
The higher-order exponential integrals E(x,m,n) are defined in A163931 and the asymptotic expansion of E(x,m=2,n) can be found in A028421. We determined with the latter that E(x,m=2,n+1) = (exp(-x)/x^2)*(1 - (3+2*n)/x + (11+12*n+3*n^2)/x^2 - (50+70*n+30*n^2+ 4*n^3)/x^3 + .... ). The polynomial coefficients in the numerators lead to the coefficients of the triangle given above. The numerators of the o.g.f.s of the right hand columns of this triangle lead for z = 1 to A001147. - Johannes W. Meijer, Oct 16 2009

Examples

			Polynomials begin:
P(1,x) = 1,
P(2,x) = 3 + 2x,
P(3,x) = 11 + 12x + 3x^2,
P(4,x) = 50 + 70x + 30x^2 + 4x^3,
P(5,x) = 274 + 450x + 255x^2 + 60x^3 + 5x^4,
P(6,x) = 1764 + 3248x + 2205x^2 + 700x^3 + 105x^4 + 6x^5,
P(7,x) = 13068 + 26264x + 20307x^2 + 7840x^3 + 1610x^4 + 168x^5 + 7x^6,
P(8,x) = 109584 + 236248x + 201852x^2 + 89796x^3 + 22680x^4 + 3276x^5 + 252x^6 + 8x^7,
P(9,x) = 1026576 + 2345400x + 2171040x^2 + 1077300x^3 + 316365x^4 + 56700x^5 + 6090x^6 + 360x^7 + 9x^8,
P(10,x) = 10628640 + 25507152x + 25228500x^2 + 13667720x^3 + 4510275x^4 + 946638x^5 + 127050x^6 + 10560x^7 + 495x^8 + 10x^9, ...
		

Crossrefs

See references and formulas at A000254, A001705. Cf. A028421.
A027480 is the second right hand column. - Johannes W. Meijer, Oct 16 2009

Programs

  • Maple
    with(combinat): A074246 := proc(n,m): (-1)^(n+m)*binomial(m,1)*stirling1(n+1,m+1) end: seq(seq(A074246(n,m),m=1..n),n=1..9); # Johannes W. Meijer, Oct 16 2009, Revised Sep 09 2012
  • Mathematica
    p[n_, x_] := Sum[1/(k+x), {k, 1, n}] Product[k+x, {k, 1, n}] ; Flatten[Table[ CoefficientList[ p[n, x] // Simplify[#, ComplexityFunction -> Length] &, x], {n, 1, 9}]] (* Jean-François Alcover, May 04 2011 *)
  • PARI
    P(n) = Vecrev(sum(k=1, n, prod(k=1, n, (k+x))/(k+x)));
    for (n=1, 10, print(P(n))) \\ Michel Marcus, Jan 22 2017

Formula

First column is A000254 (Stirling numbers of first kind s(n, 2): a(n+1)=(n+1)*a(n)+n!), while sum of rows is A001705 (generalized Stirling numbers). Also related to Harmonic numbers: P(n, 0)=n!*H(n), H(n)=harmonic number.
T(n,k) = (-1)^(n+k)*k*Stirling1(n+1,k+1). - Johannes W. Meijer, Oct 16 2009
E.g.f.: 1/(1 - z)^(x+1)*log(1/(1 - z)). Cf. A028421. - Peter Bala, Jan 06 2015

A112488 Third column of triangle A112486 used for e.g.f.s of |Stirling1| = |A008275| diagonals.

Original entry on oeis.org

3, 35, 340, 3304, 33740, 367884, 4302216, 53961336, 724534272, 10386470016, 158507316864, 2567670088320, 44027031755520, 796963357981440, 15192135816261120, 304269507433658880, 6388907821376256000
Offset: 2

Author

Wolfdieter Lang, Sep 12 2005

Keywords

Examples

			340 = a(4) = 6*35 + 5*26.
		

Programs

Formula

a(n) = A112486(n, 2), n>=2. a(0)=0=a(1).
a(n) = (n+2)*a(n-1) + (n+1)*A001705(n-1), n>=2, a(1):=0.

A325137 Triangle T(n, k) = [x^n] (n + k + x)!/(k + x)! for 0 <= k <= n, read by rows.

Original entry on oeis.org

1, 1, 1, 2, 5, 1, 6, 26, 12, 1, 24, 154, 119, 22, 1, 120, 1044, 1175, 355, 35, 1, 720, 8028, 12154, 5265, 835, 51, 1, 5040, 69264, 133938, 77224, 17360, 1687, 70, 1, 40320, 663696, 1580508, 1155420, 342769, 46816, 3066, 92, 1
Offset: 0

Author

Peter Luschny, Apr 13 2019

Keywords

Comments

Sister triangle of A307419.

Examples

			Triangle starts:
[0]      1
[1]      1,       1
[2]      2,       5,        1
[3]      6,      26,       12,        1
[4]     24,     154,      119,       22,       1
[5]    120,    1044,     1175,      355,      35,       1
[6]    720,    8028,    12154,     5265,     835,      51,      1
[7]   5040,   69264,   133938,    77224,   17360,    1687,     70,    1
[8]  40320,  663696,  1580508,  1155420,  342769,   46816,   3066,   92,   1
[9] 362880, 6999840, 19978308, 17893196, 6687009, 1197273, 109494, 5154, 117, 1
   A000142, A001705,  A001712,  A001718, A001724, ...
		

Crossrefs

Row sums: A325138.
Cf. A307419.

Programs

  • Maple
    T := (n, k) -> add(binomial(j+k, k)*(k+1)^j*abs(Stirling1(n, j+k)), j=0..n-k);
    seq(seq(T(n,k), k=0..n), n=0..8);
    # Note that for n > 16 Maple fails (at least in some versions) to compute the
    # terms properly. Inserting 'simplify' or numerical evaluation might help.
    A325137Row := proc(n) local ogf, ser; ogf := (n, k) -> (n+k+x)!/(k+x)!;
    ser := (n, k) -> series(ogf(n,k),x,k+2); seq(coeff(ser(n,k),x,k), k=0..n) end: seq(A325137Row(n), n=0..8);

Formula

T(n, k) = Sum_{j=0..n-k} binomial(j+k, k)*|Stirling1(n, j+k)|*(k+1)^j.
Previous Showing 31-40 of 50 results. Next