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-10 of 158 results. Next

A105795 Shallow diagonal sums of the triangle k!*Stirling2(n,k): a(n) = Sum_{k=0..floor(n/2)} T(n-k,k) where T is A019538.

Original entry on oeis.org

1, 0, 1, 1, 3, 7, 21, 67, 237, 907, 3741, 16507, 77517, 385627, 2024301, 11174587, 64673997, 391392667, 2470864941, 16237279867, 110858862477, 784987938907, 5755734591981, 43636725010747, 341615028340557, 2758165832945947, 22940755633301421, 196354180631212027
Offset: 0

Views

Author

Paul Barry, Apr 20 2005

Keywords

Comments

From Gus Wiseman, Jan 08 2019: (Start)
Also the number of set partitions of {1,...,n} into blocks of sizes > 1 whose minima form an initial interval of positive integers. For example, the a(5) = 7 set partitions are:
{{1,2,3,4,5}}
{{1,3},{2,4,5}}
{{1,4},{2,3,5}}
{{1,5},{2,3,4}}
{{1,3,4},{2,5}}
{{1,3,5},{2,4}}
{{1,4,5},{2,3}}
Also the number of ordered set partitions of {1,...,n-k} of length k, for any 0 <= k <= n. For example, the a(5) = 7 ordered set partitions are:
{{1,2,3,4}}
{{1},{2,3}}
{{2},{1,3}}
{{3},{1,2}}
{{1,2},{3}}
{{1,3},{2}}
{{2,3},{1}}
(End)

Examples

			a(8) = 1!*Stirling2(7,1) + 2!*Stirling2(6,2) + 3!*Stirling2(5,3) + 4!*Stirling2(4,4) = 1 + 62 + 150 + 24 = 237. - _Peter Bala_, Jul 09 2014
		

Crossrefs

