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.

A000295 Eulerian numbers (Euler's triangle: column k=2 of A008292, column k=1 of A173018).

This page as a plain text file.
%I A000295 M3416 N1382 #553 Aug 22 2025 13:32:08
%S A000295 0,0,1,4,11,26,57,120,247,502,1013,2036,4083,8178,16369,32752,65519,
%T A000295 131054,262125,524268,1048555,2097130,4194281,8388584,16777191,
%U A000295 33554406,67108837,134217700,268435427,536870882,1073741793,2147483616,4294967263,8589934558
%N A000295 Eulerian numbers (Euler's triangle: column k=2 of A008292, column k=1 of A173018).
%C A000295 There are 2 versions of Euler's triangle:
%C A000295 * A008292 Classic version of Euler's triangle used by Comtet (1974).
%C A000295 * A173018 Version of Euler's triangle used by Graham, Knuth and Patashnik in Concrete Math. (1990).
%C A000295 Euler's triangle rows and columns indexing conventions:
%C A000295 * A008292 The rows and columns of the Eulerian triangle are both indexed starting from 1. (Classic version: used in the classic books by Riordan and Comtet.)
%C A000295 * A173018 The rows and columns of the Eulerian triangle are both indexed starting from 0. (Graham et al.)
%C A000295 Number of Dyck paths of semilength n having exactly one long ascent (i.e., ascent of length at least two). Example: a(4)=11 because among the 14 Dyck paths of semilength 4, the paths that do not have exactly one long ascent are UDUDUDUD (no long ascent), UUDDUUDD and UUDUUDDD (two long ascents). Here U=(1,1) and D=(1,-1). Also number of ordered trees with n edges having exactly one branch node (i.e., vertex of outdegree at least two). - _Emeric Deutsch_, Feb 22 2004
%C A000295 Number of permutations of {1,2,...,n} with exactly one descent (i.e., permutations (p(1),p(2),...,p(n)) such that #{i: p(i)>p(i+1)}=1). E.g., a(3)=4 because the permutations of {1,2,3} with one descent are 132, 213, 231 and 312.
%C A000295 a(n+1) is the convolution of nonnegative integers (A001477) and powers of two (A000079). - _Graeme McRae_, Jun 07 2006
%C A000295 Partial sum of main diagonal of A125127. - _Jonathan Vos Post_, Nov 22 2006
%C A000295 Number of partitions of an n-set having exactly one block of size > 1. Example: a(4)=11 because, if the partitioned set is {1,2,3,4}, then we have 1234, 123|4, 124|3, 134|2, 1|234, 12|3|4, 13|2|4, 14|2|3, 1|23|4, 1|24|3 and 1|2|34. - _Emeric Deutsch_, Oct 28 2006
%C A000295 k divides a(k+1) for k in A014741. - _Alexander Adamchuk_, Nov 03 2006
%C A000295 (Number of permutations avoiding patterns 321, 2413, 3412, 21534) minus one. - _Jean-Luc Baril_, Nov 01 2007, Mar 21 2008
%C A000295 The chromatic invariant of the prism graph P_n for n >= 3. - _Jonathan Vos Post_, Aug 29 2008
%C A000295 Decimal integer corresponding to the result of XORing the binary representation of 2^n - 1 and the binary representation of n with leading zeros. This sequence and a few others are syntactically similar. For n > 0, let D(n) denote the decimal integer corresponding to the binary number having n consecutive 1's. Then D(n).OP.n represents the n-th term of a sequence when .OP. stands for a binary operator such as '+', '-', '*', 'quotentof', 'mod', 'choose'. We then get the various sequences A136556, A082495, A082482, A066524, A000295, A052944. Another syntactically similar sequence results when we take the n-th term as f(D(n)).OP.f(n). For example if f='factorial' and .OP.='/', we get (A136556)(A000295) ; if f='squaring' and .OP.='-', we get (A000295)(A052944). - _K.V.Iyer_, Mar 30 2009
%C A000295 Chromatic invariant of the prism graph Y_n.
%C A000295 Number of labelings of a full binary tree of height n-1, such that each path from root to any leaf contains each label from {1,2,...,n-1} exactly once. - Michael Vielhaber (vielhaber(AT)gmail.com), Nov 18 2009
%C A000295 Also number of nontrivial equivalence classes generated by the weak associative law X((YZ)T)=(X(YZ))T on words with n open and n closed parentheses. Also the number of join (resp. meet)-irreducible elements in the pruning-grafting lattice of binary trees with n leaves. - Jean Pallo, Jan 08 2010
%C A000295 Nonzero terms of this sequence can be found from the row sums of the third sub-triangle extracted from Pascal's triangle as indicated below by braces:
%C A000295                      1;
%C A000295                   1,    1;
%C A000295               {1},   2,    1;
%C A000295            {1,    3},   3,    1;
%C A000295         {1,    4,    6},   4,    1;
%C A000295      {1,    5,   10,   10},   5,    1;
%C A000295   {1,    6,   15,   20,   15},   6,    1;
%C A000295   ... - _L. Edson Jeffery_, Dec 28 2011
%C A000295 For integers a, b, denote by a<+>b the least c >= a, such that the Hamming distance D(a,c) = b (note that, generally speaking, a<+>b differs from b<+>a). Then for n >= 3, a(n) = n<+>n. This has a simple explanation: for n >= 3 in binary we have a(n) = (2^n-1)-n = "anti n". - _Vladimir Shevelev_, Feb 14 2012
%C A000295 a(n) is the number of binary sequences of length n having at least one pair 01. - _Branko Curgus_, May 23 2012
%C A000295 Nonzero terms are those integers k for which there exists a perfect (Hamming) error-correcting code. - _L. Edson Jeffery_, Nov 28 2012
%C A000295 a(n) is the number of length n binary words constructed in the following manner:  Select two positions in which to place the first two 0's of the word.  Fill in all (possibly none) of the positions before the second 0 with 1's and then complete the word with an arbitrary string of 0's or 1's. So a(n) = Sum_{k=2..n} (k-1)*2^(n-k). - _Geoffrey Critzer_, Dec 12 2013
%C A000295 Without first 0: a(n)/2^n equals Sum_{k=0..n} k/2^k. For example: a(5)=57, 57/32 = 0/1 + 1/2 + 2/4 + 3/8 + 4/16 + 5/32. - _Bob Selcoe_, Feb 25 2014
%C A000295 The first barycentric coordinate of the centroid of the first n rows of Pascal's triangle, assuming the numbers are weights, is A000295(n+1)/A000337(n). See attached figure. - _César Eliud Lozada_, Nov 14 2014
%C A000295 Starting (0, 1, 4, 11, ...), this is the binomial transform of (0, 1, 2, 2, 2, ...). - _Gary W. Adamson_, Jul 27 2015
%C A000295 Also the number of (non-null) connected induced subgraphs in the n-triangular honeycomb rook graph. - _Eric W. Weisstein_, Aug 27 2017
%C A000295 a(n) is the number of swaps needed in the worst case to transform a binary tree with n full levels into a heap, using (bottom-up) heapify. - _Rudy van Vliet_, Sep 19 2017
%C A000295 The utility of large networks, particularly social networks, with n participants is given by the terms a(n) of this sequence. This assertion is known as Reed's Law, see the Wikipedia link. - _Johannes W. Meijer_, Jun 03 2019
%C A000295 a(n-1) is the number of subsets of {1..n} in which the largest element of the set exceeds by at least 2 the next largest element. For example, for n = 5, a(4) = 11 and the 11 sets are {1,3}, {1,4}, {1,5}, {2,4}, {2,5}, {3,5}, {1,2,4}, {1,2,5}, {1,3,5}, {2,3,5}, {1,2,3,5}. - _Enrique Navarrete_, Apr 08 2020
%C A000295 a(n-1) is also the number of subsets of {1..n} in which the second smallest element of the set exceeds by at least 2 the smallest element. For example, for n = 5, a(4) = 11 and the 11 sets are {1,3}, {1,4}, {1,5}, {2,4}, {2,5}, {3,5}, {1,3,4}, {1,3,5}, {1,4,5}, {2,4,5}, {1,3,4,5}. - _Enrique Navarrete_, Apr 09 2020
%C A000295 a(n+1) is the sum of the smallest elements of all subsets of {1..n}. For example, for n=3, a(4)=11; the subsets of {1,2,3} are {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}, and the sum of smallest elements is 11. - _Enrique Navarrete_, Aug 20 2020
%C A000295 Number of subsets of an n-set that have more than one element. - _Eric M. Schmidt_, Mar 13 2021
%C A000295 Number of individual bets in a "full cover" bet on n-1 horses, dogs, etc. in different races. Each horse, etc. can be bet on or not, giving 2^n bets.  But, by convention, singles (a bet on only one race) are not included, reducing the total number bets by n.  It is also impossible to bet on no horses at all, reducing the number of bets by another 1.  A full cover on 4 horses, dogs, etc. is therefore 6 doubles, 4 trebles and 1 four-horse etc. accumulator.  In British betting, such a bet on 4 horses etc. is a Yankee; on 5, a super-Yankee. - _Paul Duckett_, Nov 17 2021
%C A000295 From _Enrique Navarrete_, May 25 2022: (Start)
%C A000295 Number of binary sequences of length n with at least two 1's.
%C A000295 a(n-1) is the number of ways to choose an odd number of elements greater than or equal to 3 out of n elements.
%C A000295 a(n+1) is the number of ways to split [n] = {1,2,...,n} into two (possibly empty) complementary intervals {1,2,...,i} and {i+1,i+2,...,n} and then select a subset from the first interval (2^i choices, 0 <= i <= n), and one block/cell (i.e., subinterval) from the second interval (n-i choices, 0 <= i <= n).
%C A000295 (End)
%C A000295 Number of possible conjunctions in a system of n planets; for example, there can be 0 conjunctions with one planet, one with two planets, four with three planets (three pairs of planets plus one with all three) and so on. - _Wendy Appleby_, Jan 02 2023
%C A000295 Largest exponent m such that 2^m divides (2^n-1)!. - _Franz Vrabec_, Aug 18 2023
%C A000295 It seems that a(n-1) is the number of odd r with 0 < r < 2^n for which there exist u,v,w in the x-independent beginning of the Collatz trajectory of 2^n x + r with u+v = w+1, as detailed in the link "Collatz iteration and Euler numbers?". A better understanding of this might also give a formula for A374527. - _Markus Sigg_, Aug 02 2024
%C A000295 This sequence has a connection to consecutively halved positional voting (CHPV); see Mendenhall and Switkay. - _Hal M. Switkay_, Feb 25 2025
%C A000295 a(n) is the number of subsets of size 2 and more of an n-element set. Equivalently, a(n) is the number of (hyper)edges of size 2 and more in a complete hypergraph of n vertices. - _Yigit Oktar_, Apr 05 2025
%D A000295 O. Bottema, Problem #562, Nieuw Archief voor Wiskunde, 28 (1980) 115.
%D A000295 L. Comtet, "Permutations by Number of Rises; Eulerian Numbers." Section 6.5 in Advanced Combinatorics: The Art of Finite and Infinite Expansions, rev. enl. ed. Dordrecht, Netherlands: Reidel, pp. 51 and 240-246, 1974.
%D A000295 F. N. David and D. E. Barton, Combinatorial Chance. Hafner, NY, 1962, p. 151.
%D A000295 R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990.
%D A000295 D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 3, p. 34.
%D A000295 J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 215.
%D A000295 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A000295 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A000295 T. D. Noe, <a href="/A000295/b000295.txt">Table of n, a(n) for n = 0..500</a>
%H A000295 Joerg Arndt and N. J. A. Sloane, <a href="/A278984/a278984.txt">Counting Words that are in "Standard Order"</a>
%H A000295 Dillan Agrawal, Selena Ge, Jate Greene, Tanya Khovanova, Dohun Kim, Rajarshi Mandal, Tanish Parida, Anirudh Pulugurtha, Gordon Redwine, Soham Samanta, and Albert Xu, <a href="https://arxiv.org/abs/2501.06675">Chip-Firing on Infinite k-ary Trees</a>, arXiv:2501.06675 [math.CO], 2025. See pp. 9, 17, 18.
%H A000295 E. Banaian, S. Butler, C. Cox, J. Davis, J. Landgraf and S. Ponce <a href="http://arxiv.org/abs/1508.03673">A generalization of Eulerian numbers via rook placements</a>, arXiv:1508.03673 [math.CO], 2015.
%H A000295 Jean-Luc Baril and J. M. Pallo, <a href="http://dx.doi.org/10.1016/j.tcs.2008.08.031">The pruning-grafting lattice of binary trees</a>, Theoretical Computer Science, 409, 2008, 382-393.
%H A000295 Jean-Luc Baril and José L. Ramírez, <a href="https://arxiv.org/abs/2410.15434">Some distributions in increasing and flattened permutations</a>, arXiv:2410.15434 [math.CO], 2024. See p. 7.
%H A000295 Peter J. Cameron, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL3/groups.html">Sequences realized by oligomorphic permutation groups</a>, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.
%H A000295 Peter J. Cameron, Maximilien Gadouleau, James D. Mitchell, and Yann Peresse, <a href="http://arxiv.org/abs/1501.06394">Chains of subsemigroups</a>, arXiv preprint arXiv:1501.06394 [math.GR], 2015. See Table 4.
%H A000295 Matteo Cervetti and Luca Ferrari, <a href="https://arxiv.org/abs/2009.01024">Pattern avoidance in the matching pattern poset</a>, arXiv:2009.01024 [math.CO], 2020.
%H A000295 Shelby Cox, Pratik Misra, and Pardis Semnani, <a href="https://arxiv.org/abs/2402.06090">Homaloidal Polynomials and Gaussian Models of Maximum Likelihood Degree One</a>, arXiv:2402.06090 [math.AG], 2024.
%H A000295 Benjamin Hellouin de Menibus and Yvan Le Borgne, <a href="https://arxiv.org/abs/1903.12622">Asymptotic behaviour of the one-dimensional "rock-paper-scissors" cyclic cellular automaton</a>, arXiv:1903.12622 [math.PR], 2019.
%H A000295 Karl Dilcher and Maciej Ulas, <a href="https://arxiv.org/abs/1909.11222">Arithmetic properties of polynomial solutions of the Diophantine equation P(x)x^(n+1)+Q(x)(x+1)^(n+1) = 1</a>, arXiv:1909.11222 [math.NT], 2019.
%H A000295 Filippo Disanto, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Disanto/disanto5.html">Some Statistics on the Hypercubes of Catalan Permutations</a>, Journal of Integer Sequences, Vol. 18 (2015), Article 15.2.2.
%H A000295 J. M. Dusel, <a href="https://drive.google.com/open?id=0B-tcI4VkmLsidEtiejBuV09YOTQ">Balanced parabolic quotients and branching rules for Demazure crystals</a>, J Algebr Comb (2016) 44: 363. DOI: 10.1007/s10801-016-0673-y.
%H A000295 Pascal Floquet, Serge Domenech and Luc Pibouleau, <a href="http://dx.doi.org/10.1021/ie00026a041">Combinatorics of Sharp Separation System synthesis : Generating functions and Search Efficiency Criterion</a>, Industrial Engineering and Chemistry Research, 33, pp. 440-443, 1994.
%H A000295 Pascal Floquet, Serge Domenech, Luc Pibouleau and Said Aly, <a href="http://dx.doi.org/10.1002/aic.690390607">Some Complements in Combinatorics of Sharp Separation System Synthesis</a>, American Institute of Chemical Engineering Journal, 39(6), pp. 975-978, 1993.
%H A000295 E. T. Frankel, <a href="/A000217/a000217_1.pdf">A calculus of figurate numbers and finite differences</a>, American Mathematical Monthly, 57 (1950), 14-25. [Annotated scanned copy]
%H A000295 Joël Gay, <a href="https://tel.archives-ouvertes.fr/tel-01861199">Representation of Monoids and Lattice Structures in the Combinatorics of Weyl Groups</a>, Doctoral Thesis, Discrete Mathematics [cs.DM], Université Paris-Saclay, 2018.
%H A000295 R. K. Guy, <a href="/A000346/a000346.pdf">Letter to N. J. A. Sloane</a>.
%H A000295 Ryota Inagaki, Tanya Khovanova, and Austin Luo, <a href="https://doi.org/10.1007/s00026-025-00779-6">On Chip-Firing on Undirected Binary Trees</a>, Ann. Comb. (2025). See pp. 24-25.
%H A000295 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=388">Encyclopedia of Combinatorial Structures 388</a>.
%H A000295 Wayne A. Johnson, <a href="https://arxiv.org/abs/2303.16991">An Euler operator approach to Ehrhart series</a>, arXiv:2303.16991 [math.CO], 2023.
%H A000295 Lucas Kang, <a href="http://arxiv.org/abs/1310.3311">Investigation of Rule 73 as Case Study of Class 4 Long-Distance Cellular Automata</a>, arXiv preprint arXiv:1310.3311 [nlin.CG], 2013.
%H A000295 Oliver Kullmann and Xishun Zhao, <a href="http://arxiv.org/abs/1408.0629">Bounds for variables with few occurrences in conjunctive normal forms</a>, arXiv preprint arXiv:1408.0629 [math.CO], 2014.
%H A000295 César Eliud Lozada, <a href="/A000295/a000295.jpg">Centroids of Pascal triangles</a>
%H A000295 Candice A. Marshall, <a href="http://hdl.handle.net/11603/10353">Construction of Pseudo-Involutions in the Riordan Group</a>, Dissertation, Morgan State University, 2017.
%H A000295 Peter Charles Mendenhall and Hal M. Switkay, <a href="https://www.sciencepublishinggroup.com/article/10.11648/j.ss.20231202.11">Consecutively Halved Positional Voting: A Special Case of Geometric Voting</a>, Social Sciences vol. 12 no. 2 (2023), 47-59.
%H A000295 J. C. P. Miller, <a href="/A002439/a002439_1.pdf">Letter to N. J. A. Sloane, Mar 26 1971</a>
%H A000295 J. W. Moon, <a href="http://dx.doi.org/10.1016/0095-8956(76)90029-0">A problem on arcs without bypasses in tournaments,</a> J. Combinatorial Theory Ser. B 21 (1976), no. 1, 71--75. MR0427129(55 #165).
%H A000295 Agustín Moreno Cañadas, Hernán Giraldo, and Gabriel Bravo Rios, <a href="http://dx.doi.org/10.17654/MS101081631">On the Number of Sections in the Auslander-Reiten Quiver of Algebras of Dynkin Type</a>, Far East Journal of Mathematical Sciences (FJMS), Vol. 101, No. 8 (2017), pp. 1631-1654.
%H A000295 Nagatomo Nakamura, <a href="http://libir.josai.ac.jp/il/user_contents/02/G0000284repository/pdf/JOS-13447777-0808.pdf">Pseudo-Normal Random Number Generation via the Eulerian Numbers</a>, Josai Mathematical Monographs, vol 8, p 85-95, 2015.
%H A000295 Emily Norton, <a href="http://arxiv.org/abs/1302.5411">Symplectic Reflection Algebras in Positive Characteristic as Ore Extensions</a>, arXiv preprint arXiv:1302.5411 [math.RA], 2013.
%H A000295 Ronald Orozco López, <a href="https://www.researchgate.net/publication/350397609_Solution_of_the_Differential_Equation_ykeay_Special_Values_of_Bell_Polynomials_and_ka-Autonomous_Coefficients">Solution of the Differential Equation y^(k)= e^(a*y), Special Values of Bell Polynomials and (k,a)-Autonomous Coefficients</a>, Universidad de los Andes (Colombia 2021).
%H A000295 J. M. Pallo, <a href="http://dx.doi.org/10.1016/j.ipl.2009.01.014">Weak associativity and restricted rotation</a>, Information Processing Letters, 109, 2009, 514-517.
%H A000295 P. A. Piza, <a href="http://www.jstor.org/stable/3029339">Kummer numbers</a>, Mathematics Magazine, 21 (1947/1948), 257-260.
%H A000295 P. A. Piza, <a href="/A001117/a001117.pdf">Kummer numbers</a>, Mathematics Magazine, 21 (1947/1948), 257-260. [Annotated scanned copy]
%H A000295 Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
%H A000295 Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992
%H A000295 J. Riordan, <a href="/A000217/a000217_2.pdf">Review of Frankel (1950)</a> [Annotated scanned copy]
%H A000295 D. P. Roselle, <a href="http://www.jstor.org/stable/2036129">Permutations by number of rises and successions</a>, Proc. Amer. Math. Soc., 20 (1968), 8-16.
%H A000295 D. P. Roselle, <a href="/A046739/a046739.pdf"> Permutations by number of rises and successions</a>, Proc. Amer. Math. Soc., 19 (1968), 8-16. [Annotated scanned copy]
%H A000295 Markus Sigg, <a href="/A000295/a000295_3.pdf">Collatz iteration and Euler numbers?</a>
%H A000295 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ChromaticInvariant.html">Chromatic Invariant</a>
%H A000295 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrismGraph.html">Prism Graph</a>
%H A000295 Wikipedia, <a href="https://en.wikipedia.org/wiki/Reed%27s_law">Reed's Law</a>
%H A000295 Robert G. Wilson v, <a href="/A007347/a007347.pdf">Letter to N. J. A. Sloane, Apr. 1994</a>
%H A000295 Anssi Yli-Jyra, <a href="http://dx.doi.org/10.1007/978-3-642-30773-7_10">On Dependency Analysis via Contractions and Weighted FSTs</a>, in Shall We Play the Festschrift Game?, Springer, 2012, pp. 133-158. - _N. J. A. Sloane_, Dec 25 2012
%H A000295 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4,-5,2).
%F A000295 a(n) = 2^n - n - 1.
%F A000295 G.f.: x^2/((1-2*x)*(1-x)^2).
%F A000295 A107907(a(n+2)) = A000079(n+2). - _Reinhard Zumkeller_, May 28 2005
%F A000295 E.g.f.: exp(x)*(exp(x)-1-x). - _Emeric Deutsch_, Oct 28 2006
%F A000295 a(0)=0, a(1)=0, a(n) = 3*a(n-1) - 2*a(n-2) + 1. - _Miklos Kristof_, Mar 09 2005
%F A000295 a(0)=0, a(n) = 2*a(n-1) + n - 1 for all n in Z.
%F A000295 a(n) = Sum_{k=2..n} binomial(n, k). - _Paul Barry_, Jun 05 2003
%F A000295 a(n+1) = Sum_{i=1..n} Sum_{j=1..i} C(i, j). - _Benoit Cloitre_, Sep 07 2003
%F A000295 a(n+1) = 2^n*Sum_{k=0..n} k/2^k. - _Benoit Cloitre_, Oct 26 2003
%F A000295 a(0)=0, a(1)=0, a(n) = Sum_{i=0..n-1} i+a(i) for i > 1. - _Gerald McGarvey_, Jun 12 2004
%F A000295 a(n+1) = Sum_{k=0..n} (n-k)*2^k. - _Paul Barry_, Jul 29 2004
%F A000295 a(n) = Sum_{k=0..n} binomial(n, k+2); a(n+2) = Sum_{k=0..n} binomial(n+2, k+2). - _Paul Barry_, Aug 23 2004
%F A000295 a(n) = Sum_{k=0..floor((n-1)/2)} binomial(n-k-1, k+1)*2^(n-k-2)*(-1/2)^k. - _Paul Barry_, Oct 25 2004
%F A000295 a(0) = 0; a(n) = Stirling2(n,2) + a(n-1) = A000225(n-1) + a(n-1). - _Thomas Wieder_, Feb 18 2007
%F A000295 a(n) = A000325(n) - 1. - _Jonathan Vos Post_, Aug 29 2008
%F A000295 a(0) = 0, a(n) = Sum_{k=0..n-1} 2^k - 1. - _Doug Bell_, Jan 19 2009
%F A000295 a(n) = A000217(n-1) + A002662(n) for n>0. - _Geoffrey Critzer_, Feb 11 2009
%F A000295 a(n) = A000225(n) - n. - _Zerinvary Lajos_, May 29 2009
%F A000295 a(n) = n*(2F1([1,1-n],[2],-1) - 1). - _Olivier Gérard_, Mar 29 2011
%F A000295 Column k=1 of A173018 starts a'(n) = 0, 1, 4, 11, ... and has the hypergeometric representation n*hypergeom([1, -n+1], [-n], 2). This can be seen as a formal argument to prefer Euler's A173018 over A008292. - _Peter Luschny_, Sep 19 2014
%F A000295 E.g.f.: exp(x)*(exp(x)-1-x); this is U(0) where U(k) = 1 - x/(2^k - 2^k/(x + 1 - x^2*2^(k+1)/(x*2^(k+1) - (k+1)/U(k+1)))); (continued fraction, 3rd kind, 4-step). - _Sergei N. Gladkovskii_, Dec 01 2012
%F A000295 a(n) = A079583(n) - A000225(n+1). - _Miquel Cerda_, Dec 25 2016
%F A000295 a(0) = 0; a(1) = 0; for n > 1: a(n) = Sum_{i=1..2^(n-1)-1} A001511(i). - _David Siegers_, Feb 26 2019
%F A000295 a(n) = A007814(A028366(n)). - _Franz Vrabec_, Aug 18 2023
%F A000295 a(n) = Sum_{k=1..floor((n+1)/2)} binomial(n+1, 2*k+1). - _Taras Goy_, Jan 02 2025
%e A000295 G.f. = x^2 + 4*x^3 + 11*x^4 + 26*x^5 + 57*x^6 + 120*x^7 + 247*x^8 + 502*x^9 + ...
%p A000295 [ seq(2^n-n-1, n=1..50) ];
%p A000295 A000295 := -z/(2*z-1)/(z-1)**2; # _Simon Plouffe_ in his 1992 dissertation
%p A000295 # Grammar specification:
%p A000295 spec := [S, { B = Set(Z, 1 <= card), C = Sequence(B, 2 <= card), S = Prod(B, C) }, unlabeled]:
%p A000295 struct := n -> combstruct[count](spec, size = n+1);
%p A000295 seq(struct(n), n = 0..33); # _Peter Luschny_, Jul 22 2014
%t A000295 a[n_] = If[n==0, 0, n*(HypergeometricPFQ[{1, 1-n}, {2}, -1] - 1)];
%t A000295 Table[a[n], {n,0,40}] (* _Olivier Gérard_, Mar 29 2011 *)
%t A000295 LinearRecurrence[{4, -5, 2}, {0, 0, 1}, 40] (* _Vincenzo Librandi_, Jul 29 2015 *)
%t A000295 Table[2^n -n-1, {n,0,40}] (* _Eric W. Weisstein_, Nov 16 2017 *)
%o A000295 (PARI) a(n)=2^n-n-1 \\ _Charles R Greathouse IV_, Jun 10 2011
%o A000295 (Haskell) a000295 n = 2^n - n - 1  -- _Reinhard Zumkeller_, Nov 25 2013
%o A000295 (Magma) [2^n-n-1: n in [0..40]]; // _Vincenzo Librandi_, Jul 29 2015
%o A000295 (Magma) [EulerianNumber(n, 1): n in [0..40]]; // _G. C. Greubel_, Oct 02 2024
%o A000295 (SageMath) [2^n -(n+1) for n in range(41)] # _G. C. Greubel_, Oct 02 2024
%Y A000295 Cf. A008292 (classic version of Euler's triangle used by Comtet (1974)).
%Y A000295 Cf. A173018 (version of Euler's triangle used by Graham, Knuth and Patashnik in Concrete Math. (1990)).
%Y A000295 Cf. A002662 (partial sums).
%Y A000295 Partial sums of A000225.
%Y A000295 Row sums of A014473 and of A143291.
%Y A000295 Second column of triangles A112493 and A112500.
%Y A000295 Sequences A125128 and A130103 are essentially the same.
%Y A000295 Column k=1 of A124324.
%Y A000295 Cf. A000079, A000108, A000217, A000325, A000975, A001511, A002663.
%Y A000295 Cf. A002664, A007814, A008292, A008949, A014741, A016031, A028366.
%Y A000295 Cf. A035039, A035040, A035041, A035042, A079583, A107907, A130321.
%Y A000295 Cf. A130128, A130330, A131768, A131816.
%K A000295 nonn,easy,nice,changed
%O A000295 0,4
%A A000295 _N. J. A. Sloane_