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.

Showing 1-4 of 4 results.

A007526 a(n) = n*(a(n-1) + 1), a(0) = 0.

Original entry on oeis.org

0, 1, 4, 15, 64, 325, 1956, 13699, 109600, 986409, 9864100, 108505111, 1302061344, 16926797485, 236975164804, 3554627472075, 56874039553216, 966858672404689, 17403456103284420, 330665665962403999, 6613313319248080000, 138879579704209680021, 3055350753492612960484
Offset: 0

Views

Author

Keywords

Comments

Eighteenth- and nineteenth-century combinatorialists call this the number of (nonnull) "variations" of n distinct objects, namely the number of permutations of nonempty subsets of {1,...,n}. Some early references to this sequence are Izquierdo (1659), Caramuel de Lobkowitz (1670), Prestet (1675) and Bernoulli (1713). - Don Knuth, Oct 16 2001, Aug 16 2004
Stirling transform of A006252(n-1) = [0,1,1,2,4,14,38,...] is a(n-1) = [0,1,4,15,64,...]. - Michael Somos, Mar 04 2004
In particular, for n >= 1 a(n) is the number of nonempty sequences with n or fewer terms, each a distinct element of {1,...,n}. - Rick L. Shepherd, Jun 08 2005
a(n) = VarScheme(1,n). See A128195 for the definition of VarScheme(k,n). - Peter Luschny, Feb 26 2007
if s(n) is a sequence of the form s(0)=x, s(n)= n(s(n-1)+k), then s(n)= n!*x + a(n)*k. - Gary Detlefs, Jun 06 2010
Exponential convolution of factorials (A000142) and nonnegative integers (A001477). - Vladimir Reshetnikov, Oct 07 2016
For n > 0, a(n) is the number of maps f: {1,...,n} -> {1,...,n} satisfying equal(x,y) <= equal(f(x),f(y)) for all x,y, where equal(x,y) is n if x and y are equal and min(x,y) if not. Here equal(x,y) is the equality predicate in the n-valued Gödel logic, see e. g. the Wikipedia chapter on many-valued logics. - Mamuka Jibladze, Mar 12 2025

Examples

			G.f. = x + 4*x^2 + 15*x^3 + 64*x^4 + 325*x^5 + 1956*x^6 + 13699*x^7 + ...
Consider the nonempty subsets of the set {1,2,3,...,n} formed by the first n integers. E.g., for n = 3 we have {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}. For each subset S we determine its number of parts, that is nprts(S). The sum over all subsets is written as sum_{S=subsets}. Then we have A007526 = Sum_{S=subsets} nprts(S)!. E.g., for n = 3 we have 1!+1!+1!+2!+2!+2!+3! = 15. - _Thomas Wieder_, Jun 17 2006
a(3)=15: Let the objects be a, b, and c. The fifteen nonempty ordered subsets are {a}, {b}, {c}, {ab}, {ba}, {ac}, {ca}, {bc}, {cb}, {abc}, {acb}, {bac}, {bca}, {cab} and {cba}.
		

References

  • Jacob Bernoulli, Ars Conjectandi (1713), page 127.
  • Johannes Caramuel de Lobkowitz, Mathesis Biceps Vetus et Nova (Campania: 1670), volume 2, 942-943.
  • J. K. Horn, personal communication to Robert G. Wilson v.
  • Sebastian Izquierdo, Pharus Scientiarum (Lyon: 1659), 327-328.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A068424.
Partial sums of A001339.
Column k=1 of A326659.