Programs

  • Maple
    a:= n-> add(Stirling2(n-k, k)*k!, k=0..n/2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jul 09 2014
  • Mathematica
    Table[Sum[StirlingS2[n-k, k]*k!, {k,0,n/2}],{n,0,20}] (* Vaclav Kotesovec, Jul 16 2014 *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Sum[Length[Join@@Permutations/@Select[sps[Range[n-k]],Length[#]==k&]],{k,0,n}],{n,0,10}] (* Gus Wiseman, Jan 08 2019 *)
  • PARI
    /* From Paul Barry's formula: */
    {a(n)=sum(k=0,floor(n/2), sum(i=0,k,(-1)^i*binomial(k, i)*(k-i)^(n-k)))} \\ Paul D. Hanna, Dec 28 2013
    for(n=0,30,print1(a(n),", "))
    
  • PARI
    /* From e.g.f. series involving iterated integration: */
    {INTEGRATE(n,F)=local(G=F);for(i=1,n,G=intformal(G));G}
    {a(n)=local(A=1+x);A=1+sum(k=1,n,INTEGRATE(k,(exp(x+x*O(x^n))-1)^k ));n!*polcoeff(A,n)} \\ Paul D. Hanna, Dec 28 2013

Formula

a(n) = sum{k=0..floor(n/2), sum{(-1)^i*binomial(k, i)*(k-i)^(n-k)}}.
E.g.f.: Sum_{n>=0} Integral^n (exp(x) - 1)^n dx^n, where integral^n F(x) dx^n is the n-th integration of F(x) with no constant of integration. - Paul D. Hanna, Dec 28 2013
Formal o.g.f.: 1/(1 + x)*sum {n >= 0} 1/(1 - n*x)*(x/(1 + x))^n = 1 + x^2 + x^3 + 3*x^4 + 7*x^5 + .... Cf. A229046. - Peter Bala, Jul 09 2014

A002869 Largest number in n-th row of triangle A019538.

Original entry on oeis.org

1, 1, 2, 6, 36, 240, 1800, 16800, 191520, 2328480, 30240000, 479001600, 8083152000, 142702560000, 2731586457600, 59056027430400, 1320663933388800, 30575780537702400, 783699448602470400, 21234672840116736000, 591499300737945600000
Offset: 0

Views

Author

Keywords

References

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

Crossrefs

A000670 gives sum of terms in n-th row.

Programs

  • Haskell
    a002869 0 = 1
    a002869 n = maximum $ a019538_row n
    -- Reinhard Zumkeller, Dec 15 2013
    
  • Maple
    f := proc(n) local t1, k; t1 := 0; for k to n do if t1 < A019538(n, k) then t1 := A019538(n, k) fi; od; t1; end;
  • Mathematica
    A019538[n_, k_] := k!*StirlingS2[n, k]; f[0] = 1; f[n_] := Module[{t1, k}, t1 = 0; For[k = 1, k <= n, k++, If[t1 < A019538[n, k], t1 = A019538[n, k]]]; t1]; Table[f[n], {n, 0, 20}] (* Jean-François Alcover, Dec 26 2013, after Maple *)
  • Sage
    def A002869(n):
        return max(factorial(k)*stirling_number2(n,k) for k in range(1,n+1))
    [A002869(i) for i in range(1, 20)] # Danny Rorabaugh, Oct 10 2015

A186695 A Galton triangle: T(n,k) = (2k-1)*(T(n-1,k) + T(n-1,k-1)): a type B analog of the ordered Bell numbers A019538.

Original entry on oeis.org

1, 1, 3, 1, 12, 15, 1, 39, 135, 105, 1, 120, 870, 1680, 945, 1, 363, 4950, 17850, 23625, 10395, 1, 1092, 26565, 159600, 373275, 374220, 135135, 1, 3279, 138285, 1303155, 4795875, 8222445, 6621615, 2027025
Offset: 1

Views

Author

Peter Bala, Mar 26 2011

Keywords

Comments

The row polynomials R(n,x) of A019538 satisfy the recurrence relation R(n+1,x) = x*d/dx((1+x)*R(n,x)), and have the expansion R(n,x) = Sum_{k = 1..n} k!*Stirling2(n,k)*x^k.
Here we consider a sequence of polynomials P(n,x) (n>=1) defined by means of the similar recursion P(n+1,x) = x*d/dx((1+x^2)*P(n,x)), with starting value P(1,x) = x.
The first few polynomials are P(1,x) = x, P(2,x) = x + 3*x^3, P(3,x) = x + 12*x^3 + 15*x^5, and P(4,x) = x + 39*x^3 + 135*x^5 + 105*x^7.
Clearly, the P(n,x) are odd polynomials of the form P(n,x) = Sum_{k = 1..n} T(n,k)*x^(2*k-1).
This triangle lists the coefficients T(n,k). They are related to A039755, the type B Stirling numbers of Suter, by T(n,k) = (2*k-1)!!*A039755(n-1,k-1).

Examples

			Triangle begins
  n\k.|..1.....2.....3......4......5......6
  =========================================
  ..1.|..1
  ..2.|..1.....3
  ..3.|..1....12....15
  ..4.|..1....39...135....105
  ..5.|..1...120...870...1680....945
  ..6.|..1...363..4950..17850..23625..10395
  ..
Examples of recurrence relation
  T(4,3) = 5*(T(3,3)+T(3,2)) = 5*(15+12) = 135;
  T(6,4) = 7*(T(5,4)+T(5,3)) = 7*(1680+870) = 17850.
		

Crossrefs

Programs

  • Maple
    A186695 := proc(n, k) option remember; if k < 1 or k > n then 0; elif k = 1 then 1; else (2*k-1)*(procname(n-1, k) + procname(n-1, k-1)) ; end if; end proc: seq(seq(A186695(n,k),k = 1..n),n = 1..10);
  • Mathematica
    T[n_, k_] := (2k-1)! Sum[(-1)^(k-j-1) (2j+1)^(n-1) Binomial[k-1, j], {j, 0, k-1}] / (2^(k-1) (k-1)!)^2;
    Table[T[n, k], {n, 1, 8}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 02 2019 *)

Formula

T(n+1,k+1) = ((2*k+1)!/(2^k*k!)^2)*Sum_{j = 0..k} (-1)^(k-j)*binomial(k,j)*(2*j+1)^n.
Recurrence relation: T(n,k) = (2k-1)*(T(n-1,k) + T(n-1,k-1)) with boundary conditions T(n,1) = 1, T(1,k) = 0 for k >= 2.
E.g.f.: F(x,t) = (x/(1+x))*(exp(t)/sqrt((1+x) - x*exp(2*t)) - 1) = Sum_{n>=1} R(n,x)*t^n/n! = x*t + (x + 3*x^2)*t^2/2! + (x + 12*x^2 + 15*x^3)*t^3/3! + ....
Compare with the e.g.f. for A019538, which is (x/(1+x))*(exp(t)/((1+x) - x*exp(t))-1).
The row polynomials R(n,x) are related to the polynomials P(n,x) of the comments section by P(n,x) = 1/x*R(n,x^2).
The generating function F(x,t) satisfies the partial differential equation d/dt(F) = 2*x*(1+x)*d/dx(F) + (x-1)*F + x.
It follows that the polynomials P(n,x) := Sum_{k = 1..n} T(n,k)*x^(2*k-1) satisfy the recurrence P(n+1,x) = x*d/dx((1+x^2)*P(n,x)), with P(1,x) = x. (Cf. the recurrence relation for row polynomials of A185896.)
The recurrence relation for T(n,k) given above now follows.
The row polynomials R(n,x) = Sum_{k = 1..n} T(n,k)*x^k satisfy R(n,-x-1) = (-1)^n*((1+x)/x)*S(n,x), where S(n,x) is the n-th row polynomial of A187075.
In addition, R(n,1/(x-1)) = (1/(x-1)^n)*Q(n-1,x), where Q(n,x) is the n-th row polynomial of A156919.
Row sums are [1,4,28,280,3616...] = 1/2*A124212(n) for n >= 1.
Main diagonal is [1,3,15,105,...] = A001147(k) for k >= 1.
Put S(n) = sum {k = 1..n} (-1)^k*T(n,k)/(k+1). Then for m>=2, S(2*m-1) = S(2*m) = (4^m-1)*Bernoulli(2*m)/m.
From Peter Bala, Aug 30 2016: (Start)
n-th row polynomial R(n,x) = 1/(1 + x)^(3/2) * Sum_{k >= 0} (1/4)^k*(x/(1 + x))^k*binomial(2*k,k)*(2*k + 1)^n.
R(n,x) = (1/(1 + x))*Sum_{k = 0..n} binomial(2*k,k)*A145901(n,k)*(x/4)^k. (End)

A233734 Central terms of triangles A019538 and A090582.

Original entry on oeis.org

1, 6, 150, 8400, 834120, 129230640, 28805736960, 8734434508800, 3457819037312640, 1732015476199008000, 1070842073499515116800, 800968643959240044288000, 712900933001021056900608000, 744602794912654938776355840000, 901893717412811100821094451200000
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 15 2013

Keywords

Comments

a(n) = A019538(2*n-1,n) = A090582(2*n-1,n).

Programs

  • Haskell
    a233734 n = a019538 (2 * n - 1) n

Formula

a(n) = A129506(n) * n!.

A344118 Triangle of numbers T(n,k) = floor((A089072(n,k)-A019538(n,k))/A019538(n,k)) read by rows, n>=1, 1<=k<=n.

Original entry on oeis.org

0, 0, 1, 0, 0, 3, 0, 0, 1, 9, 0, 0, 0, 3, 25, 0, 0, 0, 1, 7, 63, 0, 0, 0, 0, 3, 17, 162, 0, 0, 0, 0, 2, 7, 39, 415, 0, 0, 0, 0, 1, 4, 16, 91, 1066, 0, 0, 0, 0, 0, 2, 8, 34, 212, 2754, 0, 0, 0, 0, 0, 1, 5, 16, 73, 500, 7146, 0, 0, 0, 0, 0, 1, 3, 9, 33, 160, 1190, 18612, 0
Offset: 1

Views

Author

Mohammad K. Azarian, Jul 28 2021

Keywords

Examples

			T(3, 3) = floor((27-6)/6) = 3.
Triangle begins:
  0
  0    1
  0    0    3
  0    0    1    9
  0    0    0    3    25
  0    0    0    1    7    63
  0    0    0    0    3    17    162
		

Crossrefs

Programs

  • Mathematica
    Floor[Table[(k^n - k!*StirlingS2[n, k])/(k!*StirlingS2[n, k]), {n, 15}, {k, n}]] // Flatten

Formula

T(n, k) = floor((k^n - k!*Stirling2(n, k))/(k!*Stirling2(n, k))).

A000578 The cubes: a(n) = n^3.

Original entry on oeis.org

0, 1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 1331, 1728, 2197, 2744, 3375, 4096, 4913, 5832, 6859, 8000, 9261, 10648, 12167, 13824, 15625, 17576, 19683, 21952, 24389, 27000, 29791, 32768, 35937, 39304, 42875, 46656, 50653, 54872, 59319, 64000, 68921, 74088, 79507
Offset: 0

Views

Author

Keywords

Comments

a(n) is the sum of the next n odd numbers; i.e., group the odd numbers so that the n-th group contains n elements like this: (1), (3, 5), (7, 9, 11), (13, 15, 17, 19), (21, 23, 25, 27, 29), ...; then each group sum = n^3 = a(n). Also the median of each group = n^2 = mean. As the sum of first n odd numbers is n^2 this gives another proof of the fact that the n-th partial sum = (n(n + 1)/2)^2. - Amarnath Murthy, Sep 14 2002
Total number of triangles resulting from criss-crossing cevians within a triangle so that two of its sides are each n-partitioned. - Lekraj Beedassy, Jun 02 2004. See Propp and Propp-Gubin for a proof.
Also structured triakis tetrahedral numbers (vertex structure 7) (cf. A100175 = alternate vertex); structured tetragonal prism numbers (vertex structure 7) (cf. A100177 = structured prisms); structured hexagonal diamond numbers (vertex structure 7) (cf. A100178 = alternate vertex; A000447 = structured diamonds); and structured trigonal anti-diamond numbers (vertex structure 7) (cf. A100188 = structured anti-diamonds). Cf. A100145 for more on structured polyhedral numbers. - James A. Record (james.record(AT)gmail.com), Nov 07 2004
Schlaefli symbol for this polyhedron: {4, 3}.
Least multiple of n such that every partial sum is a square. - Amarnath Murthy, Sep 09 2005
Draw a regular hexagon. Construct points on each side of the hexagon such that these points divide each side into equally sized segments (i.e., a midpoint on each side or two points on each side placed to divide each side into three equally sized segments or so on), do the same construction for every side of the hexagon so that each side is equally divided in the same way. Connect all such points to each other with lines that are parallel to at least one side of the polygon. The result is a triangular tiling of the hexagon and the creation of a number of smaller regular hexagons. The equation gives the total number of regular hexagons found where n = the number of points drawn + 1. For example, if 1 point is drawn on each side then n = 1 + 1 = 2 and a(n) = 2^3 = 8 so there are 8 regular hexagons in total. If 2 points are drawn on each side then n = 2 + 1 = 3 and a(n) = 3^3 = 27 so there are 27 regular hexagons in total. - Noah Priluck (npriluck(AT)gmail.com), May 02 2007
The solutions of the Diophantine equation: (X/Y)^2 - X*Y = 0 are of the form: (n^3, n) with n >= 1. The solutions of the Diophantine equation: (m^2)*(X/Y)^2k - XY = 0 are of the form: (m*n^(2k + 1), m*n^(2k - 1)) with m >= 1, k >= 1 and n >= 1. The solutions of the Diophantine equation: (m^2)*(X/Y)^(2k + 1) - XY = 0 are of the form: (m*n^(k + 1), m*n^k) with m >= 1, k >= 1 and n >= 1. - Mohamed Bouhamida, Oct 04 2007
Except for the first two terms, the sequence corresponds to the Wiener indices of C_{2n} i.e., the cycle on 2n vertices (n > 1). - K.V.Iyer, Mar 16 2009
Totally multiplicative sequence with a(p) = p^3 for prime p. - Jaroslav Krizek, Nov 01 2009
Sums of rows of the triangle in A176271, n > 0. - Reinhard Zumkeller, Apr 13 2010
One of the 5 Platonic polyhedral (tetrahedral, cube, octahedral, dodecahedral and icosahedral) numbers (cf. A053012). - Daniel Forgues, May 14 2010
Numbers n for which order of torsion subgroup t of the elliptic curve y^2 = x^3 - n is t = 2. - Artur Jasinski, Jun 30 2010
The sequence with the lengths of the Pisano periods mod k is 1, 2, 3, 4, 5, 6, 7, 8, 3, 10, 11, 12, 13, 14, 15, 16, 17, 6, 19, 20, ... for k >= 1, apparently multiplicative and derived from A000027 by dividing every ninth term through 3. Cubic variant of A186646. - R. J. Mathar, Mar 10 2011
The number of atoms in a bcc (body-centered cubic) rhombic hexahedron with n atoms along one edge is n^3 (T. P. Martin, Shells of atoms, eq. (8)). - Brigitte Stepanov, Jul 02 2011
The inverse binomial transform yields the (finite) 0, 1, 6, 6 (third row in A019538 and A131689). - R. J. Mathar, Jan 16 2013
Twice the area of a triangle with vertices at (0, 0), (t(n - 1), t(n)), and (t(n), t(n - 1)), where t = A000217 are triangular numbers. - J. M. Bergot, Jun 25 2013
If n > 0 is not congruent to 5 (mod 6) then A010888(a(n)) divides a(n). - Ivan N. Ianakiev, Oct 16 2013
For n > 2, a(n) = twice the area of a triangle with vertices at points (binomial(n,3),binomial(n+2,3)), (binomial(n+1,3),binomial(n+1,3)), and (binomial(n+2,3),binomial(n,3)). - J. M. Bergot, Jun 14 2014
Determinants of the spiral knots S(4,k,(1,1,-1)). a(k) = det(S(4,k,(1,1,-1))). - Ryan Stees, Dec 14 2014
One of the oldest-known examples of this sequence is shown in the Senkereh tablet, BM 92698, which displays the first 32 terms in cuneiform. - Charles R Greathouse IV, Jan 21 2015
From Bui Quang Tuan, Mar 31 2015: (Start)
We construct a number triangle from the integers 1, 2, 3, ... 2*n-1 as follows. The first column contains all the integers 1, 2, 3, ... 2*n-1. Each succeeding column is the same as the previous column but without the first and last items. The last column contains only n. The sum of all the numbers in the triangle is n^3.
Here is the example for n = 4, where 1 + 2*2 + 3*3 + 4*4 + 3*5 + 2*6 + 7 = 64 = a(4):
1
2 2
3 3 3
4 4 4 4
5 5 5
6 6
7
(End)
For n > 0, a(n) is the number of compositions of n+11 into n parts avoiding parts 2 and 3. - Milan Janjic, Jan 07 2016
Does not satisfy Benford's law [Ross, 2012]. - N. J. A. Sloane, Feb 08 2017
Number of inequivalent face colorings of the cube using at most n colors such that each color appears at least twice. - David Nacin, Feb 22 2017
Consider A = {a,b,c} a set with three distinct members. The number of subsets of A is 8, including {a,b,c} and the empty set. The number of subsets from each of those 8 subsets is 27. If the number of such iterations is n, then the total number of subsets is a(n-1). - Gregory L. Simay, Jul 27 2018
By Fermat's Last Theorem, these are the integers of the form x^k with the least possible value of k such that x^k = y^k + z^k never has a solution in positive integers x, y, z for that k. - Felix Fröhlich, Jul 27 2018

Examples

			For k=3, b(3) = 2 b(2) - b(1) = 4-1 = 3, so det(S(4,3,(1,1,-1))) = 3*3^2 = 27.
For n=3, a(3) = 3 + (3*0^2 + 3*0 + 3*1^2 + 3*1 + 3*2^2 + 3*2) = 27. - _Patrick J. McNab_, Mar 28 2016
		

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 191.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 43, 64, 81.
  • R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 255; 2nd. ed., p. 269. Worpitzky's identity (6.37).
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.6 Figurate Numbers, p. 292.
  • T. Aaron Gulliver, "Sequences from cubes of integers", International Mathematical Journal, 4 (2003), no. 5, 439 - 445. See http://www.m-hikari.com/z2003.html for information about this journal. [I expanded the reference to make this easier to find. - N. J. A. Sloane, Feb 18 2019]
  • J. Propp and A. Propp-Gubin, "Counting Triangles in Triangles", Pi Mu Epsilon Journal (to appear).
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 6-7.
  • D. Wells, You Are A Mathematician, pp. 238-241, Penguin Books 1995.

Crossrefs

(1/12)*t*(n^3-n)+n for t = 2, 4, 6, ... gives A004006, A006527, A006003, A005900, A004068, A000578, A004126, A000447, A004188, A004466, A004467, A007588, A062025, A063521, A063522, A063523.
For sums of cubes, cf. A000537 (partial sums), A003072, A003325, A024166, A024670, A101102 (fifth partial sums).
Cf. A001158 (inverse Möbius transform), A007412 (complement), A030078(n) (cubes of primes), A048766, A058645 (binomial transform), A065876, A101094, A101097.
Subsequence of A145784.
Cf. A260260 (comment). - Bruno Berselli, Jul 22 2015
Cf. A000292 (tetrahedral numbers), A005900 (octahedral numbers), A006566 (dodecahedral numbers), A006564 (icosahedral numbers).
Cf. A098737 (main diagonal).

Programs

  • Haskell
    a000578 = (^ 3)
    a000578_list = 0 : 1 : 8 : zipWith (+)
       (map (+ 6) a000578_list)
       (map (* 3) $ tail $ zipWith (-) (tail a000578_list) a000578_list)
    -- Reinhard Zumkeller, Sep 05 2015, May 24 2012, Oct 22 2011
    
  • Magma
    [ n^3 : n in [0..50] ]; // Wesley Ivan Hurt, Jun 14 2014
    
  • Magma
    I:=[0,1,8,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..45]]; // Vincenzo Librandi, Jul 05 2014
    
  • Maple
    A000578 := n->n^3;
    seq(A000578(n), n=0..50);
    isA000578 := proc(r)
        local p;
        if r = 0 or r =1 then
            true;
        else
            for p in ifactors(r)[2] do
                if op(2, p) mod 3 <> 0 then
                    return false;
                end if;
            end do:
            true ;
        end if;
    end proc: # R. J. Mathar, Oct 08 2013
  • Mathematica
    Table[n^3, {n, 0, 30}] (* Stefan Steinerberger, Apr 01 2006 *)
    CoefficientList[Series[x (1 + 4 x + x^2)/(1 - x)^4, {x, 0, 45}], x] (* Vincenzo Librandi, Jul 05 2014 *)
    Accumulate[Table[3n^2+3n+1,{n,0,20}]] (* or *) LinearRecurrence[{4,-6,4,-1},{1,8,27,64},20](* Harvey P. Dale, Aug 18 2018 *)
  • Maxima
    A000578(n):=n^3$
    makelist(A000578(n),n,0,30); /* Martin Ettl, Nov 03 2012 */
    
  • PARI
    A000578(n)=n^3 \\ M. F. Hasler, Apr 12 2008
    
  • PARI
    is(n)=ispower(n,3) \\ Charles R Greathouse IV, Feb 20 2012
    
  • Python
    A000578_list, m = [], [6, -6, 1, 0]
    for _ in range(10**2):
        A000578_list.append(m[-1])
        for i in range(3):
            m[i+1] += m[i] # Chai Wah Wu, Dec 15 2015
    
  • Scheme
    (define (A000578 n) (* n n n)) ;; Antti Karttunen, Oct 06 2017

Formula

a(n) = Sum_{i=0..n-1} A003215(i).
Multiplicative with a(p^e) = p^(3e). - David W. Wilson, Aug 01 2001
G.f.: x*(1+4*x+x^2)/(1-x)^4. - Simon Plouffe in his 1992 dissertation
Dirichlet generating function: zeta(s-3). - Franklin T. Adams-Watters, Sep 11 2005, Amarnath Murthy, Sep 09 2005
E.g.f.: (1+3*x+x^2)*x*exp(x). - Franklin T. Adams-Watters, Sep 11 2005 - Amarnath Murthy, Sep 09 2005
a(n) = Sum_{i=1..n} (Sum_{j=i..n+i-1} A002024(j,i)). - Reinhard Zumkeller, Jun 24 2007
a(n) = lcm(n, (n - 1)^2) - (n - 1)^2. E.g.: lcm(1, (1 - 1)^2) - (1 - 1)^2 = 0, lcm(2, (2 - 1)^2) - (2 - 1)^2 = 1, lcm(3, (3 - 1)^2) - (3 - 1)^2 = 8, ... - Mats Granvik, Sep 24 2007
Starting (1, 8, 27, 64, 125, ...), = binomial transform of [1, 7, 12, 6, 0, 0, 0, ...]. - Gary W. Adamson, Nov 21 2007
a(n) = A007531(n) + A000567(n). - Reinhard Zumkeller, Sep 18 2009
a(n) = binomial(n+2,3) + 4*binomial(n+1,3) + binomial(n,3). [Worpitzky's identity for cubes. See. e.g., Graham et al., eq. (6.37). - Wolfdieter Lang, Jul 17 2019]
a(n) = n + 6*binomial(n+1,3) = binomial(n,1)+6*binomial(n+1,3). - Ron Knott, Jun 10 2019
A010057(a(n)) = 1. - Reinhard Zumkeller, Oct 22 2011
a(n) = A000537(n) - A000537(n-1), difference between 2 squares of consecutive triangular numbers. - Pierre CAMI, Feb 20 2012
a(n) = A048395(n) - 2*A006002(n). - J. M. Bergot, Nov 25 2012
a(n) = 1 + 7*(n-1) + 6*(n-1)*(n-2) + (n-1)*(n-2)*(n-3). - Antonio Alberto Olivares, Apr 03 2013
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + 6. - Ant King Apr 29 2013
a(n) = A000330(n) + Sum_{i=1..n-1} A014105(i), n >= 1. - Ivan N. Ianakiev, Sep 20 2013
a(k) = det(S(4,k,(1,1,-1))) = k*b(k)^2, where b(1)=1, b(2)=2, b(k) = 2*b(k-1) - b(k-2) = b(2)*b(k-1) - b(k-2). - Ryan Stees, Dec 14 2014
For n >= 1, a(n) = A152618(n-1) + A033996(n-1). - Bui Quang Tuan, Apr 01 2015
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Jon Tavasanis, Feb 21 2016
a(n) = n + Sum_{j=0..n-1} Sum_{k=1..2} binomial(3,k)*j^(3-k). - Patrick J. McNab, Mar 28 2016
a(n) = A000292(n-1) * 6 + n. - Zhandos Mambetaliyev, Nov 24 2016
a(n) = n*binomial(n+1, 2) + 2*binomial(n+1, 3) + binomial(n,3). - Tony Foster III, Nov 14 2017
From Amiram Eldar, Jul 02 2020: (Start)
Sum_{n>=1} 1/a(n) = zeta(3) (A002117).
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*zeta(3)/4 (A197070). (End)
From Amiram Eldar, Jan 20 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = cosh(sqrt(3)*Pi/2)/Pi.
Product_{n>=2} (1 - 1/a(n)) = cosh(sqrt(3)*Pi/2)/(3*Pi). (End)
a(n) = Sum_{d|n} sigma_3(d)*mu(n/d) = Sum_{d|n} A001158(d)*A008683(n/d). Moebius transform of sigma_3(n). - Ridouane Oudra, Apr 15 2021

A008277 Triangle of Stirling numbers of the second kind, S2(n,k), n >= 1, 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 6, 1, 1, 15, 25, 10, 1, 1, 31, 90, 65, 15, 1, 1, 63, 301, 350, 140, 21, 1, 1, 127, 966, 1701, 1050, 266, 28, 1, 1, 255, 3025, 7770, 6951, 2646, 462, 36, 1, 1, 511, 9330, 34105, 42525, 22827, 5880, 750, 45, 1, 1, 1023, 28501, 145750, 246730, 179487, 63987, 11880, 1155, 55, 1
Offset: 1

Views

Author

Keywords

Comments

Also known as Stirling set numbers and written {n, k}.
S2(n,k) counts partitions of an n-set into k nonempty subsets.
From Manfred Boergens, Apr 07 2025: (Start)
With regard to the preceding comment:
For disjoint collections of subsets see A256894.
For arbitrary collections of subsets see A163353.
For arbitrary collections of nonempty subsets see A055154. (End)
Triangle S2(n,k), 1 <= k <= n, read by rows, given by [0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, ...] DELTA [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, ...] where DELTA is Deléham's operator defined in A084938.
Number of partitions of {1, ..., n+1} into k+1 nonempty subsets of nonconsecutive integers, including the partition 1|2|...|n+1 if n=k. E.g., S2(3,2)=3 since the number of partitions of {1,2,3,4} into three subsets of nonconsecutive integers is 3, i.e., 13|2|4, 14|2|3, 1|24|3. - Augustine O. Munagi, Mar 20 2005
Draw n cards (with replacement) from a deck of k cards. Let prob(n,k) be the probability that each card was drawn at least once. Then prob(n,k) = S2(n,k)*k!/k^n (see A090582). - Rainer Rosenthal, Oct 22 2005
Define f_1(x), f_2(x), ..., such that f_1(x)=e^x and for n = 2, 3, ..., f_{n+1}(x) = (d/dx)(x*f_n(x)). Then f_n(x) = e^x*Sum_{k=1..n} S2(n,k)*x^(k-1). - Milan Janjic, May 30 2008
From Peter Bala, Oct 03 2008: (Start)
For tables of restricted Stirling numbers of the second kind see A143494 - A143496.
S2(n,k) gives the number of 'patterns' of words of length n using k distinct symbols - see [Cooper & Kennedy] for an exact definition of the term 'pattern'. As an example, the words AADCBB and XXEGTT, both of length 6, have the same pattern of letters. The five patterns of words of length 3 are AAA, AAB, ABA, BAA and ABC giving row 3 of this table as (1,3,1).
Equivalently, S2(n,k) gives the number of sequences of positive integers (N_1,...,N_n) of length n, with k distinct entries, such that N_1 = 1 and N_(i+1) <= 1 + max{j = 1..i} N_j for i >= 1 (restricted growth functions). For example, Stirling(4,2) = 7 since the sequences of length 4 having 2 distinct entries that satisfy the conditions are (1,1,1,2), (1,1,2,1), (1,2,1,1), (1,1,2,2), (1,2,2,2), (1,2,2,1) and (1,2,1,2).
(End)
Number of combinations of subsets in the plane. - Mats Granvik, Jan 13 2009
S2(n+1,k+1) is the number of size k collections of pairwise disjoint, nonempty subsets of [n]. For example: S2(4,3)=6 because there are six such collections of subsets of [3] that have cardinality two: {(1)(23)},{(12)(3)}, {(13)(2)}, {(1)(2)}, {(1)(3)}, {(2)(3)}. - Geoffrey Critzer, Apr 06 2009
Consider a set of A000217(n) balls of n colors in which, for each integer k = 1 to n, exactly one color appears in the set a total of k times. (Each ball has exactly one color and is indistinguishable from other balls of the same color.) a(n+1, k+1) equals the number of ways to choose 0 or more balls of each color in such a way that exactly (n-k) colors are chosen at least once, and no two colors are chosen the same positive number of times. - Matthew Vandermast, Nov 22 2010
S2(n,k) is the number of monotonic-labeled forests on n vertices with exactly k rooted trees, each of height one or less. See link "Counting forests with Stirling and Bell numbers" below. - Dennis P. Walsh, Nov 16 2011
If D is the operator d/dx, and E the operator xd/dx, Stirling numbers are given by: E^n = Sum_{k=1..n} S2(n,k) * x^k*D^k. - Hyunwoo Jang, Dec 13 2011
The Stirling polynomials of the second kind (a.k.a. the Bell / Touchard polynomials) are the umbral compositional inverses of the falling factorials (a.k.a. the Pochhammer symbol or Stirling polynomials of the first kind), i.e., binomial(Bell(.,x),n) = x^n/n! (cf. Copeland's 2007 formulas), implying binomial(xD,n) = binomial(Bell(.,:xD:),n) = :xD:^n/n! where D = d/dx and :xD:^n = x^n*D^n. - Tom Copeland, Apr 17 2014
S2(n,k) is the number of ways to nest n matryoshkas (Russian nesting dolls) so that exactly k matryoshkas are not contained in any other matryoshka. - Carlo Sanna, Oct 17 2015
The row polynomials R(n, x) = Sum_{k=1..n} S2(n, k)*x^k appear in the numerator of the e.g.f. of n-th powers, E(n, x) = Sum_{m>=0} m^n*x^m/m!, as E(n, x) = exp(x)*x*R(n, x), for n >= 1. - Wolfdieter Lang, Apr 02 2017
With offsets 0 for n and k this is the Sheffer product matrix A007318*A048993 denoted by (exp(t), (exp(t) - 1)) with e.g.f. exp(t)*exp(x*(exp(t) - 1)). - Wolfdieter Lang, Jun 20 2017
Number of words on k+1 unlabeled letters of length n+1 with no repeated letters. - Thomas Anton, Mar 14 2019
Also coefficients of moments of Poisson distribution about the origin expressed as polynomials in lambda. [Haight] (see also A331155). - N. J. A. Sloane, Jan 14 2020
k!*S2(n,k) is the number of surjections from an n-element set to a k-element set. - Jianing Song, Jun 01 2022

Examples

			The triangle S2(n, k) begins:
\ k    1       2       3        4         5         6         7         8        9
n \   10      11      12       13        14        15       ...
----------------------------------------------------------------------------------
1  |   1
2  |   1       1
3  |   1       3       1
4  |   1       7       6        1
5  |   1      15      25       10         1
6  |   1      31      90       65        15         1
7  |   1      63     301      350       140        21         1
8  |   1     127     966     1701      1050       266        28         1
9  |   1     255    3025     7770      6951      2646       462        36        1
10 |   1     511    9330    34105     42525     22827      5880       750       45
       1
11 |   1    1023   28501   145750    246730    179487     63987     11880     1155
      55       1
12 |   1    2047   86526   611501   1379400   1323652    627396    159027    22275
    1705      66       1
13 |   1    4095  261625  2532530   7508501   9321312   5715424   1899612   359502
   39325    2431      78        1
14 |   1    8191  788970 10391745  40075035  63436373  49329280  20912320  5135130
  752752   66066    3367       91         1
15 |   1   16383 2375101 42355950 210766920 420693273 408741333 216627840 67128490
12662650 1479478  106470     4550       105         1
...
----------------------------------------------------------------------------------
x^4 = 1 x_(1) + 7 x_(2) + 6 x_(3) + 1 x_(4), where x_(k) = P(x,k) = k!*C(x,k). - _Daniel Forgues_, Jan 16 2016
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 835.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 103ff.
  • B. A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.
  • G. Boole, Finite Differences, 5th ed. New York, NY: Chelsea, 1970.
  • C. A. Charalambides, Enumerative Combinatorics, Chapman & Hall/CRC, 2002, Theorem 8.11, pp. 298-299.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 310.
  • J. H. Conway and R. K. Guy, The Book of Numbers, Springer, p. 92.
  • F. N. David, M. G. Kendall, and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 223.
  • S.N. Elaydi, An Introduction to Difference Equations, 3rd ed. Springer, 2005.
  • H. H. Goldstine, A History of Numerical Analysis, Springer-Verlag, 1977; Section 2.7.
  • R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 244.
  • Frank Avery Haight, Handbook of the Poisson distribution, John Wiley, 1967. See pages 6,7.
  • A. D. Korshunov, Asymptotic behavior of Stirling numbers of the second kind. (Russian) Metody Diskret. Analiz. No. 39 (1983), 24-41.
  • E. Kuz'min and A. I. Shirshov: On the number e, pp. 111-119, eq.(6), in: Kvant Selecta: Algebra and Analysis, I, ed. S. Tabachnikov, Am.Math.Soc., 1999, p. 116, eq. (11).
  • J. Riordan, An Introduction to Combinatorial Analysis, p. 48.
  • J. Stirling, The Differential Method, London, 1749; see p. 7.

Crossrefs

Cf. A008275 (Stirling numbers of first kind), A048993 (another version of this triangle).
See also A331155.
Cf. A000110 (row sums), A102661 (partial row sums).

Programs

  • Haskell
    a008277 n k = a008277_tabl !! (n-1) !! (k-1)
    a008277_row n = a008277_tabl !! (n-1)
    a008277_tabl = map tail $ a048993_tabl  -- Reinhard Zumkeller, Mar 26 2012
    
  • J
    n ((] (1 % !)) * +/@((^~ * (] (1 ^ |.)) * (! {:)@]) i.@>:)) k NB. _Stephen Makdisi, Apr 06 2016
    
  • Magma
    [[StirlingSecond(n,k): k in [1..n]]: n in [1..12]]; // G. C. Greubel, May 22 2019
  • Maple
    seq(seq(combinat[stirling2](n, k), k=1..n), n=1..10); # Zerinvary Lajos, Jun 02 2007
    stirling_2 := (n,k) -> (1/k!) * add((-1)^(k-i)*binomial(k,i)*i^n, i=0..k);
  • Mathematica
    Table[StirlingS2[n, k], {n, 11}, {k, n}] // Flatten (* Robert G. Wilson v, May 23 2006 *)
    BellMatrix[f_, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len - 1}, {k, 0, len - 1}]];
    rows = 12;
    B = BellMatrix[1&, rows];
    Table[B[[n, k]], {n, 2, rows}, {k, 2, n}] // Flatten (* Jean-François Alcover, Jun 28 2018, after Peter Luschny *)
    a[n_, n_] := 1; a[n_, 1] := 1;
    a[n_, k_] := a[n, k] = a[n-1, k-1] + k a[n-1, k]; Flatten@
    Table[a[n, k], {n, 1, 11}, {k, 1, n}] (* Oliver Seipel, Jun 12 2024 *)
    With[{m = 11},
     Flatten@MapIndexed[Take[#, #2[[1]]] &,
       Transpose@
        Table[Range[1, m]! Coefficient[(E^x-1)^k/k! + O[x]^(m+1), x,
    Range[1, m]], {k, 1, m}]]] (* Oliver Seipel, Jun 12 2024 *)
  • Maxima
    create_list(stirling2(n+1,k+1),n,0,30,k,0,n); /* Emanuele Munarini, Jun 01 2012 */
    
  • PARI
    for(n=1,22,for(k=1,n,print1(stirling(n,k,2),", "));print()); \\ Joerg Arndt, Apr 21 2013
    
  • PARI
    Stirling2(n,k)=sum(i=0,k,(-1)^i*binomial(k,i)*i^n)*(-1)^k/k!  \\ M. F. Hasler, Mar 06 2012
    
  • Sage
    stirling_number2 # Danny Rorabaugh, Oct 11 2015
    

Formula

S2(n, k) = k*S2(n-1, k) + S2(n-1, k-1), n > 1. S2(1, k) = 0, k > 1. S2(1, 1) = 1.
E.g.f.: A(x, y) = e^(y*e^x-y). E.g.f. for m-th column: (e^x-1)^m/m!.
S2(n, k) = (1/k!) * Sum_{i=0..k} (-1)^(k-i)*binomial(k, i)*i^n.
Row sums: Bell number A000110(n) = Sum_{k=1..n} S2(n, k), n>0.
S(n, k) = Sum (i_1*i_2*...*i_(n-k)) summed over all (n-k)-combinations {i_1, i_2, ..., i_k} with repetitions of the numbers {1, 2, ..., k}. Also S(n, k) = Sum (1^(r_1)*2^(r_2)*...* k^(r_k)) summed over integers r_j >= 0, for j=1..k, with Sum{j=1..k} r_j = n-k. [Charalambides]. - Wolfdieter Lang, Aug 15 2019.
A019538(n, k) = k! * S2(n, k).
A028248(n, k) = (k-1)! * S2(n, k).
For asymptotics see Hsu (1948), among other sources.
Sum_{n>=0} S2(n, k)*x^n = x^k/((1-x)(1-2x)(1-3x)...(1-kx)).
Let P(n) = the number of integer partitions of n (A000041), p(i) = the number of parts of the i-th partition of n, d(i) = the number of distinct parts of the i-th partition of n, p(j, i) = the j-th part of the i-th partition of n, m(i, j) = multiplicity of the j-th part of the i-th partition of n, and Sum_{i=1..P(n), p(i)=m} = sum running from i=1 to i=P(n) but taking only partitions with p(i)=m parts into account. Then S2(n, m) = Sum_{i=1..P(n), p(i)=m} n!/(Product_{j=1..p(i)} p(i, j)!) * 1/(Product_{j=1..d(i)} m(i, j)!). For example, S2(6, 3) = 90 because n=6 has the following partitions with m=3 parts: (114), (123), (222). Their complexions are: (114): 6!/(1!*1!*4!) * 1/(2!*1!) = 15, (123): 6!/(1!*2!*3!) * 1/(1!*1!*1!) = 60, (222): 6!/(2!*2!*2!) * 1/(3!) = 15. The sum of the complexions is 15+60+15 = 90 = S2(6, 3). - Thomas Wieder, Jun 02 2005
Sum_{k=1..n} k*S2(n,k) = B(n+1)-B(n), where B(q) are the Bell numbers (A000110). - Emeric Deutsch, Nov 01 2006
Recurrence: S2(n+1,k) = Sum_{i=0..n} binomial(n,i)*S2(i,k-1). With the starting conditions S2(n,k) = 1 for n = 0 or k = 1 and S2(n,k) = 0 for k = 0 we have the closely related recurrence S2(n,k) = Sum_{i=k..n} binomial(n-1,i-1)*S2(i-1,k-1). - Thomas Wieder, Jan 27 2007
Representation of Stirling numbers of the second kind S2(n,k), n=1,2,..., k=1,2,...,n, as special values of hypergeometric function of type (n)F(n-1): S2(n,k)= (-1)^(k-1)*hypergeom([ -k+1,2,2,...,2],[1,1,...,1],1)/(k-1)!, i.e., having n parameters in the numerator: one equal to -k+1 and n-1 parameters all equal to 2; and having n-1 parameters in the denominator all equal to 1 and the value of the argument equal to 1. Example: S2(6,k)= seq(evalf((-1)^(k-1)*hypergeom([ -k+1,2,2,2,2,2],[1,1,1,1,1],1)/(k-1)!),k=1..6)=1,31,90,65,15,1. - Karol A. Penson, Mar 28 2007
From Tom Copeland, Oct 10 2007: (Start)
Bell_n(x) = Sum_{j=0..n} S2(n,j) * x^j = Sum_{j=0..n} E(n,j) * Lag(n,-x, j-n) = Sum_{j=0..n} (E(n,j)/n!) * (n!*Lag(n,-x, j-n)) = Sum_{j=0..n} E(n,j) * binomial(Bell.(x)+j, n) umbrally where Bell_n(x) are the Bell / Touchard / exponential polynomials; S2(n,j), the Stirling numbers of the second kind; E(n,j), the Eulerian numbers; and Lag(n,x,m), the associated Laguerre polynomials of order m.
For x = 0, the equation gives Sum_{j=0..n} E(n,j) * binomial(j,n) = 1 for n=0 and 0 for all other n. By substituting the umbral compositional inverse of the Bell polynomials, the lower factorial n!*binomial(y,n), for x in the equation, the Worpitzky identity is obtained; y^n = Sum_{j=0..n} E(n,j) * binomial(y+j,n).
Note that E(n,j)/n! = E(n,j)/(Sum_{k=0..n}E(n,k)). Also (n!*Lag(n, -1, j-n)) is A086885 with a simple combinatorial interpretation in terms of seating arrangements, giving a combinatorial interpretation to the equation for x=1; n!*Bell_n(1) = n!*Sum_{j=0..n} S2(n,j) = Sum_{j=0..n} E(n,j) * (n!*Lag(n, -1, j-n)).
(Appended Sep 16 2020) For connections to the Bernoulli numbers, extensions, proofs, and a clear presentation of the number arrays involved in the identities above, see my post Reciprocity and Umbral Witchcraft. (End)
n-th row = leftmost column of nonzero terms of A127701^(n-1). Also, (n+1)-th row of the triangle = A127701 * n-th row; deleting the zeros. Example: A127701 * [1, 3, 1, 0, 0, 0, ...] = [1, 7, 6, 1, 0, 0, 0, ...]. - Gary W. Adamson, Nov 21 2007
The row polynomials are given by D^n(e^(x*t)) evaluated at x = 0, where D is the operator (1+x)*d/dx. Cf. A147315 and A094198. See also A185422. - Peter Bala, Nov 25 2011
Let f(x) = e^(e^x). Then for n >= 1, 1/f(x)*(d/dx)^n(f(x)) = 1/f(x)*(d/dx)^(n-1)(e^x*f(x)) = Sum_{k=1..n} S2(n,k)*e^(k*x). Similar formulas hold for A039755, A105794, A111577, A143494 and A154537. - Peter Bala, Mar 01 2012
S2(n,k) = A048993(n,k), 1 <= k <= n. - Reinhard Zumkeller, Mar 26 2012
O.g.f. for the n-th diagonal is D^n(x), where D is the operator x/(1-x)*d/dx. - Peter Bala, Jul 02 2012
n*i!*S2(n-1,i) = Sum_{j=(i+1)..n} (-1)^(j-i+1)*j!/(j-i)*S2(n,j). - Leonid Bedratyuk, Aug 19 2012
G.f.: (1/Q(0)-1)/(x*y), where Q(k) = 1 - (y+k)*x - (k+1)*y*x^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Nov 09 2013
From Tom Copeland, Apr 17 2014: (Start)
Multiply each n-th diagonal of the Pascal lower triangular matrix by x^n and designate the result as A007318(x) = P(x).
With Bell(n,x)=B(n,x) defined above, D = d/dx, and :xD:^n = x^n*D^n, a Dobinski formula gives umbrally f(y)^B(.,x) = e^(-x)*e^(f(y)*x). Then f(y)^B(.,:xD:)g(x) = [f(y)^(xD)]g(x) = e^[-(1-f(y)):xD:]g(x) = g[f(y)x].
In particular, for f(y) = (1+y),
A) (1+y)^B(.,x) = e^(-x)*e^((1+y)*x) = e^(x*y) = e^[log(1+y)B(.,x)],
B) (I+dP)^B(.,x) = e^(x*dP) = P(x) = e^[x*(e^M-I)]= e^[M*B(.,x)] with dP = A132440, M = A238385-I = log(I+dP), and I = identity matrix, and
C) (1+dP)^(xD) = e^(dP:xD:) = P(:xD:) = e^[(e^M-I):xD:] = e^[M*xD] with action e^(dP:xD:)g(x) = g[(I+dP)*x].
D) P(x)^m = P(m*x), which implies (Sum_{k=1..m} a_k)^j = B(j,m*x) where the sum is umbrally evaluated only after exponentiation with (a_k)^q = B(.,x)^q = B(q,x). E.g., (a1+a2+a3)^2=a1^2+a2^2+a3^2+2(a1*a2+a1*a3+a2*a3) = 3*B(2,x)+6*B(1,x)^2 = 9x^2+3x = B(2,3x).
E) P(x)^2 = P(2x) = e^[M*B(.,2x)] = A038207(x), the face vectors of the n-Dim hypercubes.
(End)
As a matrix equivalent of some inversions mentioned above, A008277*A008275 = I, the identity matrix, regarded as lower triangular matrices. - Tom Copeland, Apr 26 2014
O.g.f. for the n-th diagonal of the triangle (n = 0,1,2,...): Sum_{k>=0} k^(k+n)*(x*e^(-x))^k/k!. Cf. the generating functions of the diagonals of A039755. Also cf. A112492. - Peter Bala, Jun 22 2014
Floor(1/(-1 + Sum_{n>=k} 1/S2(n,k))) = A034856(k-1), for k>=2. The fractional portion goes to zero at large k. - Richard R. Forberg, Jan 17 2015
From Daniel Forgues, Jan 16 2016: (Start)
Let x_(n), called a factorial term (Boole, 1970) or a factorial polynomial (Elaydi, 2005: p. 60), denote the falling factorial Product_{k=0..n-1} (x-k). Then, for n >= 1, x_(n) = Sum_{k=1..n} A008275(n,k) * x^k, x^n = Sum_{k=1..n} T(n,k) * x_(k), where A008275(n,k) are Stirling numbers of the first kind.
For n >= 1, the row sums yield the exponential numbers (or Bell numbers): Sum_{k=1..n} T(n,k) = A000110(n), and Sum_{k=1..n} (-1)^(n+k) * T(n,k) = (-1)^n * Sum_{k=1..n} (-1)^k * T(n,k) = (-1)^n * A000587(n), where A000587 are the complementary Bell numbers. (End)
Sum_{k=1..n} k*S2(n,k) = A138378(n). - Alois P. Heinz, Jan 07 2022
O.g.f. for the m-th column: x^m/(Product_{j=1..m} 1-j*x). - Daniel Checa, Aug 25 2022
S2(n,k) ~ (k^n)/k!, for fixed k as n->oo. - Daniel Checa, Nov 08 2022
S2(2n+k, n) ~ (2^(2n+k-1/2) * n^(n+k-1/2)) / (sqrt(Pi*(1-c)) * exp(n) * c^n * (2-c)^(n+k)), where c = -LambertW(-2 * exp(-2)). - Miko Labalan, Dec 21 2024
From Mikhail Kurkov, Mar 05 2025: (Start)
For a general proof of the formulas below via generating functions, see Mathematics Stack Exchange link.
Recursion for the n-th row (independently of other rows): T(n,k) = 1/(n-k)*Sum_{j=2..n-k+1} (j-2)!*binomial(-k,j)*T(n,k+j-1) for 1 <= k < n with T(n,n) = 1 (see Fedor Petrov link).
Recursion for the k-th column (independently of other columns): T(n,k) = 1/(n-k)*Sum_{j=2..n-k+1} binomial(n,j)*T(n-j+1,k)*(-1)^j for 1 <= k < n with T(n,n) = 1. (End)

