OFFSET
0,3
COMMENTS
Number of permutations beginning with 21 and avoiding 1-23. - Ralf Stephan, Apr 25 2004
Originally defined as main diagonal of an array of binomial recurrence coefficients (see Gould and Quaintance). Also second-from-right diagonal of triangle A121207.
Starting (1, 3, 9, 31, 121, ...) = row sums of triangle A153868. - Gary W. Adamson, Jan 03 2009
Equals eigensequence of triangle A074909 (reflected). - Gary W. Adamson, Apr 10 2009
The divergent series g(x=1,m) = 1^m*1! - 2^m*2! + 3^m*3! - 4^m*4! + ..., m=>-1, is related to the sequence given above. For m=-1 this series dates back to Euler. We discovered that g(x=1,m) = (-1)^m * (A040027(m) - A000110(m+1) * A073003) with A073003 Gompertz's constant and A000110 the Bell numbers, see A163940; A040027(m = -1) = 0. - Johannes W. Meijer, Oct 16 2009
Compare the o.g.f. to the o.g.f. B(x) of the Bell numbers, where B(x) = 1 + x*B(x/(1-x))/(1-x). - Paul D. Hanna, Mar 23 2012
a(n) is the number of set partitions of {1,2,...,n+1} in which the last block is a singleton: the blocks are arranged in order of their least element. An example is given below. - Peter Bala, Dec 17 2014
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..500
Walaa Asakly, Aubrey Blecher, Charlotte Brennan, Arnold Knowfmacher, Toufik Mansour, and Stephan Wagner, Set partition asymptotics and a conjecture of Gould and Quaintance, Journal of Mathematical Analysis and Applications, Volume 416, Issue 2, 15 August 2014, Pages 672-682.
Robert Dougherty-Bliss, Gosper's algorithm and Bell numbers, arXiv:2210.13520 [cs.SC], 2022.
Robert Dougherty-Bliss, Experimental Methods in Number Theory and Combinatorics, Ph. D. Dissertation, Rutgers Univ. (2024). See p. 69.
Branko Dragovich, On Summation of p-Adic Series, arXiv:1702.02569 [math.NT], 2017.
Branko Dragovich, Andrei Yu. Khrennikov and Natasa Z. Misic, Summation of p-Adic Functional Series in Integer Points, arXiv:1508.05079 [math.NT], 2015.
B. Dragovich and N. Z. Misic, p-Adic invariant summation of some p-adic functional series, P-Adic Numbers, Ultrametric Analysis, and Applications, October 2014, Volume 6, Issue 4, pp 275-283.
H. W. Gould and Jocelyn Quaintance, A linear binomial recurrence and the Bell numbers and polynomials, Applicable Analysis and Discrete Mathematics, 1 (2007), 371-385.
R. K. Guy, Letters to N. J. A. Sloane, June-August 1968 [The letter gives the g.f. for this sequence as e^{e^x} Integral_{0..x} e^{e^t-1} dt but the correct g.f. is e^{e^x-1} Integral_0^x e^{1-e^t} dt. - Don Knuth, Feb 01 2018]
Sergey Kitaev, Generalized pattern avoidance with additional restrictions, Sem. Lothar. Combinat. B48e (2003).
Sergey Kitaev and Toufik Mansour, Simultaneous avoidance of generalized patterns, arXiv:math/0205182 [math.CO], 2002.
Don Knuth, Email to N. J. A. Sloane, Jan 29 2018
FORMULA
a(n) = b(n-2), n>1, b(n) = Sum_{k = 1..n} binomial(n, k-1)*b(n-k), b(0) = 1. - Vladeta Jovovic, Apr 28 2001
E.g.f. satisfies A'(x) = exp(x)*A(x)+1. - N. J. A. Sloane
With offset 0, e.g.f.: x + exp(exp(x)) * Integral_{t=0..x} t*exp(-exp(t)+t) dt (fits the recurrence up to n=215). - Ralf Stephan, Apr 25 2004
Recurrence: a(1)=1, a(2)=1, for n > 2, a(n) = n - 1 + Sum_{j=2..n-1} binomial(n-1, j)*a(j)) [gives a(n+1)]. - Jon Perry, Apr 26 2005
O.g.f. satisfies: A(x) = 1 + x*A( x/(1-x) ) / (1-x)^2. - Paul D. Hanna, Mar 23 2012
From Peter Bala, Dec 17 2014: (Start)
Starting from A(x) = 1 + O(x) (big Oh notation) we can get a series expansion for the o.g.f. by repeatedly applying the above functional equation of Hanna: A(x) = 1 + O(x) = 1 + x/(1-x)^2 + O(x^2) = 1 + x/(1-x)^2 + x^2/((1-x)*(1-2*x)^2) + O(x^3) = ... = 1 + x/(1-x)^2 + x^2/((1-x)*(1-2*x)^2) + x^3/((1-x)*(1-2*x)*(1-3*x)^2) + x^4/((1-x)*(1-2*x)*(1-3*x)*(1-4*x)^2) + ....
a(n) = Sum_{k = 0..n} ( Sum_{j = k..n} Stirling2(j,k)*k^(n-j) ).
EXAMPLE
a(3) = 9: Arranging the blocks of the 15 set partitions of {1,2,3,4} in order of their least element we find 9 set partitions for which the last block is a singleton, namely, 123|4, 124|3, 134|2, 1|24|3, 1|23|4, 12|3|4, 13|2|4, 14|2|3, and 1|2|3|4. - Peter Bala, Dec 17 2014
MAPLE
A040027 := proc(n)
option remember;
if n = 0 then
1;
else
add(binomial(n, k-1)*procname(n-k), k=1..n) ;
end if;
end proc: # Johannes W. Meijer, Oct 16 2009
MATHEMATICA
a[0] = a[1] = 1; a[n_] := a[n] = Sum[Binomial[n, k + 1]*a[k], {k, 0, n - 1}]; Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Jul 02 2013 *)
Rest[CoefficientList[Assuming[Element[x, Reals], Series[E^E^x*(ExpIntegralEi[-E^x] - ExpIntegralEi[-1]), {x, 0, 20}]], x] * Range[0, 20]!] (* Vaclav Kotesovec, Feb 28 2014 *)
PROG
(PARI) {a(n)=local(A=1+x); for(i=1, n, A=1+x*subst(A, x, x/(1-x+x*O(x^n)))/(1-x)^2); polcoeff(A, n)} /* Paul D. Hanna, Mar 23 2012 */
(Haskell)
a040027 n = head $ a046936_row (n + 1) -- Reinhard Zumkeller, Jan 01 2014
(Python)
# The function Gould_diag is defined in A121207.
A040027_list = lambda size: Gould_diag(2, size)
print(A040027_list(24)) # Peter Luschny, Apr 24 2016
CROSSREFS
Cf. A153868. - Gary W. Adamson, Jan 03 2009
Cf. A074909. - Gary W. Adamson, Apr 10 2009
Row sums of A163940. - Johannes W. Meijer, Oct 16 2009
KEYWORD
easy,nonn,nice
AUTHOR
EXTENSIONS
Entry revised by N. J. A. Sloane, Dec 11 2006
Gould reference updated by Johannes W. Meijer, Aug 02 2009
Don Knuth, Jan 29 2018, suggested that this sequence should be named after H. W. Gould. - N. J. A. Sloane, Jan 30 2018
STATUS
editing