Programs

  • GAP
    a:=[0];; for n in [2..25] do a[n]:=(n-1)*(a[n-1]+1); od; a; # Muniru A Asiru, Aug 07 2018
  • Haskell
    a007526 n = a007526_list !! n
    a007526_list = 0 : zipWith (*) [1..] (map (+ 1) a007526_list)
    -- Reinhard Zumkeller, Aug 27 2013
    
  • Maple
    A007526 := n -> add(n!/k!,k=0..n) - 1;
    a := n -> n*hypergeom([1,1-n],[],-1):
    seq(simplify(a(n)), n=0..22); # Peter Luschny, May 09 2017
    # third Maple program:
    a:= proc(n) option remember;
          `if`(n<0, 0, n*(1+a(n-1)))
        end:
    seq(a(n), n=0..23);  # Alois P. Heinz, Jan 06 2020
  • Mathematica
    Table[ Sum[n!/(n - r)!, {r, 1, n}], {n, 0, 20}] (* or *) Table[n!*Sum[1/k!, {k, 0, n - 1}], {n, 0, 20}]
    a=1;Table[a=(a-1)*(n-1);Abs[a],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Nov 20 2009 *)
    FoldList[#1*#2 + #2 &, 0, Range[19]] (* Robert G. Wilson v, Jul 07 2012 *)
    f[n_] := Floor[E*n! - 1]; f[0] = 0; Array[f, 20, 0] (* Robert G. Wilson v, Feb 06 2015 *)
    a[n_] := n (a[n - 1] +1); a[0] = 0; Array[a, 20, 0] (* Robert G. Wilson v, Feb 06 2015 *)
    Round@Table[E n Gamma[n, 1], {n, 0, 20}] (* Round is equivalent to FullSimplify here, but is much faster - Vladimir Reshetnikov, Oct 07 2016 *)
  • PARI
    {a(n) = if( n<1, 0, n * (a(n-1) + 1))}; /* Michael Somos, Apr 06 2003 */
    
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff(x * exp(x + x * O(x^n)) / (1 - x), n))}; /* Michael Somos, Mar 04 2004 */
    
  • PARI
    a(n)= sum(k=1,n, prod(j=0,k-1,n-j))
    

Formula