A000312 a(n) = n^n; number of labeled mappings from n points to themselves (endofunctions).

Original entry on oeis.org

1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489, 10000000000, 285311670611, 8916100448256, 302875106592253, 11112006825558016, 437893890380859375, 18446744073709551616, 827240261886336764177, 39346408075296537575424, 1978419655660313589123979
Offset: 0

Views

Author

Keywords

Comments

Also number of labeled pointed rooted trees (or vertebrates) on n nodes.
For n >= 1 a(n) is also the number of n X n (0,1) matrices in which each row contains exactly one entry equal to 1. - Avi Peretz (njk(AT)netvision.net.il), Apr 21 2001
Also the number of labeled rooted trees on (n+1) nodes such that the root is lower than its children. Also the number of alternating labeled rooted ordered trees on (n+1) nodes such that the root is lower than its children. - Cedric Chauve (chauve(AT)lacim.uqam.ca), Mar 27 2002
With p(n) = the number of integer partitions of n, p(i) = the number of parts of the i-th partition of n, d(i) = the number of different parts of the i-th partition of n, p(j, i) = the j-th part of the i-th partition of n, m(i, j) = multiplicity of the j-th part of the i-th partition of n, one has: a(n) = Sum_{i=1..p(n)} (n!/(Product_{j=1..p(i)} p(i, j)!)) * ((n!/(n - p(i)))!/(Product_{j=1..d(i)} m(i, j)!)). - Thomas Wieder, May 18 2005
All rational solutions to the equation x^y = y^x, with x < y, are given by x = A000169(n+1)/A000312(n), y = A000312(n+1)/A007778(n), where n = 1, 2, 3, ... . - Nick Hobson, Nov 30 2006
a(n) is the total number of leaves in all (n+1)^(n-1) trees on {0,1,2,...,n} rooted at 0. For example, with edges directed away from the root, the trees on {0,1,2} are {0->1,0->2},{0->1->2},{0->2->1} and contain a total of a(2)=4 leaves. - David Callan, Feb 01 2007
Limit_{n->infinity} A000169(n+1)/a(n) = exp(1). Convergence is slow, e.g., it takes n > 74 to get one decimal place correct and n > 163 to get two of them. - Alonso del Arte, Jun 20 2011
Also smallest k such that binomial(k, n) is divisible by n^(n-1), n > 0. - Michel Lagneau, Jul 29 2013
For n >= 2 a(n) is represented in base n as "one followed by n zeros". - R. J. Cano, Aug 22 2014
Number of length-n words over the alphabet of n letters. - Joerg Arndt, May 15 2015
Number of prime parking functions of length n+1. - Rui Duarte, Jul 27 2015
The probability density functions p(x, m=q, n=q, mu=1) = A000312(q)*E(x, q, q) and p(x, m=q, n=1, mu=q) = (A000312(q)/A000142(q-1))*x^(q-1)*E(x, q, 1), with q >= 1, lead to this sequence, see A163931, A274181 and A008276. - Johannes W. Meijer, Jun 17 2016
Satisfies Benford's law [Miller, 2015]. - N. J. A. Sloane, Feb 12 2017
A signed version of this sequence apart from the first term (1, -4, -27, 256, 3125, -46656, ...), has the following property: for every prime p == 1 (mod 2n), (-1)^(n(n-1)/2)*n^n = A057077(n)*a(n) is always a 2n-th power residue modulo p. - Jianing Song, Sep 05 2018
From Juhani Heino, May 07 2019: (Start)
n^n is both Sum_{i=0..n} binomial(n,i)*(n-1)^(n-i)
and Sum_{i=0..n} binomial(n,i)*(n-1)^(n-i)*i.
The former is the familiar binomial distribution of a throw of n n-sided dice, according to how many times a required side appears, 0 to n. The latter is the same but each term is multiplied by its amount. This means that if the bank pays the player 1 token for each die that has the chosen side, it is always a fair game if the player pays 1 token to enter - neither bank nor player wins on average.
Examples:
2-sided dice (2 coins): 4 = 1 + 2 + 1 = 1*0 + 2*1 + 1*2 (0 omitted from now on);
3-sided dice (3 long triangular prisms): 27 = 8 + 12 + 6 + 1 = 12*1 + 6*2 + 1*3;
4-sided dice (4 long square prisms or 4 tetrahedrons): 256 = 81 + 108 + 54 + 12 + 1 = 108*1 + 54*2 + 12*3 + 1*4;
5-sided dice (5 long pentagonal prisms): 3125 = 1024 + 1280 + 640 + 160 + 20 + 1 = 1280*1 + 640*2 + 160*3 + 20*4 + 1*5;
6-sided dice (6 cubes): 46656 = 15625 + 18750 + 9375 + 2500 + 375 + 30 + 1 = 18750*1 + 9375*2 + 2500*3 + 375*4 + 30*5 + 1*6.
(End)
For each n >= 1 there is a graph on a(n) vertices whose largest independent set has size n and whose independent set sequence is constant (specifically, for each k=1,2,...,n, the graph has n^n independent sets of size k). There is no graph of smaller order with this property (Ball et al. 2019). - David Galvin, Jun 13 2019
For n >= 2 and 1 <= k <= n, a(n)*(n + 1)/4 + a(n)*(k - 1)*(n + 1 - k)/2*n is equal to the sum over all words w = w(1)...w(n) of length n over the alphabet {1, 2, ..., n} of the following quantity: Sum_{i=1..w(k)} w(i). Inspired by Problem 12432 in the AMM (see links). - Sela Fried, Dec 10 2023
Also, dimension of the unique cohomology group of the smallest interval containing the poset of partitions decorated by Perm, i.e. the poset of pointed partitions. - Bérénice Delcroix-Oger, Jun 25 2025

