A036919 A036918/2.
0, 1, 5, 24, 130, 815, 5871, 47950, 438404, 4438845, 49320505, 596778116, 7812368070, 110024183659, 1658826153635, 26659706040570, 454992316425736, 8218298715439865, 156631104929559789, 3141323826642838000
Offset: 0
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.
G.f. = 1 + 3*x + 11*x^2 + 49*x^3 + 261*x^4 + 1631*x^5 + 11743*x^6 + 95901*x^7 + ... a(2) = 11: {1, 12, 21, 13, 31, 123, 132, 213, 231, 312, 321}. a(2) = 11 because we have 11 permutations of {1,2,3,4} (written in one line notation) that have an increasing subsequence beginning with 1 and ending with 4: 1,2,3,4; 1,2,4,3; 1,3,4,2; 1,4,2,3; 1,4,3,2; 2,1,3,4; 2,1,4,3; 2,3,1,4; 3,1,2,4; 3,1,4,2; 3,2,1,4. - _Geoffrey Critzer_, Feb 15 2013
A001339:=List([0..20],n-> Sum([0..n], k-> Factorial(k+1)*Binomial(n,k))); # Muniru A Asiru, Feb 17 2018
[Factorial(n)*(&+[(n-k+1)/Factorial(k): k in [0..n]]): n in [0..20]]; // G. C. Greubel, Jul 15 2019
a:=proc(n) options operator, arrow: factorial(n)*n*(3-(sum(1/(j*(j-1)*factorial(j)), j=2..n))) end proc: 1, seq(a(n),n=1..20); # Emeric Deutsch, Apr 12 2008 a := n -> hypergeom([2, -n], [], -1); seq(simplify(a(n)), n=0..18); # Peter Luschny, Sep 20 2014
a[n_] := n!*Sum[(k+1)/(n-k)!, {k, 0, n}]; a /@ Range[0, 20] (* Jean-François Alcover, Jul 13 2011 *) a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ Exp[x] / (1 - x)^2, {x, 0, n}]] (* Michael Somos, Oct 20 2011 *)
{a(n) = if( n<0, 0, n! * polcoeff( exp(x + x * O(x^n)) / (1 - x)^2, n))} /* Michael Somos, Mar 04 2004 */
vector(20, n, n--; n!*sum(k=0,n,(n-k+1)/k!)) \\ G. C. Greubel, Jul 15 2019
[factorial(n)*sum((n-k+1)/factorial(k) for k in (0..n)) for n in (0..20)] # G. C. Greubel, Jul 15 2019
The triangle T(n, k) starts: n\k 0 1 2 3 4 5 6 7 ... 1: 1 2: 2 1 3: 5 5 1 4: 16 24 10 1 5: 65 130 84 19 1 6: 326 815 720 265 36 1 7: 1957 5871 6605 3425 803 69 1 8: 13700 47950 65646 44240 15106 2394 134 1 ... reformatted, _Wolfdieter Lang_, Mar 27 2015
(* t = A046802 *) t[, 1] = 1; t[n, n_] = 1; t[n_, 2] = 2^(n - 1) - 1; t[n_, k_] = Sum[((i - k + 1)^i*(k - i)^(n - i - 1) - (i - k + 2)^i*(k - i - 1)^(n - i - 1))*Binomial[n - 1, i], {i, 0, k - 1}]; T[n_, j_] := Sum[Binomial[k, j]*t[n + 1, k + 1], {k, j, n}]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 23 2015, after Tom Copeland *)
a(2) = 8 because we may partition the set {1, 2, ..., 8} into {1, 2, 4, 8} and {3, 5, 6, 7} with the desired property, and this is the unique solution; attempting to add 9 to either will produce a set with the property that a+b=c for some a,b,c (1+8=9 or 3+6=9). [Corrected by Julien de Prabere, Dec 17 2009]
Comments