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

A006675 Number of paths through an array.

Original entry on oeis.org

0, 0, 2, 15, 104, 770, 6264, 56196, 554112, 5973264, 69998400, 886897440, 12089295360, 176484597120, 2748022986240, 45472329504000, 796983880089600, 14751208762214400, 287543058350284800
Offset: 0

Views

Author

Keywords

Examples

			x*(1-x)^-2 * (-log(1-x)) = x^2 + (5/2)*x^3 + (13/3)*x^4 + (77/12)*x^5 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    a[n_] := n*n!*(HarmonicNumber[n]-1); Table[a[n], {n, 0, 18}] (* Jean-François Alcover, Nov 28 2011 *)

Formula

a(n) = n*n! * (H(n) - 1) where H(n) = Sum_{k=1..n} 1/k.
E.g.f. A(x) = x*(1-x)^-2 * (-log(1-x)).
a(n) = A001705(n) - A000254(n). - Peter Bala, Feb 12 2019

Extensions

More terms from Joe Keane (jgk(AT)jgk.org)

A022819 a(n) = floor(1/(n-1) + 2/(n-2) + 3/(n-3) + ... + (n-1)/1).

Original entry on oeis.org

0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 19, 22, 25, 28, 31, 34, 38, 41, 44, 48, 51, 55, 59, 62, 66, 70, 74, 78, 81, 85, 89, 93, 97, 101, 106, 110, 114, 118, 122, 126, 131, 135, 139, 144, 148, 152, 157, 161, 166, 170, 174, 179, 183, 188, 193, 197, 202, 206, 211, 216
Offset: 0

Views

Author

Keywords

Comments

a(n) = A214075(n,n-2) for n > 1. - Reinhard Zumkeller, Jul 03 2012

Examples

			a(2) = floor(1/1) = 1;
a(3) = floor(1/2 + 2/1) = floor(5/2) = 2;
a(4) = floor(1/3 + 2/2 + 3/1) = floor(26/6) = 4.
		

Crossrefs

Cf. A027612.

