A000340 a(0)=1, a(n) = 3*a(n-1) + n + 1.
1, 5, 18, 58, 179, 543, 1636, 4916, 14757, 44281, 132854, 398574, 1195735, 3587219, 10761672, 32285032, 96855113, 290565357, 871696090, 2615088290, 7845264891, 23535794695, 70607384108, 211822152348, 635466457069
Offset: 0
Examples
G.f. = 1 + 5*x + 18*x^2 + 58*x^3 + 179*x^4 + 543*x^5 + 1636*x^6 + ...
References
- F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 260.
- 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).
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Dillan Agrawal, Selena Ge, Jate Greene, Tanya Khovanova, Dohun Kim, Rajarshi Mandal, Tanish Parida, Anirudh Pulugurtha, Gordon Redwine, Soham Samanta, and Albert Xu, Chip-Firing on Infinite k-ary Trees, arXiv:2501.06675 [math.CO], 2025. See pp. 9, 18.
- Shaoshi Chen, Hanqian Fang, Sergey Kitaev, and Candice X.T. Zhang, Patterns in Multi-dimensional Permutations, arXiv:2411.02897 [math.CO], 2024. See p. 7.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 389
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
- László Tóth, On Schizophrenic Patterns in b-ary Expansions of Some Irrational Numbers, arXiv:2002.06584 [math.NT], 2020. Mentions this sequence. See also Proc. Amer. Math. Soc. 148 (2020), 461-469.
- Index entries for linear recurrences with constant coefficients, signature (5,-7,3).
Crossrefs
From Johannes W. Meijer, Feb 20 2009: (Start)
Equals A156920 second right hand column.
Equals A142963 second right hand column divided by 2^n.
Equals A156919 second right hand column divided by 2.
(End)
Cf. A014915.
Equals column k=1 of A008971 (shifted). - Jeremy Dover, Jul 11 2021
Programs
-
Magma
[(3^(n+2)-2*n-5)/4: n in [0..30]]; // Vincenzo Librandi, Aug 15 2011
-
Maple
a[ -1]:=0:a[0]:=1:for n from 1 to 50 do a[n]:=4*a[n-1]-3*a[n-2]+1 od: seq(a[n],n=0..50); # Miklos Kristof, Mar 09 2005 A000340:=-1/(3*z-1)/(z-1)**2; # conjectured by Simon Plouffe in his 1992 dissertation
-
Mathematica
a[ n_] := MatrixPower[ {{1, 0, 0}, {1, 1, 0}, {1, 1, 3}}, n + 1][[3, 1]]; (* Michael Somos, May 28 2014 *) RecurrenceTable[{a[0]==1,a[n]==3a[n-1]+n+1},a,{n,30}] (* or *) LinearRecurrence[{5,-7,3},{1,5,18},30] (* Harvey P. Dale, Jan 31 2017 *)
Formula
G.f.: 1/((1-3*x)*(1-x)^2).
a(n) = (3^(n+2) - 2*n - 5)/4.
a(n) = Sum_{k=0..n+1} (n-k+1)*3^k = Sum_{k=0..n+1} k*3^(n-k+1). - Paul Barry, Jul 30 2004
a(n) = Sum_{k=0..n} binomial(n+2, k+2)*2^k. - Paul Barry, Jul 30 2004
a(-1)=0, a(0)=1, a(n) = 4*a(n-1) - 3*a(n-2) + 1. - Miklos Kristof, Mar 09 2005
a(n) = 5*a(n-1) - 7*a(n-2) + 3*a(n-3). - Johannes W. Meijer, Feb 20 2009
a(-2 - n) = 3^-n * A014915(n). - Michael Somos, May 28 2014
E.g.f.: exp(x)*(9*exp(2*x) - 2*x - 5)/4. - Stefano Spezia, Nov 09 2024
Comments