A025192 a(0)=1; a(n) = 2*3^(n-1) for n >= 1.
1, 2, 6, 18, 54, 162, 486, 1458, 4374, 13122, 39366, 118098, 354294, 1062882, 3188646, 9565938, 28697814, 86093442, 258280326, 774840978, 2324522934, 6973568802, 20920706406, 62762119218, 188286357654, 564859072962, 1694577218886, 5083731656658, 15251194969974
Offset: 0
Examples
There are a(3)=18 compositions of 3 into 2 kinds of parts. Here p:s stands for "part p of sort s": 01: [ 1:0 1:0 1:0 ] 02: [ 1:0 1:0 1:1 ] 03: [ 1:0 1:1 1:0 ] 04: [ 1:0 1:1 1:1 ] 05: [ 1:0 2:0 ] 06: [ 1:0 2:1 ] 07: [ 1:1 1:0 1:0 ] 08: [ 1:1 1:0 1:1 ] 09: [ 1:1 1:1 1:0 ] 10: [ 1:1 1:1 1:1 ] 11: [ 1:1 2:0 ] 12: [ 1:1 2:1 ] 13: [ 2:0 1:0 ] 14: [ 2:0 1:1 ] 15: [ 2:1 1:0 ] 16: [ 2:1 1:1 ] 17: [ 3:0 ] 18: [ 3:1 ] - _Joerg Arndt_, Apr 28 2013 G.f. = 1 + 2*x + 6*x^2 + 18*x^3 + 54*x^4 + 162*x^5 + 486*x^6 + 1458*x^7 + ...
References
- Richard P. Stanley, Enumerative combinatorics, Vol. 1, Cambridge University Press, Cambridge, 1997, pp. 96-100.
Links
- T. D. Noe, Table of n, a(n) for n = 0..200
- George E. Andrews and Greg Simay, Parity palindrome compositions, Integers 21, Paper No A85, (2021), 13 pp.
- Diego Arcis, Camilo González, and Sebastián Márquez On the Hopf algebra of noncommutative symmetric functions in superspace, arXiv:2205.11813 [math.CO], 2022.
- D. Bevan, D. Levin, P. Nugent, J. Pantone and L. Pudwell, Pattern avoidance in forests of binary shrubs, arXiv preprint arXiv:1510.08036 [math.CO], 2015.
- Fan Chung and R. L. Graham, Primitive juggling sequences, Am. Math. Monthly 115 (3) (2008) 185-194.
- Pantelis A. Damianou, On the characteristic polynomials of Cartan matrices and Chebyshev polynomials, arXiv preprint arXiv:1110.6620 [math.RT], 2014.
- Nachum Dershowitz, Between Broadway and the Hudson: A Bijection of Corridor Paths, arXiv:2006.06516 [math.CO], 2020.
- Alice L. L. Gao and Sergey Kitaev, On partially ordered patterns of length 4 and 5 in permutations, arXiv:1903.08946 [math.CO], 2019.
- Alice L. L. Gao and Sergey Kitaev, On partially ordered patterns of length 4 and 5 in permutations, The Electronic Journal of Combinatorics 26(3) (2019), P3.26.
- Jia Huang, Partially Palindromic Compositions, J. Int. Seq. (2023) Vol. 26, Art. 23.4.1. See pp. 4, 13.
- Milan Janjic, On Linear Recurrence Equations Arising from Compositions of Positive Integers, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.7.
- V. Retakh, S. Serconek, and R. Wilson, Hilbert Series of Algebras Associated to Directed Graphs and Order Homology, arXiv:1010.6295 [math.RA], 2010-2011.
- Jacob Sprittulla, On Colored Factorizations, arXiv:2008.09984 [math.CO], 2020.
- Richard P. Stanley, An Equivalence Relation on the Symmetric Group and Multiplicity-free Flag h-Vectors.
- Kai Ting Keshia Yap, David Wehlau, and Imed Zaguia, Permutations Avoiding Certain Partially-ordered Patterns, arXiv:2101.12061 [math.CO], 2021.
- Vincent Vatter, Counting parity palindrome compositions, arXiv:2109.13155 [math.CO], 2021.
- Index entries for linear recurrences with constant coefficients, signature (3).
Crossrefs
Programs
-
Haskell
a025192 0 = 1 a025192 n = 2 * 3 ^ (n -1) a025192_list = 1 : iterate (* 3) 2 -- Reinhard Zumkeller, Nov 27 2012
-
Maple
A025192 := proc(n): if n=0 then 1 else 2*3^(n-1) fi: end: seq(A025192(n),n=0..26);
-
Mathematica
Join[{1},2*3^(Range[30]-1)] (* Harvey P. Dale, Mar 22 2011 *)
-
PARI
a(n)=max(1,2*3^(n-1)) \\ Charles R Greathouse IV, Jul 25 2011
-
PARI
Vec((1-x)/(1-3*x) + O(x^100)) \\ Altug Alkan, Dec 05 2015
-
Python
[1]+[2*3**(n-1) for n in range(1,30)] # David Nacin, Mar 04 2012
Formula
G.f.: (1-x)/(1-3*x).
E.g.f.: (2*exp(3*x) + exp(0))/3. - Paul Barry, Apr 20 2003
a(0) = 1, a(n) = Sum_{k=0..n-1} (a(k) + a(n-k-1)). - Benoit Cloitre, Jun 24 2003
a(n) = A002326((3^n-1)/2). - Vladimir Shevelev, May 26 2008
a(1) = 2, a(n) = 3*a(n-1). - Vincenzo Librandi, Jan 01 2011
a(n) = lcm(a(n-1), Sum_{k=1..n-1} a(k)) for n >= 3. - David W. Wilson, Sep 27 2011
a(n) = ((2*n-1)*a(n-1) + (3*n-6)*a(n-2))/(n-1); a(0)=1, a(1)=2. - Sergei N. Gladkovskii, Jul 16 2012
From Sergei N. Gladkovskii, Jul 17 2012: (Start)
For the e.g.f. E(x) = (2/3)*exp(3*x) + exp(0)/3 we have
E(x) = 2*G(0)/3 where G(k) = 1 + k!/(3*(9*x)^k - 3*(9*x)^(2*k+1)/((9*x)^(k+1) + (k+1)!/G(k+1))); (continued fraction, 3rd kind, 3-step).
E(x) = 1+2*x/(G(0)-3*x) where G(k) = 3*x + 1 + k - 3*x*(k+1)/G(k+1); (continued fraction, Euler's 1st kind, 1-step). (End)
a(n) = A114283(0,0). - Reinhard Zumkeller, Nov 27 2012
G.f.: 1 + ((1/2)/G(0) - 1)/x where G(k) = 1 - 2^k/(2 - 4*x/(2*x - 2^k/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Dec 22 2012
G.f.: 1 + x*W(0), where W(k) = 1 + 1/(1 - x*(2*k+3)/(x*(2*k+4) + 1/W(k+1))); (continued fraction). - Sergei N. Gladkovskii, Aug 28 2013
G.f.: 1 / (1 - 2*x / (1 - x)). - Michael Somos, Apr 03 2014
Construct the power matrix T(n,j) = [A(n)^*j]*[S(n)^*(j-1)] where A(n)=(2,2,2,...) and S(n)=(0,1,0,0,...). (* is convolution operation.) Then a(n) = Sum_{j=1..n} T(n,j). - David Neil McGrath, Jan 01 2015
G.f.: 1 + 2*x/(1 + 2*x)*( 1 + 5*x/(1 + 5*x)*( 1 + 8*x/(1 + 8*x)*( 1 + 11*x/(1 + 11*x)*( 1 + .... - Peter Bala, May 27 2017
Sum_{n>=0} 1/a(n) = 7/4. - Bernard Schott, Oct 02 2021
From Amiram Eldar, May 08 2023: (Start)
Sum_{n>=0} (-1)^n/a(n) = 5/8.
Product_{n>=1} (1 - 1/a(n)) = A132019. (End)
Extensions
Additional comments from Barry E. Williams, May 27 2000
a(22) corrected by T. D. Noe, Feb 08 2008
Maple programs simplified by Johannes W. Meijer, Jun 02 2011
Comments