Programs

  • Haskell
    import Data.Ratio ((%))
    a022819 n = floor $ sum $ zipWith (%) [1 .. n-1] [n-1, n-2 .. 1]
    -- Reinhard Zumkeller, Jul 03 2012
  • Mathematica
    s=0; Table[s+=HarmonicNumber[j]//N; Floor[s],{j,0,5!}] (* Vladimir Joseph Stephan Orlovsky, Feb 11 2010 *)
    Join[{0},Floor[Accumulate[HarmonicNumber[Range[0,60]]]]] (* Harvey P. Dale, Sep 16 2019 *)

Formula

a(n) = floor(sum_{i=2..n} n/i) = floor(A000027(n)*(A001008(n)/A002805(n)-1)) = floor(A006675(n)/A000142(n)) = floor(A001705(n-1)/A000142(n-1)). - Henry Bottomley, May 05 2001

A143947 Triangle read by rows: T(n,k) is the number of permutations of [n] for which the sum of the positions of the right-to-left minima is k (1 <= k <= n*(n+1)/2).

Original entry on oeis.org

1, 0, 1, 1, 0, 0, 2, 1, 2, 1, 0, 0, 0, 6, 2, 3, 7, 2, 3, 1, 0, 0, 0, 0, 24, 6, 8, 14, 27, 10, 9, 14, 3, 4, 1, 0, 0, 0, 0, 0, 120, 24, 30, 46, 68, 142, 41, 53, 50, 73, 23, 17, 23, 4, 5, 1, 0, 0, 0, 0, 0, 0, 720, 120, 144, 204, 270, 436, 834, 260, 256, 351, 310, 463, 148, 145, 118, 148, 40
Offset: 1

Views

Author

Emeric Deutsch, Sep 22 2008

Keywords

Comments

Row n contains n(n+1)/2 entries, first n-1 of which are 0. Sum of entries in row n = n! = A000142(n).
Sum of entries in column n = A143948(n).
T(n,n) = (n-1)!.
Sum_{k=n..n(n+1)/2} k*T(n,k) = A001705(n).

Examples

			T(4,6) = 3 because we have 4132, 3142 and 2143 with right-to-left minima at positions 2 and 4.
Triangle starts:
  1;
  0,  1,  1;
  0,  0,  2,  1,  2,  1;
  0,  0,  0,  6,  2,  3,  7,  2,  3,  1;
  0,  0,  0,  0, 24,  6,  8, 14, 27, 10,  9, 14,  3,  4,  1;
  ...
		

Crossrefs

T(n,2n) gives A368678.
Row maxima give A367594.

Programs

  • Maple
    P:=proc(n) options operator, arrow: sort(expand(product(t^(n-j)+j,j=0..n-1))) end proc: for n to 7 do seq(coeff(P(n),t,i),i=1..(1/2)*n*(n+1)) end do; # yields sequence in triangular form
  • Mathematica
    T[n_] := CoefficientList[Product[n-k+t^k, {k, 1, n-1}] t^(n-1), t];
    Array[T, 10] // Flatten (* Jean-François Alcover, Feb 14 2021 *)

Formula

Generating polynomial of row n is (n-1+t)(n-2+t^2)(n-3+t^3)...(1+t^(n-1))t^n.

A067176 A triangle of generalized Stirling numbers: sum of consecutive terms in the harmonic sequence multiplied by the product of their denominators.

Original entry on oeis.org

0, 1, 0, 3, 1, 0, 11, 5, 1, 0, 50, 26, 7, 1, 0, 274, 154, 47, 9, 1, 0, 1764, 1044, 342, 74, 11, 1, 0, 13068, 8028, 2754, 638, 107, 13, 1, 0, 109584, 69264, 24552, 5944, 1066, 146, 15, 1, 0, 1026576, 663696, 241128, 60216, 11274, 1650, 191, 17, 1, 0, 10628640
Offset: 0

Views

Author

Henry Bottomley, Jan 09 2002

Keywords

Comments

In the Coupon Collector's Problem with n types of coupon, the expected number of coupons required until there are only k types of coupon uncollected is a(n,k)*k!/(n-1)!.
If n+k is even, then a(n,k) is divisible by (n+k+1). For n>=k and k>= 0, a(n,k) = (n-k)!*H(k+1,n-k), where H(m,n) is a generalized harmonic number, i.e., H(0,n) = 1/n and H(m,n) = Sum_{j=1..n} H(m-1,j). - Leroy Quet, Dec 01 2006
This triangle is the same as triangle A165674, which is generated by the asymptotic expansion of the higher order exponential integral E(x,m=2,n), minus the first right hand column. - Johannes W. Meijer, Oct 16 2009

Examples

			Rows start 0; 1,0; 3,1,0; 11,5,1,0; 50,26,7,1,0; 274,154,47,9,1,0 etc. a(5,2) = 3*4*5*(1/3 + 1/4 + 1/5) = 4*5 + 3*5 + 3*4 = 20 + 15 + 12 = 47.
		

Crossrefs

Programs

  • Mathematica
    T[0, k_] := 1; T[n_, k_] := T[n, k] = Sum[ i*k^(i - 1)*Abs[StirlingS1[n - k, i]], {i, 1, n - k}]; Table[T[n,k], {n,1,10}, {k,1,n}] (* G. C. Greubel, Jan 21 2017 *)

Formula

a(n, k) = (n!/k!)*Sum_{j=k+1..n} 1/j = (A000254(n) - A000254(k)*A008279(n, n-k))/A000142(k) = a(n-1, k)*n + (n-1)!/k! = (a(n, k-1)-n!/k!)/k.
a(n, k) = Sum_{i=1..n-k} i*k^(i-1)*abs(stirling1(n-k, i)). - Vladeta Jovovic, Feb 02 2003

A093905 Triangle read by rows: for 0 <= k < n, a(n, k) is the sum of the products of all subsets of {n-k, n-k+1, ..., n} with k members.

Original entry on oeis.org

1, 1, 3, 1, 5, 11, 1, 7, 26, 50, 1, 9, 47, 154, 274, 1, 11, 74, 342, 1044, 1764, 1, 13, 107, 638, 2754, 8028, 13068, 1, 15, 146, 1066, 5944, 24552, 69264, 109584, 1, 17, 191, 1650, 11274, 60216, 241128, 663696, 1026576, 1, 19, 242, 2414, 19524, 127860
Offset: 1

Views

Author

Amarnath Murthy, Apr 24 2004

Keywords

Comments

Triangle A165674, which is the reversal of this triangle, is generated by the asymptotic expansion of the higher order exponential integral E(x,m=2,n). - Johannes W. Meijer, Oct 16 2009

Examples

			Triangle begins:
1
1 3
1 5 11
1 7 26 50
1 9 47 154 274
...
a(5, 3) = 4*3*2+5*3*2+5*4*2+5*4*3 = 154.
		

Crossrefs

The leading diagonal is given by A000254, Stirling numbers of first kind. The next nine diagonals are A001705, A001711, A001716, A001721, A051524, A051545, A051560, A051562 and A051564, generalized Stirling numbers.
A165674 is the reversal of this triangle. - Johannes W. Meijer, Oct 16 2009

Programs

  • Mathematica
    T[n_, 0] := 1; T[n_, k_]:= Product[i, {i, n - k, n}]*Sum[1/i, {i, n - k, n}]; Table[T[n, k], {n, 1, 10}, {k, 0, n - 1}] (* G. C. Greubel, Jan 21 2017 *)
  • PARI
    a(n, k) = prod(i=n-k, n, i)*sum(i=n-k,n,1/i);
    tabl(nn) = for (n=1, nn, for (k=0, n-1, print1(a(n,k), ", ")); print()); \\ Michel Marcus, Jan 21 2017

Formula

a(n, k) = (Product_{i=n-k..n} i)*(Sum_{i=n-k..n} 1/i), where a(n, 0) = 1.
a(n, k) = A067176(n, n-k-1) = A105954(k+1, n-k). Row sums are given by A093344.

Extensions

Edited and extended by David Wasserman, Apr 24 2007

A067948 Triangle of labeled rooted trees according to the number of increasing edges.

Original entry on oeis.org

1, 1, 1, 2, 5, 2, 6, 26, 26, 6, 24, 154, 269, 154, 24, 120, 1044, 2724, 2724, 1044, 120, 720, 8028, 28636, 42881, 28636, 8028, 720, 5040, 69264, 319024, 655248, 655248, 319024, 69264, 5040, 40320, 663696, 3793212, 10095228, 13861809, 10095228, 3793212, 663696, 40320
Offset: 1

Views

Author

Cedric Chauve (chauve(AT)lacim.uqam.ca), Mar 19 2002

Keywords

Comments

Each line is symmetric.
The sum of each line is n^(n-1), A000169.
The outer diagonal is (n-1)!, A000142.
The next-to-last diagonal is A001705.

Examples

			Triangle starts:
   1;
   1,   1;
   2,   5,   2;
   6,  26,  26,   6;
  24, 154, 269, 154,  24;
  ...
From _Bruno Berselli_, Jan 12 2021: (Start)
The rows of the triangle are the coefficients of the following polynomials:
1: 1;
2: 1*x+1;
3: (x+2)*(2*x+1) = 2*x^2 + 5*x + 2;
4: (x+3)*(2*x+2)*(3*x+1) = 6*x^3 + 26*x^2 + 26*x + 6;
5: (x+4)*(2*x+3)*(3*x+2)*(4*x+1) = 24*x^4 + 154*x^3 + 269*x^2 + 154*x + 24, etc.
(End)
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember;
          expand(x*mul(n-k+k*x, k=1..n-1))
        end:
    T:= (n, k)-> coeff(b(n), x, k):
    seq(seq(T(n,k), k=1..n), n=1..10);  # Alois P. Heinz, Jun 26 2024
  • Mathematica
    L := CoefficientList[InverseSeries[Series[(Exp[-x y] + Sinh[x] - Cosh[x])/(1 - y), {x, 0, 8}]], {x}]; Table[CoefficientList[L, y][[n + 1]] n!, {n, 1, 8}] // Flatten (* Peter Luschny, Jun 23 2018 *)

Formula

G.f. of row n: Sum_{k=0..n-1} T(n, k) x^k = Product_{i=1..n-1} (n - i + i*x).
From Peter Bala, Sep 29 2011: (Start)
E.g.f.: Compositional inverse of (exp(x) - exp(x*t))/((1 - t)*exp(x*(1 + t))) = x + (1 + t)*x^2/2! + (2 + 5*t + 2*t^2)*x^3/3! + ...
Let f(x,t) = (1 - t)/(exp(-x) - t*exp(-x*t)) and let D be the operator f(x,t)*d/dx. Then the (n+1)-th row generating polynomial equals (D^n)(f(x,t)) evaluated at x = 0. See [Drake, example 1.7.2] for the combinatorial interpretation of this table in terms of labeled trees. (End)

A109792 Expansion of e.g.f. log(1+x)/(1-x)^2.

Original entry on oeis.org

1, 3, 14, 70, 444, 3108, 25584, 230256, 2342880, 25771680, 312888960, 4067556480, 57424792320, 861371884800, 13869128448000, 235775183616000, 4264876094976000, 81032645804544000, 1627055289796608000, 34168161085728768000, 754132445894209536000, 17345046255566819328000
Offset: 1

Views

Author

Vladeta Jovovic, Aug 14 2005

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[Log[1+x]/(1-x)^2, {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Jun 27 2013 *)
    a[n_] := n! ((-1)^n (n + 1) LerchPhi[-1, 1, n + 2] + Log[2] (n + 1) + ((-1)^(n + 1) - 1) /2); Table[Simplify[a[n]], {n, 1, 22}] (* Peter Luschny, Jun 22 2022 *)
  • PARI
    for(n=1,25, print1(n!*sum(k=1,n, sum(i=1, k, (-1)^(i+1)/i)), ", ")) \\ G. C. Greubel, Jan 21 2017

Formula

a(n) = n!*Sum_{k=1..n} Sum_{i=1..k} (-1)^(i+1)/i.
a(n) ~ n!*n*log(2). - Vaclav Kotesovec, Jun 27 2013
a(n) = n!*((-1)^n*(n + 1)*LerchPhi(-1, 1, n + 2) + log(2)*(n + 1) + ((-1)^(n + 1) - 1) / 2). - Peter Luschny, Jun 22 2022

A127054 Rectangular table, read by antidiagonals, defined by the following rule: start with all 1's in row zero; from then on, row n+1 equals the partial sums of row n excluding terms in columns k = m*(m+1)/2 (m>=1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 10, 9, 4, 1, 1, 34, 33, 15, 5, 1, 1, 154, 153, 65, 23, 6, 1, 1, 874, 873, 339, 119, 32, 7, 1, 1, 5914, 5913, 2103, 719, 186, 42, 8, 1, 1, 46234, 46233, 15171, 5039, 1230, 267, 54, 9, 1, 1, 409114, 409113, 124755, 40319, 9258, 1891, 380
Offset: 0

Views

Author

Paul D. Hanna, Jan 04 2007

Keywords

Comments

Variant of table A125781. Generated by a method similar to Moessner's factorial triangle (A125714).

Examples

			Rows are partial sums excluding terms in columns k = {1,3,6,10,...}:
row 2 = partial sums of [1, 3, 5,6, 8,9,10, 12,13,14,15, ...];
row 3 = partial sums of [1, 9, 23,32, 54,67,81, 113,131,150,170, ...];
row 4 = partial sums of [1, 33, 119,186, 380,511,661, 1045,1283,...].
The terms that are excluded in the partial sums are shown enclosed in
parenthesis in the table below. Rows of this table begin:
1,(1), 1, (1), 1, 1, (1), 1, 1, 1, (1), 1, 1, 1, 1, (1), 1, ...;
1,(2), 3, (4), 5, 6, (7), 8, 9, 10, (11), 12, 13, 14, 15, (16), ...;
1,(4), 9, (15), 23, 32, (42), 54, 67, 81, (96), 113, 131, 150, ...;
1,(10), 33, (65), 119, 186, (267), 380, 511, 661, (831), 1045, ...;
1,(34), 153, (339), 719, 1230, (1891), 2936, 4219, 5765, (7600), ...;
1,(154), 873, (2103), 5039, 9258, (15023), 25148, 38203, 54625, ..;
1,(874), 5913, (15171), 40319, 78522, (133147), 238124, 379339, ...;
1,(5914), 46233, (124755), 362879, 742218, (1305847), 2477468, ...;
1,(46234), 409113, (1151331), 3628799, 7742058, (14059423), ...;
1,(409114), 4037913, (11779971), 39916799, 88369098, (164977399),...;
Columns include:
k=1: A003422 (Left factorials: !n = Sum k!, k=0..n-1);
k=2: A007489 (Sum of k!, k=1..n);
k=3: A097422 (Sum{k=1 to n} H(k) k!, where H(k) = sum{j=1 to k} 1/j);
k=4: A033312 (n! - 1);
k=5: Partial sums of A001705;
k=6: partial sums of A000399 (Stirling numbers of first kind s(n,3)).
		

Crossrefs

Cf. variants: A125781, A125714; antidiagonal sums: A127055; diagonal: A127056; columns: A003422, A007489, A097422, A033312.

Programs

  • Maple
    {T(n,k)=local(A=0,b=2,c=0,d=0);if(n==0,A=1, until(d>k,if(c==b*(b-1)/2,b+=1,A+=T(n-1,c);d+=1);c+=1));A}

A163937 Triangle related to the o.g.f.s. of the right-hand columns of A028421 (E(x,m=2,n)).

Original entry on oeis.org

1, 1, 2, 2, 10, 3, 6, 52, 43, 4, 24, 308, 472, 136, 5, 120, 2088, 4980, 2832, 369, 6, 720, 16056, 53988, 49808, 13638, 918, 7, 5040, 138528, 616212, 826160, 381370, 57540, 2167, 8, 40320, 1327392, 7472952, 13570336, 9351260, 2469300, 222908, 4948, 9
Offset: 1

Views

Author

Johannes W. Meijer, Aug 13 2009

Keywords

Comments

The asymptotic expansions of the higher-order exponential integral E(x,m=2,n) lead to triangle A028421, see A163931 for information on E(x,m,n). The o.g.f.s. of the right-hand columns of triangle A028421 have a nice structure: gf(p) = W2(z,p)/(1-z)^(2*p) with p = 1 for the first right-hand column, p = 2 for the second right-hand column, etc. The coefficients of the W2(z,p) polynomials lead to the triangle given above, n >= 1 and 1 <= m <= n. The row sums of this triangle lead to A001147 (minus a(0)), see A163936 for more information.

Examples

			The first few W2(z,p) polynomials are
W2(z,p=1) = 1/(1-z)^2;
W2(z,p=2) = (1 +  2*z)/(1-z)^4;
W2(z,p=3) = (2 + 10*z +  3*z^2)/(1-z)^6;
W2(z,p=4) = (6 + 52*z + 43*z^2 + 4*z^3)/(1-z)^8.
		

Crossrefs

Row sums equal A001147 (n>=1).
A000142, 2*A001705, are the first two left hand columns.
A000027 is the first right hand column.
Cf. A163931 (E(x,m,n)) and A028421.
Cf. A163936 (E(x,m=1,n)), A163938 (E(x,m=3,n)) and A163939 (E(x,m=4,n)).

Programs

  • Maple
    with(combinat): a := proc(n, m): add((-1)^(n+k+1)*((m-k)/1!)*binomial(2*n, k)*stirling1(m+n-k-1, m-k), k=0..m-1) end: seq(seq(a(n, m), m=1..n), n=1..9);  # Johannes W. Meijer, revised Nov 27 2012
  • Mathematica
    Table[Sum[(-1)^(n + k + 1)*((m - k)/1!)*Binomial[2*n, k]*StirlingS1[m + n - k - 1, m - k], {k, 0, m - 1}], {n, 1, 10}, {m, 1, n}] // Flatten (* G. C. Greubel, Aug 13 2017 *)
  • PARI
    for(n=1,10, for(m=1,n, print1(sum(k=0,m-1, (-1)^(n+k+1)*((m-k)/1!)*binomial(2*n,k) *stirling1(m+n-k-1,m-k)), ", "))) \\ G. C. Greubel, Aug 13 2017

Formula

a(n,m) = Sum_{k=0..(m-1)} (-1)^(n+k+1)*((m-k)/1!)*binomial(2*n,k)*Stirling1(m+n-k-1,m-k), 1 <= m <= n.

A334670 a(n) = (2*n+1)!! * (Sum_{k=1..n} 1/(2*k+1)).

Original entry on oeis.org

0, 1, 8, 71, 744, 9129, 129072, 2071215, 37237680, 741975345, 16236211320, 387182170935, 9995788416600, 277792140828825, 8269430130712800, 262542617405726175, 8855805158351474400, 316285840413064454625, 11924219190760084593000, 473245342972281190686375, 19722890048636406588957000
Offset: 0

Views

Author

Seiichi Manyama, Sep 10 2020

Keywords

Examples

			a(1) = 3 * (1/3) = 1.
a(2) = 3*5 * (1/3 + 1/5) = 8.
a(3) = 3*5*7 * (1/3 +1/5 + 1/7) = 71.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (2*n + 1)!! * Sum[1/(2*k + 1), {k, 1, n}]; Array[a, 21, 0] (* Amiram Eldar, Apr 29 2021 *)
  • PARI
    {a(n) = prod(k=1, n, 2*k+1)*sum(k=1, n, 1/(2*k+1))}
    
  • PARI
    {a(n) = if(n<2, n, 4*n*a(n-1)-(2*n-1)^2*a(n-2))}

Formula

a(n) + A001147(n+1) = A004041(n).
a(n) = (2*n+1) * a(n-1) + A001147(n) for n>0.
P-finite with recurrence a(n) = 4*n*a(n-1) - (2*n-1)^2 * a(n-2) for n>1.
Previous Showing 21-30 of 50 results. Next