Examples

			G.f. = 1 + x + 4*x^2 + 27*x^3 + 256*x^4 + 3125*x^5 + 46656*x^6 + 823543*x^7 + ...
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, pp. 62, 63, 87.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 173, #39.
  • A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992, Eq. (4.2.2.37)
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

First column of triangle A055858. Row sums of A066324.
Cf. A001923 (partial sums), A002109 (partial products), A007781 (first differences), A066588 (sum of digits).
Cf. A056665, A081721, A130293, A168658, A275549-A275558 (various classes of endofunctions).

Programs

  • Haskell
    a000312 n = n ^ n
    a000312_list = zipWith (^) [0..] [0..]  -- Reinhard Zumkeller, Jul 07 2012
    
  • Maple
    A000312 := n->n^n: seq(A000312(n), n=0..17);
  • Mathematica
    Array[ #^# &, 16] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
    Table[Sum[StirlingS2[n, i] i! Binomial[n, i], {i, 0, n}], {n, 0, 20}] (* Geoffrey Critzer, Mar 17 2009 *)
    a[ n_] := If[ n < 1, Boole[n == 0], n^n]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ 1 / (1 + LambertW[-x]), {x, 0, n}]]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[n < 0, 0, n! SeriesCoefficient[ Nest[ 1 / (1 - x / (1 - Integrate[#, x])) &, 1 + O[x], n], {x, 0, n}]]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[ n < 0, 0, With[{m = n + 1}, m! SeriesCoefficient[ InverseSeries[ Series[ (x - 1) Log[1 - x], {x, 0, m}]], m]]]; (* Michael Somos, May 24 2014 *)
  • Maxima
    A000312[n]:=if n=0 then 1 else n^n$
    makelist(A000312[n],n,0,30); /* Martin Ettl, Oct 29 2012 */
    
  • PARI
    {a(n) = n^n};
    
  • PARI
    is(n)=my(b,k=ispower(n,,&b));if(k,for(e=1,valuation(k,b), if(k/b^e == e, return(1)))); n==1 \\ Charles R Greathouse IV, Jan 14 2013
    
  • PARI
    {a(n) = my(A = 1 + O(x)); if( n<0, 0, for(k=1, n, A = 1 / (1 - x / (1 - intformal( A)))); n! * polcoeff( A, n))}; /* Michael Somos, May 24 2014 */
    
  • Python
    def A000312(n): return n**n # Chai Wah Wu, Nov 07 2022

Formula

a(n-1) = -Sum_{i=1..n} (-1)^i*i*n^(n-1-i)*binomial(n, i). - Yong Kong (ykong(AT)curagen.com), Dec 28 2000
E.g.f.: 1/(1 + W(-x)), W(x) = principal branch of Lambert's function.
a(n) = Sum_{k>=0} binomial(n, k)*Stirling2(n, k)*k! = Sum_{k>=0} A008279(n,k)*A048993(n,k) = Sum_{k>=0} A019538(n,k)*A007318(n,k). - Philippe Deléham, Dec 14 2003
E.g.f.: 1/(1 - T), where T = T(x) is Euler's tree function (see A000169).
a(n) = A000169(n+1)*A128433(n+1,1)/A128434(n+1,1). - Reinhard Zumkeller, Mar 03 2007
Comment on power series with denominators a(n): Let f(x) = 1 + Sum_{n>=1} x^n/n^n. Then as x -> infinity, f(x) ~ exp(x/e)*sqrt(2*Pi*x/e). - Philippe Flajolet, Sep 11 2008
E.g.f.: 1 - exp(W(-x)) with an offset of 1 where W(x) = principal branch of Lambert's function. - Vladimir Kruchinin, Sep 15 2010
a(n) = (n-1)*a(n-1) + Sum_{i=1..n} binomial(n, i)*a(i-1)*a(n-i). - Vladimir Shevelev, Sep 30 2010
With an offset of 1, the e.g.f. is the compositional inverse ((x - 1)*log(1 - x))^(-1) = x + x^2/2! + 4*x^3/3! + 27*x^4/4! + .... - Peter Bala, Dec 09 2011
a(n) = denominator((1 + 1/n)^n) for n > 0. - Jean-François Alcover, Jan 14 2013
a(n) = A089072(n,n) for n > 0. - Reinhard Zumkeller, Mar 18 2013
a(n) = (n-1)^(n-1)*(2*n) + Sum_{i=1..n-2} binomial(n, i)*(i^i*(n-i-1)^(n-i-1)), n > 1, a(0) = 1, a(1) = 1. - Vladimir Kruchinin, Nov 28 2014
log(a(n)) = lim_{k->infinity} k*(n^(1+1/k) - n). - Richard R. Forberg, Feb 04 2015
From Ilya Gutkovskiy, Jun 18 2016: (Start)
Sum_{n>=1} 1/a(n) = 1.291285997... = A073009.
Sum_{n>=1} 1/a(n)^2 = 1.063887103... = A086648.
Sum_{n>=1} n!/a(n) = 1.879853862... = A094082. (End)
A000169(n+1)/a(n) -> e, as n -> oo. - Daniel Suteu, Jul 23 2016
a(n) = n!*Product_{k=1..n} binomial(n, k)/Product_{k=1..n-1} binomial(n-1, k) = n!*A001142(n)/A001142(n-1). - Tony Foster III, Sep 05 2018
a(n-1) = abs(p_n(2-n)), for n > 2, the single local extremum of the n-th row polynomial of A055137 with Bagula's sign convention. - Tom Copeland, Nov 15 2019
Sum_{n>=1} (-1)^(n+1)/a(n) = A083648. - Amiram Eldar, Jun 25 2021
Limit_{n->oo} (a(n+1)/a(n) - a(n)/a(n-1)) = e (see Brothers/Knox link). - Harlan J. Brothers, Oct 24 2021
Conjecture: a(n) = Sum_{i=0..n} A048994(n, i) * A048993(n+i, n) for n >= 0; proved by Mike Earnest, see link at A354797. - Werner Schulte, Jun 19 2022

A000670 Fubini numbers: number of preferential arrangements of n labeled elements; or number of weak orders on n labeled elements; or number of ordered partitions of [n].

Original entry on oeis.org

1, 1, 3, 13, 75, 541, 4683, 47293, 545835, 7087261, 102247563, 1622632573, 28091567595, 526858348381, 10641342970443, 230283190977853, 5315654681981355, 130370767029135901, 3385534663256845323, 92801587319328411133, 2677687796244384203115, 81124824998504073881821
Offset: 0

Views

Author

Keywords

Comments

Number of ways n competitors can rank in a competition, allowing for the possibility of ties.
Also number of asymmetric generalized weak orders on n points.
Also called the ordered Bell numbers.
A weak order is a relation that is transitive and complete.
Called Fubini numbers by Comtet: counts formulas in Fubini theorem when switching the order of summation in multiple sums. - Olivier Gérard, Sep 30 2002 [Named after the Italian mathematician Guido Fubini (1879-1943). - Amiram Eldar, Jun 17 2021]
If the points are unlabeled then the answer is a(0) = 1, a(n) = 2^(n-1) (cf. A011782).
For n>0, a(n) is the number of elements in the Coxeter complex of type A_{n-1}. The corresponding sequence for type B is A080253 and there one can find a worked example as well as a geometric interpretation. - Tim Honeywill and Paul Boddington, Feb 10 2003
Also number of labeled (1+2)-free posets. - Detlef Pauly, May 25 2003
Also the number of chains of subsets starting with the empty set and ending with a set of n distinct objects. - Andrew Niedermaier, Feb 20 2004
From Michael Somos, Mar 04 2004: (Start)
Stirling transform of A007680(n) = [3,10,42,216,...] gives [3,13,75,541,...].
Stirling transform of a(n) = [1,3,13,75,...] is A083355(n) = [1,4,23,175,...].
Stirling transform of A000142(n) = [1,2,6,24,120,...] is a(n) = [1,3,13,75,...].
Stirling transform of A005359(n-1) = [1,0,2,0,24,0,...] is a(n-1) = [1,1,3,13,75,...].
Stirling transform of A005212(n-1) = [0,1,0,6,0,120,0,...] is a(n-1) = [0,1,3,13,75,...].
(End)
Unreduced denominators in convergent to log(2) = lim_{n->infinity} n*a(n-1)/a(n).
a(n) is congruent to a(n+(p-1)p^(h-1)) (mod p^h) for n >= h (see Barsky).
Stirling-Bernoulli transform of 1/(1-x^2). - Paul Barry, Apr 20 2005
This is the sequence of moments of the probability distribution of the number of tails before the first head in a sequence of fair coin tosses. The sequence of cumulants of the same probability distribution is A000629. That sequence is twice the result of deletion of the first term of this sequence. - Michael Hardy (hardy(AT)math.umn.edu), May 01 2005
With p(n) = the number of integer partitions of n, p(i) = the number of parts of the i-th partition of n, d(i) = the number of different parts of the i-th partition of n, p(j,i) = the j-th part of the i-th partition of n, m(i,j) = multiplicity of the j-th part of the i-th partition of n, one has: a(n) = Sum_{i=1..p(n)} (n!/(Product_{j=1..p(i)} p(i,j)!)) * (p(i)!/(Product_{j=1..d(i)} m(i,j)!)). - Thomas Wieder, May 18 2005
The number of chains among subsets of [n]. The summed term in the new formula is the number of such chains of length k. - Micha Hofri (hofri(AT)wpi.edu), Jul 01 2006
Occurs also as first column of a matrix-inversion occurring in a sum-of-like-powers problem. Consider the problem for any fixed natural number m>2 of finding solutions to the equation Sum_{k=1..n} k^m = (k+1)^m. Erdős conjectured that there are no solutions for n, m > 2. Let D be the matrix of differences of D[m,n] := Sum_{k=1..n} k^m - (k+1)^m. Then the generating functions for the rows of this matrix D constitute a set of polynomials in n (for varying n along columns) and the m-th polynomial defining the m-th row. Let GF_D be the matrix of the coefficients of this set of polynomials. Then the present sequence is the (unsigned) first column of GF_D^-1. - Gottfried Helms, Apr 01 2007
Assuming A = log(2), D is d/dx and f(x) = x/(exp(x)-1), we have a(n) = (n!/2*A^(n+1)) Sum_{k=0..n} (A^k/k!) D^n f(-A) which gives Wilf's asymptotic value when n tends to infinity. Equivalently, D^n f(-a) = 2*( A*a(n) - 2*a(n-1) ). - Martin Kochanski (mjk(AT)cardbox.com), May 10 2007
List partition transform (see A133314) of (1,-1,-1,-1,...). - Tom Copeland, Oct 24 2007
First column of A154921. - Mats Granvik, Jan 17 2009
A slightly more transparent interpretation of a(n) is as the number of 'factor sequences' of N for the case in which N is a product of n distinct primes. A factor sequence of N of length k is of the form 1 = x(1), x(2), ..., x(k) = N, where {x(i)} is an increasing sequence such that x(i) divides x(i+1), i=1,2,...,k-1. For example, N=70 has the 13 factor sequences {1,70}, {1,2,70}, {1,5,70}, {1,7,70}, {1,10,70}, {1,14,70}, {1,35,70}, {1,2,10,70}, {1,2,14,70}, {1,5,10,70}, {1,5,35,70}, {1,7,14,70}, {1,7,35,70}. - Martin Griffiths, Mar 25 2009
Starting (1, 3, 13, 75, ...) = row sums of triangle A163204. - Gary W. Adamson, Jul 23 2009
Equals double inverse binomial transform of A007047: (1, 3, 11, 51, ...). - Gary W. Adamson, Aug 04 2009
If f(x) = Sum_{n>=0} c(n)*x^n converges for every x, then Sum_{n>=0} f(n*x)/2^(n+1) = Sum_{n>=0} c(n)*a(n)*x^n. Example: Sum_{n>=0} exp(n*x)/2^(n+1) = Sum_{n>=0} a(n)*x^n/n! = 1/(2-exp(x)) = e.g.f. - Miklos Kristof, Nov 02 2009
Hankel transform is A091804. - Paul Barry, Mar 30 2010
It appears that the prime numbers greater than 3 in this sequence (13, 541, 47293, ...) are of the form 4n+1. - Paul Muljadi, Jan 28 2011
The Fi1 and Fi2 triangle sums of A028246 are given by the terms of this sequence. For the definitions of these triangle sums, see A180662. - Johannes W. Meijer, Apr 20 2011
The modified generating function A(x) = 1/(2-exp(x))-1 = x + 3*x^2/2! + 13*x^3/3! + ... satisfies the autonomous differential equation A' = 1 + 3*A + 2*A^2 with initial condition A(0) = 0. Applying [Bergeron et al., Theorem 1] leads to two combinatorial interpretations for this sequence: (A) a(n) gives the number of plane-increasing 0-1-2 trees on n vertices, where vertices of outdegree 1 come in 3 colors and vertices of outdegree 2 come in 2 colors. (B) a(n) gives the number of non-plane-increasing 0-1-2 trees on n vertices, where vertices of outdegree 1 come in 3 colors and vertices of outdegree 2 come in 4 colors. Examples are given below. - Peter Bala, Aug 31 2011
Starting with offset 1 = the eigensequence of A074909 (the beheaded Pascal's triangle), and row sums of triangle A208744. - Gary W. Adamson, Mar 05 2012
a(n) = number of words of length n on the alphabet of positive integers for which the letters appearing in the word form an initial segment of the positive integers. Example: a(2) = 3 counts 11, 12, 21. The map "record position of block containing i, 1<=i<=n" is a bijection from lists of sets on [n] to these words. (The lists of sets on [2] are 12, 1/2, 2/1.) - David Callan, Jun 24 2013
This sequence was the subject of one of the earliest uses of the database. Don Knuth, who had a computer printout of the database prior to the publication of the 1973 Handbook, wrote to N. J. A. Sloane on May 18, 1970, saying: "I have just had my first real 'success' using your index of sequences, finding a sequence treated by Cayley that turns out to be identical to another (a priori quite different) sequence that came up in connection with computer sorting." A000670 is discussed in Exercise 3 of Section 5.3.1 of The Art of Computer Programming, Vol. 3, 1973. - N. J. A. Sloane, Aug 21 2014
Ramanujan gives a method of finding a continued fraction of the solution x of an equation 1 = x + a2*x^2 + ... and uses log(2) as the solution of 1 = x + x^2/2 + x^3/6 + ... as an example giving the sequence of simplified convergents as 0/1, 1/1, 2/3, 9/13, 52/75, 375/541, ... of which the sequence of denominators is this sequence, while A052882 is the numerators. - Michael Somos, Jun 19 2015
For n>=1, a(n) is the number of Dyck paths (A000108) with (i) n+1 peaks (UD's), (ii) no UUDD's, and (iii) at least one valley vertex at every nonnegative height less than the height of the path. For example, a(2)=3 counts UDUDUD (of height 1 with 2 valley vertices at height 0), UDUUDUDD, UUDUDDUD. These paths correspond, under the "glove" or "accordion" bijection, to the ordered trees counted by Cayley in the 1859 reference, after a harmless pruning of the "long branches to a leaf" in Cayley's trees. (Cayley left the reader to infer the trees he was talking about from examples for small n and perhaps from his proof.) - David Callan, Jun 23 2015
From David L. Harden, Apr 09 2017: (Start)
Fix a set X and define two distance functions d,D on X to be metrically equivalent when d(x_1,y_1) <= d(x_2,y_2) iff D(x_1,y_1) <= D(x_2,y_2) for all x_1, y_1, x_2, y_2 in X.
Now suppose that we fix a function f from unordered pairs of distinct elements of X to {1,...,n}. Then choose positive real numbers d_1 <= ... <= d_n such that d(x,y) = d_{f(x,y)}; the set of all possible choices of the d_i's makes this an n-parameter family of distance functions on X. (The simplest example of such a family occurs when n is a triangular number: When that happens, write n = (k 2). Then the set of all distance functions on X, when |X| = k, is such a family.) The number of such distance functions, up to metric equivalence, is a(n).
It is easy to see that an equivalence class of distance functions gives rise to a well-defined weak order on {d_1, ..., d_n}. To see that any weak order is realizable, choose distances from the set of integers {n-1, ..., 2n-2} so that the triangle inequality is automatically satisfied. (End)
a(n) is the number of rooted labeled forests on n nodes that avoid the patterns 213, 312, and 321. - Kassie Archer, Aug 30 2018
From A.H.M. Smeets, Nov 17 2018: (Start)
Also the number of semantic different assignments to n variables (x_1, ..., x_n) including simultaneous assignments. From the example given by Joerg Arndt (Mar 18 2014), this is easily seen by replacing
"{i}" by "x_i := expression_i(x_1, ..., x_n)",
"{i, j}" by "x_i, x_j := expression_i(x_1, .., x_n), expression_j(x_1, ..., x_n)", i.e., simultaneous assignment to two different variables (i <> j),
similar for simultaneous assignments to more variables, and
"<" by ";", i.e., the sequential constructor. These examples are directly related to "Number of ways n competitors can rank in a competition, allowing for the possibility of ties." in the first comment.
From this also the number of different mean definitions as obtained by iteration of n different mean functions on n initial values. Examples:
the AGM(x1,x2) = AGM(x2,x1) is represented by {arithmetic mean, geometric mean}, i.e., simultaneous assignment in any iteration step;
Archimedes's scheme (for Pi) is represented by {geometric mean} < {harmonic mean}, i.e., sequential assignment in any iteration step;
the geometric mean of two values can also be observed by {arithmetic mean, harmonic mean};
the AGHM (as defined in A319215) is represented by {arithmetic mean, geometric mean, harmonic mean}, i.e., simultaneous assignment, but there are 12 other semantic different ways to assign the values in an AGHM scheme.
By applying power means (also called Holder means) this can be extended to any value of n. (End)
Total number of faces of all dimensions in the permutohedron of order n. For example, the permutohedron of order 3 (a hexagon) has 6 vertices + 6 edges + 1 2-face = 13 faces, and the permutohedron of order 4 (a truncated octahedron) has 24 vertices + 36 edges + 14 2-faces + 1 3-face = 75 faces. A001003 is the analogous sequence for the associahedron. - Noam Zeilberger, Dec 08 2019
Number of odd multinomial coefficients N!/(a_1!*a_2!*...*a_k!). Here each a_i is positive, and Sum_{i} a_i = N (so 2^{N-1} multinomial coefficients in all), where N is any positive integer whose binary expansion has n 1's. - Richard Stanley, Apr 05 2022 (edited Oct 19 2022)
From Peter Bala, Jul 08 2022: (Start)
Conjecture: Let k be a positive integer. The sequence obtained by reducing a(n) modulo k is eventually periodic with the period dividing phi(k) = A000010(k). For example, modulo 16 we obtain the sequence [1, 1, 3, 13, 11, 13, 11, 13, 11, 13, ...], with an apparent period of 2 beginning at a(4). Cf. A354242.
More generally, we conjecture that the same property holds for integer sequences having an e.g.f. of the form G(exp(x) - 1), where G(x) is an integral power series. (End)
a(n) is the number of ways to form a permutation of [n] and then choose a subset of its descent set. - Geoffrey Critzer, Apr 29 2023
This is the Akiyama-Tanigawa transform of A000079, the powers of two. - Shel Kaphan, May 02 2024

Examples

			Let the points be labeled 1,2,3,...
a(2) = 3: 1<2, 2<1, 1=2.
a(3) = 13 from the 13 arrangements: 1<2<3, 1<3<2, 2<1<3, 2<3<1, 3<1<2, 3<2<1, 1=2<3 1=3<2, 2=3<1, 1<2=3, 2<1=3, 3<1=2, 1=2=3.
Three competitors can finish in 13 ways: 1,2,3; 1,3,2; 2,1,3; 2,3,1; 3,1,2; 3,2,1; 1,1,3; 2,2,1; 1,3,1; 2,1,2; 3,1,1; 1,2,2; 1,1,1.
a(3) = 13. The 13 plane increasing 0-1-2 trees on 3 vertices, where vertices of outdegree 1 come in 3 colors and vertices of outdegree 2 come in 2 colors, are:
........................................................
........1 (x3 colors).....1(x2 colors)....1(x2 colors)..
........|................/.\............./.\............
........2 (x3 colors)...2...3...........3...2...........
........|...............................................
........3...............................................
......====..............====............====............
.Totals 9......+..........2....+..........2....=..13....
........................................................
a(4) = 75. The 75 non-plane increasing 0-1-2 trees on 4 vertices, where vertices of outdegree 1 come in 3 colors and vertices of outdegree 2 come in 4 colors, are:
...............................................................
.....1 (x3).....1(x4).......1(x4).....1(x4)........1(x3).......
.....|........./.\........./.\......./.\...........|...........
.....2 (x3)...2...3.(x3)..3...2(x3).4...2(x3)......2(x4).......
.....|.............\...........\.........\......../.\..........
.....3.(x3).........4...........4.........3......3...4.........
.....|.........................................................
.....4.........................................................
....====......=====........====......====.........====.........
Tots 27....+....12......+...12....+...12.......+...12...=...75.
From _Joerg Arndt_, Mar 18 2014: (Start)
The a(3) = 13 strings on the alphabet {1,2,3} containing all letters up to the maximal value appearing and the corresponding ordered set partitions are:
01:  [ 1 1 1 ]     { 1, 2, 3 }
02:  [ 1 1 2 ]     { 1, 2 } < { 3 }
03:  [ 1 2 1 ]     { 1, 3 } < { 2 }
04:  [ 2 1 1 ]     { 2, 3 } < { 1 }
05:  [ 1 2 2 ]     { 1 } < { 2, 3 }
06:  [ 2 1 2 ]     { 2 } < { 1, 3 }
07:  [ 2 2 1 ]     { 3 } < { 1, 2 }
08:  [ 1 2 3 ]     { 1 } < { 2 } < { 3 }
09:  [ 1 3 2 ]     { 1 } < { 3 } < { 2 }
00:  [ 2 1 3 ]     { 2 } < { 1 } < { 3 }
11:  [ 2 3 1 ]     { 3 } < { 1 } < { 2 }
12:  [ 3 1 2 ]     { 2 } < { 3 } < { 1 }
13:  [ 3 2 1 ]     { 3 } < { 2 } < { 1 }
(End)
		

References

  • Mohammad K. Azarian, Geometric Series, Problem 329, Mathematics and Computer Education, Vol. 30, No. 1, Winter 1996, p. 101. Solution published in Vol. 31, No. 2, Spring 1997, pp. 196-197.
  • Norman Biggs, E. Keith Lloyd and Robin J. Wilson, Graph Theory 1736-1936, Oxford, 1976, p. 44 (P(x)).
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 183 (see R_n).
  • Kenneth S. Brown, Buildings, Springer-Verlag, 1988.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 228.
  • Jean-Marie De Koninck, Ces nombres qui nous fascinent, Entry 13, pp 4, Ellipses, Paris 2008.
  • P. J. Freyd, On the size of Heyting semi-lattices, preprint, 2002.
  • Ian P. Goulden and David M. Jackson, Combinatorial Enumeration, John Wiley and Sons, N.Y., 1983.
  • Ronald L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd Ed., 1994, exercise 7.44 (pp. 378, 571).
  • Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
  • Donald E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 3, 1973, Section 5.3.1, Problem 3.
  • M. Muresan, Generalized Fubini numbers, Stud. Cerc. Mat., Vol. 37, No. 1 (1985), pp. 70-76.
  • Paul Peart, Hankel determinants via Stieltjes matrices. Proceedings of the Thirty-first Southeastern International Conference on Combinatorics, Graph Theory and Computing (Boca Raton, FL, 2000). Congr. Numer. 144 (2000), 153-159.
  • S. Ramanujan, Notebooks, Tata Institute of Fundamental Research, Bombay 1957 Vol. 1, see page 19.
  • Ulrike Sattler, Decidable classes of formal power series with nice closure properties, Diplomarbeit im Fach Informatik, Univ. Erlangen - Nuernberg, Jul 27 1994.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Richard P. Stanley, Enumerative Combinatorics, Wadsworth, Vol. 1, 1986; see Example 3.15.10, p. 146.
  • Jack van der Elsen, Black and White Transformations, Shaker Publishing, Maastricht, 2005, p. 18.

Crossrefs

See A240763 for a list of the actual preferential arrangements themselves.
A000629, this sequence, A002050, A032109, A052856, A076726 are all more-or-less the same sequence. - N. J. A. Sloane, Jul 04 2012
Binomial transform of A052841. Inverse binomial transform of A000629.
Asymptotic to A034172.
Row r=1 of A094416. Row 0 of array in A226513. Row n=1 of A262809.
Main diagonal of: A135313, A261781, A276890, A327245, A327583, A327584.
Row sums of triangles A019538, A131689, A208744 and A276891.
A217389 and A239914 give partial sums.
Column k=1 of A326322.

Programs

  • Haskell
    a000670 n = a000670_list !! n
    a000670_list = 1 : f [1] (map tail $ tail a007318_tabl) where
       f xs (bs:bss) = y : f (y : xs) bss where y = sum $ zipWith (*) xs bs
    -- Reinhard Zumkeller, Jul 26 2014
    
  • Magma
    R:=PowerSeriesRing(Rationals(), 40);
    Coefficients(R!(Laplace( 1/(2-Exp(x)) ))); // G. C. Greubel, Jun 11 2024
  • Maple
    A000670 := proc(n) option remember; local k; if n <=1 then 1 else add(binomial(n,k)*A000670(n-k),k=1..n); fi; end;
    with(combstruct); SeqSetL := [S, {S=Sequence(U), U=Set(Z,card >= 1)},labeled]; seq(count(SeqSetL,size=j),j=1..12);
    with(combinat): a:=n->add(add((-1)^(k-i)*binomial(k, i)*i^n, i=0..n), k=0..n): seq(a(n), n=0..18); # Zerinvary Lajos, Jun 03 2007
    a := n -> add(combinat:-eulerian1(n,k)*2^k,k=0..n): # Peter Luschny, Jan 02 2015
    a := n -> (polylog(-n, 1/2)+`if`(n=0,1,0))/2: seq(round(evalf(a(n),32)), n=0..20); # Peter Luschny, Nov 03 2015
    # next Maple program:
    b:= proc(n, k) option remember;
         `if`(n=0, k!, k*b(n-1, k)+b(n-1, k+1))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..20);  # Alois P. Heinz, Aug 04 2021
  • Mathematica
    Table[(PolyLog[-z, 1/2] + KroneckerDelta[z])/2, {z, 0, 20}] (* Wouter Meeussen *)
    a[0] = 1; a[n_]:= a[n]= Sum[Binomial[n, k]*a[n-k], {k, 1, n}]; Table[a[n], {n, 0, 30}] (* Roger L. Bagula and Gary W. Adamson, Sep 13 2008 *)
    t = 30; Range[0, t]! CoefficientList[Series[1/(2 - Exp[x]), {x, 0, t}], x] (* Vincenzo Librandi, Mar 16 2014 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ 1 / (2 - Exp@x), {x, 0, n}]]; (* Michael Somos, Jun 19 2015 *)
    Table[Sum[k^n/2^(k+1),{k,0,Infinity}],{n,0,20}] (* Vaclav Kotesovec, Jun 26 2015 *)
    Table[HurwitzLerchPhi[1/2, -n, 0]/2, {n, 0, 20}] (* Jean-François Alcover, Jan 31 2016 *)
    Fubini[n_, r_] := Sum[k!*Sum[(-1)^(i+k+r)*((i+r)^(n-r)/(i!*(k-i-r)!)), {i, 0, k-r}], {k, r, n}]; Fubini[0, 1] = 1; Table[Fubini[n, 1], {n, 0, 20}] (* Jean-François Alcover, Mar 31 2016 *)
    Eulerian1[0, 0] = 1; Eulerian1[n_, k_] := Sum[(-1)^j (k-j+1)^n Binomial[n+1, j], {j, 0, k+1}]; Table[Sum[Eulerian1[n, k] 2^k, {k, 0, n}], {n, 0, 20}] (* Jean-François Alcover, Jul 13 2019, after Peter Luschny *)
    Prepend[Table[-(-1)^k HurwitzLerchPhi[2, -k, 0]/2, {k, 1, 50}], 1] (* Federico Provvedi,Sep 05 2020 *)
    Table[Sum[k!*StirlingS2[n,k], {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Nov 22 2020 *)
  • Maxima
    makelist(sum(stirling2(n,k)*k!,k,0,n),n,0,12); /* Emanuele Munarini, Jul 07 2011 */
    
  • Maxima
    a[0]:1$ a[n]:=sum(binomial(n,k)*a[n-k],k,1,n)$ A000670(n):=a[n]$ makelist(A000670(n),n,0,30); /* Martin Ettl, Nov 05 2012 */
    
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( subst( 1 / (1 - y), y, exp(x + x*O(x^n)) - 1), n))}; /* Michael Somos, Mar 04 2004 */
    
  • PARI
    Vec(serlaplace(1/(2-exp('x+O('x^66))))) /* Joerg Arndt, Jul 10 2011 */
    
  • PARI
    {a(n)=polcoeff(sum(m=0,n,m!*x^m/prod(k=1,m,1-k*x+x*O(x^n))),n)} /* Paul D. Hanna, Jul 20 2011 */
    
  • PARI
    {a(n) = if( n<1, n==0, sum(k=1, n, binomial(n, k) * a(n-k)))}; /* Michael Somos, Jul 16 2017 */
    
  • Python
    from math import factorial
    from sympy.functions.combinatorial.numbers import stirling
    def A000670(n): return sum(factorial(k)*stirling(n,k) for k in range(n+1)) # Chai Wah Wu, Nov 08 2022
    
  • Sage
    @CachedFunction
    def A000670(n) : return 1 if n == 0 else add(A000670(k)*binomial(n,k) for k in range(n))
    [A000670(n) for n in (0..20)] # Peter Luschny, Jul 14 2012
    

Formula

a(n) = Sum_{k=0..n} k! * StirlingS2(n,k) (whereas the Bell numbers A000110(n) = Sum_{k=0..n} StirlingS2(n,k)).
E.g.f.: 1/(2-exp(x)).
a(n) = Sum_{k=1..n} binomial(n, k)*a(n-k), a(0) = 1.
The e.g.f. y(x) satisfies y' = 2*y^2 - y.
a(n) = A052856(n) - 1, if n>0.
a(n) = A052882(n)/n, if n>0.
a(n) = A076726(n)/2.
a(n) is asymptotic to (1/2)*n!*log_2(e)^(n+1), where log_2(e) = 1.442695... [Barthelemy80, Wilf90].
For n >= 1, a(n) = (n!/2) * Sum_{k=-infinity..infinity} of (log(2) + 2 Pi i k)^(-n-1). - Dean Hickerson
a(n) = ((x*d/dx)^n)(1/(2-x)) evaluated at x=1. - Karol A. Penson, Sep 24 2001
For n>=1, a(n) = Sum_{k>=1} (k-1)^n/2^k = A000629(n)/2. - Benoit Cloitre, Sep 08 2002
Value of the n-th Eulerian polynomial (cf. A008292) at x=2. - Vladeta Jovovic, Sep 26 2003
First Eulerian transform of the powers of 2 [A000079]. See A000142 for definition of FET. - Ross La Haye, Feb 14 2005
a(n) = Sum_{k=0..n} (-1)^k*k!*Stirling2(n+1, k+1)*(1+(-1)^k)/2. - Paul Barry, Apr 20 2005
a(n) + a(n+1) = 2*A005649(n). - Philippe Deléham, May 16 2005 - Thomas Wieder, May 18 2005
Equals inverse binomial transform of A000629. - Gary W. Adamson, May 30 2005
a(n) = Sum_{k=0..n} k!*( Stirling2(n+2, k+2) - Stirling2(n+1, k+2) ). - Micha Hofri (hofri(AT)wpi.edu), Jul 01 2006
Recurrence: 2*a(n) = (a+1)^n where superscripts are converted to subscripts after binomial expansion - reminiscent of Bernoulli numbers' B_n = (B+1)^n. - Martin Kochanski (mjk(AT)cardbox.com), May 10 2007
a(n) = (-1)^n * n! * Laguerre(n,P((.),2)), umbrally, where P(j,t) are the polynomials in A131758. - Tom Copeland, Sep 27 2007
Formula in terms of the hypergeometric function, in Maple notation: a(n) = hypergeom([2,2...2],[1,1...1],1/2)/4, n=1,2..., where in the hypergeometric function there are n upper parameters all equal to 2 and n-1 lower parameters all equal to 1 and the argument is equal to 1/2. Example: a(4) = evalf(hypergeom([2,2,2,2],[1,1,1],1/2)/4) = 75. - Karol A. Penson, Oct 04 2007
a(n) = Sum_{k=0..n} A131689(n,k). - Philippe Deléham, Nov 03 2008
From Peter Bala, Jul 01 2009: (Start)
Analogy with the Bernoulli numbers.
We enlarge upon the above comment of M. Kochanski.
The Bernoulli polynomials B_n(x), n = 0,1,..., are given by the formula
(1)... B_n(x) := Sum_{k=0..n} binomial(n,k)*B(k)*x^(n-k),
where B(n) denotes the sequence of Bernoulli numbers B(0) = 1,
B(1) = -1/2, B(2) = 1/6, B(3) = 0, ....
By analogy, we associate with the present sequence an Appell sequence of polynomials {P_n(x)} n >= 0 defined by
(2)... P_n(x) := Sum_{k=0..n} binomial(n,k)*a(k)*x^(n-k).
These polynomials have similar properties to the Bernoulli polynomials.
The first few values are P_0(x) = 1, P_1(x) = x + 1,
P_2(x) = x^2 + 2*x + 3, P_3(x) = x^3 + 3*x^2 + 9*x + 13 and
P_4(x) = x^4 + 4*x^3 + 18*x^2 + 52*x + 75. See A154921 for the triangle of coefficients of these polynomials.
The e.g.f. for this polynomial sequence is
(3)... exp(x*t)/(2 - exp(t)) = 1 + (x + 1)*t + (x^2 + 2*x + 3)*t^2/2! + ....
The polynomials satisfy the difference equation
(4)... 2*P_n(x - 1) - P_n(x) = (x - 1)^n,
and so may be used to evaluate the weighted sums of powers of integers
(1/2)*1^m + (1/2)^2*2^m + (1/2)^3*3^m + ... + (1/2)^(n-1)*(n-1)^m
via the formula
(5)... Sum_{k=1..n-1} (1/2)^k*k^m = 2*P_m(0) - (1/2)^(n-1)*P_m(n),
analogous to the evaluation of the sums 1^m + 2^m + ... + (n-1)^m in terms of Bernoulli polynomials.
This last result can be generalized to
(6)... Sum_{k=1..n-1} (1/2)^k*(k+x)^m = 2*P_m(x)-(1/2)^(n-1)*P_m(x+n).
For more properties of the polynomials P_n(x), refer to A154921.
For further information on weighted sums of powers of integers and the associated polynomial sequences, see A162312.
The present sequence also occurs in the evaluation of another sum of powers of integers. Define
(7)... S_m(n) := Sum_{k=1..n-1} (1/2)^k*((n-k)*k)^m, m = 1,2,....
Then
(8)... S_m(n) = (-1)^m *[2*Q_m(-n) - (1/2)^(n-1)*Q_m(n)],
where Q_m(x) are polynomials in x given by
(9)... Q_m(x) = Sum_{k=0..m} a(m+k)*binomial(m,k)*x^(m-k).
The first few values are Q_1(x) = x + 3, Q_2(x) = 3*x^2 + 26*x + 75
and Q_3(x) = 13*x^3 + 225*x^2 + 1623*x + 4683.
For example, m = 2 gives
(10)... S_2(n) := Sum_{k=1..n-1} (1/2)^k*((n-k)*k)^2
= 2*(3*n^2 - 26*n + 75) - (1/2)^(n-1)*(3*n^2 + 26*n + 75).
(End)
G.f.: 1/(1-x/(1-2*x/(1-2*x/(1-4*x/(1-3*x/(1-6*x/(1-4*x/(1-8*x/(1-5*x/(1-10*x/(1-6*x/(1-... (continued fraction); coefficients of continued fraction are given by floor((n+2)/2)*(3-(-1)^n)/2 (A029578(n+2)). - Paul Barry, Mar 30 2010
G.f.: 1/(1-x-2*x^2/(1-4*x-8*x^2/(1-7*x-18*x^2/(1-10*x-32*x^2/(1../(1-(3*n+1)*x-2*(n+1)^2*x^2/(1-... (continued fraction). - Paul Barry, Jun 17 2010
G.f.: A(x) = Sum_{n>=0} n!*x^n / Product_{k=1..n} (1-k*x). - Paul D. Hanna, Jul 20 2011
a(n) = A074206(q_1*q_2*...*q_n), where {q_i} are distinct primes. - Vladimir Shevelev, Aug 05 2011
The adjusted e.g.f. A(x) := 1/(2-exp(x))-1, has inverse function A(x)^-1 = Integral_{t=0..x} 1/((1+t)*(1+2*t)). Applying [Dominici, Theorem 4.1] to invert the integral yields a formula for a(n): Let f(x) = (1+x)*(1+2*x). Let D be the operator f(x)*d/dx. Then a(n) = D^(n-1)(f(x)) evaluated at x = 0. Compare with A050351. - Peter Bala, Aug 31 2011
a(n) = D^n*(1/(1-x)) evaluated at x = 0, where D is the operator (1+x)*d/dx. Cf. A052801. - Peter Bala, Nov 25 2011
From Sergei N. Gladkovskii, from Oct 2011 to Oct 2013: (Start)
Continued fractions:
G.f.: 1+x/(1-x+2*x*(x-1)/(1+3*x*(2*x-1)/(1+4*x*(3*x-1)/(1+5*x*(4*x-1)/(1+... or 1+x/(U(0)-x), U(k) = 1+(k+2)*(k*x+x-1)/U(k+1).
E.g.f.: 1 + x/(G(0)-2*x) where G(k) = x + k + 1 - x*(k+1)/G(k+1).
E.g.f. (2 - 2*x)*(1 - 2*x^3/(8*x^2 - 4*x + (x^2 - 4*x + 2)*G(0)))/(x^2 - 4*x + 2) where G(k) = k^2 + k*(x+4) + 2*x + 3 - x*(k+1)*(k+3)^2 /G(k+1).
G.f.: 1 + x/G(0) where G(k) = 1 - 3*x*(k+1) - 2*x^2*(k+1)*(k+2)/G(k+1).
G.f.: 1/G(0) where G(k) = 1 - x*(k+1)/( 1 - 2*x*(k+1)/G(k+1) ).
G.f.: 1 + x/Q(0), where Q(k) = 1 - 3*x*(2*k+1) - 2*x^2*(2*k+1)*(2*k+2)/( 1 - 3*x*(2*k+2) - 2*x^2*(2*k+2)*(2*k+3)/Q(k+1) ).
G.f.: T(0)/(1-x), where T(k) = 1 - 2*x^2*(k+1)^2/( 2*x^2*(k+1)^2 - (1-x-3*x*k)*(1-4*x-3*x*k)/T(k+1) ). (End)
a(n) is always odd. For odd prime p and n >= 1, a((p-1)*n) = 0 (mod p). - Peter Bala, Sep 18 2013
a(n) = log(2)* Integral_{x>=0} floor(x)^n * 2^(-x) dx. - Peter Bala, Feb 06 2015
For n > 0, a(n) = Re(polygamma(n, i*log(2)/(2*Pi))/(2*Pi*i)^(n+1)) - n!/(2*log(2)^(n+1)). - Vladimir Reshetnikov, Oct 15 2015
a(n) = Sum_{k=1..n} (k*b2(k-1)*(k)!*Stirling2(n, k)), n>0, a(0)=1, where b2(n) is the n-th Bernoulli number of the second kind. - Vladimir Kruchinin, Nov 21 2016
Conjecture: a(n) = Sum_{k=0..2^(n-1)-1} A284005(k) for n > 0 with a(0) = 1. - Mikhail Kurkov, Jul 08 2018
a(n) = A074206(k) for squarefree k with n prime factors. In particular a(n) = A074206(A002110(n)). - Amiram Eldar, May 13 2019
For n > 0, a(n) = -(-1)^n / 2 * PHI(2, -n, 0), where PHI(z, s, a) is the Lerch zeta function. - Federico Provvedi, Sep 05 2020
a(n) = Sum_{s in S_n} Product_{i=1..n} binomial(i,s(i)-1), where s ranges over the set S_n of permutations of [n]. - Jose A. Rodriguez, Feb 02 2021
Sum_{n>=0} 1/a(n) = 2.425674839121428857970063350500499393706641093287018840857857170864211946122664... - Vaclav Kotesovec, Jun 17 2021
From Jacob Sprittulla, Oct 05 2021: (Start)
The following identities hold for sums over Stirling numbers of the second kind with even or odd second argument:
a(n) = 2 * Sum_{k=0..floor(n/2)} ((2k)! * Stirling2(n,2*k) ) - (-1)^n = 2*A052841-(-1)^n
a(n) = 2 * Sum_{k=0..floor(n/2)} ((2k+1)!* Stirling2(n,2*k+1))+ (-1)^n = 2*A089677+(-1)^n
a(n) = Sum_{k=1..floor((n+1)/2)} ((2k-1)!* Stirling2(n+1,2*k))
a(n) = Sum_{k=0..floor((n+1)/2)} ((2k)! * Stirling2(n+1,2*k+1)). (End)

A000583 Fourth powers: a(n) = n^4.

Original entry on oeis.org

0, 1, 16, 81, 256, 625, 1296, 2401, 4096, 6561, 10000, 14641, 20736, 28561, 38416, 50625, 65536, 83521, 104976, 130321, 160000, 194481, 234256, 279841, 331776, 390625, 456976, 531441, 614656, 707281, 810000, 923521, 1048576, 1185921
Offset: 0

Views

Author

Keywords

Comments

Figurate numbers based on 4-dimensional regular convex polytope called the 4-measure polytope, 4-hypercube or tesseract with Schlaefli symbol {4,3,3}. - Michael J. Welch (mjw1(AT)ntlworld.com), Apr 01 2004
Totally multiplicative sequence with a(p) = p^4 for prime p. - Jaroslav Krizek, Nov 01 2009
The binomial transform yields A058649. The inverse binomial transforms yields the (finite) 0, 1, 14, 36, 24, the 4th row in A019538 and A131689. - R. J. Mathar, Jan 16 2013
Generate Pythagorean triangles with parameters a and b to get sides of lengths x = b^2-a^2, y = 2*a*b, and z = a^2 + b^2. In particular use a=n-1 and b=n for a triangle with sides (x1,y1,z1) and a=n and b=n+1 for another triangle with sides (x2,y2,z2). Then x1*x2 + y1*y2 + z1*z2 = 8*a(n). - J. M. Bergot, Jul 22 2013
For n > 0, a(n) is the largest integer k such that k^4 + n is a multiple of k + n. Also, for n > 0, a(n) is the largest integer k such that k^2 + n^2 is a multiple of k + n^2. - Derek Orr, Sep 04 2014
Does not satisfy Benford's law [Ross, 2012]. - N. J. A. Sloane, Feb 08 2017
a(n+2)/2 is the area of a trapezoid with vertices at (T(n), T(n+1)), (T(n+1), T(n)), (T(n+1), T(n+2)), and (T(n+2), T(n+1)) with T(n)=A000292(n) for n >= 0. - J. M. Bergot, Feb 16 2018

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 64.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 255; 2nd. ed., p. 269. Worpitzky's identity (6.37).
  • Dov Juzuk, Curiosa 56: An interesting observation, Scripta Mathematica 6 (1939), 218.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, Page 47.

Crossrefs

Programs

Formula

a(n) = A123865(n)+1 = A002523(n)-1.
Multiplicative with a(p^e) = p^(4e). - David W. Wilson, Aug 01 2001
G.f.: x*(1 + 11*x + 11*x^2 + x^3)/(1 - x)^5. More generally, g.f. for n^m is Euler(m, x)/(1-x)^(m+1), where Euler(m, x) is Eulerian polynomial of degree m (cf. A008292).
Dirichlet generating function: zeta(s-4). - Franklin T. Adams-Watters, Sep 11 2005
E.g.f.: (x + 7*x^2 + 6*x^3 + x^4)*e^x. More generally, the general form for the e.g.f. for n^m is phi_m(x)*e^x, where phi_m is the exponential polynomial of order n. - Franklin T. Adams-Watters, Sep 11 2005
Sum_{k>0} 1/a(k) = Pi^4/90 = A013662. - Jaume Oliver Lafont, Sep 20 2009
a(n) = C(n+3,4) + 11*C(n+2,4) + 11*C(n+1,4) + C(n,4). [Worpitzky's identity for powers of 4. See, e.g., Graham et al., eq. (6.37). - Wolfdieter Lang, Jul 17 2019]
a(n) = n*A177342(n) - Sum_{i=1..n-1} A177342(i) - (n - 1), with n > 1. - Bruno Berselli, May 07 2010
a(n) + a(n+1) + 1 = 2*A002061(n+1)^2. - Charlie Marion, Jun 13 2013
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) + 24. - Ant King, Sep 23 2013
From Amiram Eldar, Jan 20 2021: (Start)
Sum_{n>=1} (-1)^(n+1)/a(n) = 7*Pi^4/720 (A267315).
Product_{n>=2} (1 - 1/a(n)) = sinh(Pi)/(4*Pi). (End)
Showing 1-10 of 158 results. Next