a(n) = A000522(n) - 1.
a(n) = floor(e*n! - 1). - Joseph K. Horn
a(n) = Sum_{r=1..n} A008279(n, r)= n!*(Sum_{k=0..n-1} 1/k!).
a(n) = n*(a(n-1) + 1).
E.g.f.: x*exp(x)/(1-x). - Vladeta Jovovic, Aug 25 2002
a(n) = Sum_{k=1..n} k!*C(n, k). - Benoit Cloitre, Dec 06 2002
a(n) = Sum_{k=0..n-1} (n! / k!). - Ross La Haye, Sep 22 2004
a(n) = Sum_{k=1..n} (Product_{j=0..k-1} (n-j)). - Joerg Arndt, Apr 24 2011
Binomial transform of n! - !n. - Paul Barry, May 12 2004
Inverse binomial transform of A066534. - Ross La Haye, Sep 16 2004
For n > 0, a(n) = exp(1) * Integral_{x>=0} exp(-exp(x/n)+x) dx. - Gerald McGarvey, Oct 19 2006
a(n) = Integral_{x>=0} (((1+x)^n-1)*exp(-x)). - Paul Barry, Feb 06 2008
a(n) = GAMMA(n+2)*(1+(-GAMMA(n+1)+exp(1)*GAMMA(n+1, 1))/GAMMA(n+1)). - Thomas Wieder, May 02 2009
E.g.f.: -1/G(0) where G(k) = 1 - 1/(x - x^3/(x^2+(k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 10 2012
Conjecture : a(n) = (n+2)*a(n-1) - (2*n-1)*a(n-2) + (n-2)*a(n-3). - R. J. Mathar, Dec 04 2012 [Conjecture verified by Robert FERREOL, Aug 04 2018]
G.f.: (Q(0) - 1)/(1-x), where Q(k)= 1 + (2*k + 1)*x/( 1 - x - 2*x*(1-x)*(k+1)/(2*x*(k+1) + (1-x)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 09 2013
G.f.: 2/((1-x)*G(0)) - 1/(1-x), where G(k)= 1 + 1/(1 - x*(2*k+2)/(x*(2*k+3) - 1 + x*(2*k+2)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 31 2013
a(n) = (...((((((0)+1)*1+1)*2+1)*3+1)*4+1)...*n). - Bob Selcoe, Jul 04 2013
G.f.: Q(0)/(2-2*x) - 1/(1-x), where Q(k)= 1 + 1/(1 - x*(k+1)/(x*(k+1) + (1-x)/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 09 2013
G.f.: (W(0) - 1)/(1-x), where W(k) = 1 - x*(k+1)/( x*(k+2) - 1/(1 - x*(k+1)/( x*(k+1) - 1/W(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Aug 25 2013
For n > 0: a(n) = n*A000522(n-1). - Reinhard Zumkeller, Aug 27 2013
a(n) = (...(((((0)*1+1)*2+2)*3+3)*4+4)...*n+n). - Bob Selcoe, Apr 30 2014
0 = 1 + a(n)*(+1 + a(n+1) - a(n+2)) + a(n+1)*(+2 +a(n+1)) - a(n+2) for all n >= 0. - Michael Somos, Aug 30 2016
a(n) = n*hypergeom([1, 1-n], [], -1). - Peter Luschny, May 09 2017
Product_{n>=1} (a(n)+1)/a(n) = e, coming from Product_{n=1..N}(a(n)+1)/a(n) = Sum_{n=0..N} 1/n!. - Robert FERREOL, Jul 12 2018
O.g.f.: Sum_{k>=1} k^k*x^k/(1 + (k - 1)*x)^(k+1). - Ilya Gutkovskiy, Oct 09 2018

A308876 Expansion of e.g.f. exp(x)*(1 - x)/(1 - 2*x).

Original entry on oeis.org

1, 2, 7, 40, 317, 3166, 37987, 531812, 8508985, 153161722, 3063234431, 67391157472, 1617387779317, 42052082262230, 1177458303342427, 35323749100272796, 1130359971208729457, 38432239021096801522, 1383560604759484854775, 52575302980860424481432
Offset: 0

Views

Author

Ilya Gutkovskiy, Jun 29 2019

Keywords

Comments

Binomial transform of A002866.

Crossrefs

Programs

  • Maple
    a:= n-> n! * add(ceil(2^(n-k-1))/k!, k=0..n):
    seq(a(n), n=0..23);  # Alois P. Heinz, Sep 12 2019
  • Mathematica
    nmax = 19; CoefficientList[Series[Exp[x] (1 - x)/(1 - 2 x), {x, 0, nmax}], x] Range[0, nmax]!
    Table[1 + Sum[Binomial[n,k] 2^(k - 1) k!, {k, 1, n}], {n, 0, 19}]

Formula

a(n) = 1 + Sum_{k=1..n} binomial(n,k) * 2^(k-1) * k!.
a(n) = A010844(n) - A067273(n).
a(n) ~ n! * 2^(n-1) * exp(1/2). - Vaclav Kotesovec, Jun 29 2019
a(n) = Sum_{k=0..n} k! * A271705(n,k). - Alois P. Heinz, Sep 12 2019

A134432 Sum of entries in all the arrangements of the set {1,2,...,n} (to n=0 there corresponds the empty set).

Original entry on oeis.org

0, 1, 9, 66, 490, 3915, 34251, 328804, 3452436, 39456405, 488273005, 6510306726, 93097386174, 1421850988831, 23105078568495, 398118276872520, 7251440043035176, 139227648826275369, 2810658160680434001, 59519819873232720010, 1319356007189991960210
Offset: 0

Views

Author

Emeric Deutsch, Nov 16 2007

Keywords

Comments

Appears to be the binomial transform of A001286 (filled with the appropriate two leading zeros), shifted one index left. - R. J. Mathar, Apr 04 2012

Examples

			a(2)=9 because the arrangements of {1,2} are (empty), 1, 2, 12 and 21.
		

Crossrefs

Programs

  • Magma
    [Binomial(n+1,2)*(&+[Factorial(j)*Binomial(n-1, j-1): j in [0..n]]): n in [0..30]]; // G. C. Greubel, Jan 09 2022
    
  • Maple
    Q[0]:=1: for n to 17 do Q[n]:=sort(simplify(Q[n-1]+t^n*x*(diff(x*Q[n-1], x))), t) end do: for n from 0 to 17 do P[n]:=sort(subs(x=1,Q[n])) end do: seq(subs(t =1,diff(P[n],t)),n=0..17);
    # second Maple program:
    b:= proc(n, t) option remember; `if`(n=0, [t!, 0],
          b(n-1, t)+(p-> p+[0, n*p[1]])(b(n-1, t+1)))
        end:
    a:= n-> b(n, 0)[2]:
    seq(a(n), n=0..23);  # Alois P. Heinz, Feb 19 2020
  • Mathematica
    (* First program *)
    b[n_, s_, t_]:= b[n, s, t] = If[n==0, t! x^s, b[n-1, s, t] + b[n-1, s+n, t+1]];
    T[n_]:= T[n]= Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]] @ b[n, 0, 0];
    a[n_] := Sum[k T[n][[k+1]], {k, 0, n(n+1)/2}];
    a /@ Range[0, 20] (* Jean-François Alcover, Feb 19 2020, after Alois P. Heinz *)
    (* Second program *)
    a[n_]:= ((n+1)/2)*Sum[j*j!*Binomial[n,j], {j,0,n}];
    Table[a[n], {n, 0, 30}] (* G. C. Greubel, Jan 09 2022 *)
  • Sage
    [((n+1)/2)*sum( j*factorial(j)*binomial(n, j) for j in (0..n) ) for n in (0..30)] # G. C. Greubel, Jan 09 2022

Formula

a(n) = Sum_{k=0..n*(n+1)/2} k*A134431(n,k).
a(n) = (d/dt)P[n](t) evaluated at t=1; here P[n](t)=Q[n](t,1) where the polynomials Q[n](t,x) are defined by Q[0]=1 and Q[n]=Q[n-1] + xt^n (d/dx)xQ[n-1]. (Q[n](t,x) is the bivariate generating polynomial of the arrangements of {1,2,...,n}, where t (x) marks the sum (number) of the entries; for example, Q[2](t,x) = 1 + tx + t^2*x + 2t^3*x^2, corresponding to: empty, 1, 2, 12 and 21, respectively.)
E.g.f.: exp(x)*x*(2 + x - x^2) / (2*(1 - x)^3). - Ilya Gutkovskiy, Jun 02 2020
From G. C. Greubel, Jan 09 2022: (Start)
a(n) = A271705(n+1, 2).
a(n) = ((n+1)/2) * Sum_{j=0..n} j * j! * binomial(n, j).
a(n) = (1/n!)*binomial(n+1, 2) * Sum_{j=0..n} (j!)^2 * A271703(n, j). (End)
D-finite with recurrence (-n+1)*a(n) +(n+1)^2*a(n-1) -n*(n+1)*a(n-2)=0. - R. J. Mathar, Jul 26 2022

Extensions

More terms from Alois P. Heinz, Dec 22 2017

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

Original entry on oeis.org

0, 1, 8, 69, 712, 8705, 123456, 1994293, 36163184, 727518177, 16081980760, 387499155461, 10108673620728, 283851555270049, 8536572699232592, 273759055527114165, 9325469762472018016, 336282091434597013313, 12797935594025234906664, 512609204063389138693957
Offset: 0

Views

Author

Alois P. Heinz, Sep 18 2019

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> n!*coeff(series(exp(x)*(1-x)*x/(1-2*x)^2, x, n+1), x, n):
    seq(a(n), n=0..23);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<3, n^3,
          2*(n+2)*a(n-1)-(4*n-1)*a(n-2)+2*(n-2)*a(n-3))
        end:
    seq(a(n), n=0..23);
  • Mathematica
    With[{nn=20},CoefficientList[Series[Exp[x](1-x)(x/(1-2x)^2),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Mar 15 2020 *)

Formula

E.g.f: exp(x)*(1-x)*x/(1-2*x)^2.
a(n) = Sum_{k=1..n} k * A326659(n,k).
a(n) ~ n! * exp(1/2) * n * 2^(n-2). - Vaclav Kotesovec, Sep 19 2019
Showing 1-4 of 4 results.