A016142 Expansion of 1/((1-3*x)*(1-9*x)).
1, 12, 117, 1080, 9801, 88452, 796797, 7173360, 64566801, 581120892, 5230147077, 47071500840, 423644039001, 3812797945332, 34315186290957, 308836690967520, 2779530261754401, 25015772484929772, 225141952751788437, 2026277575928357400, 18236498186842001001, 164128483692038362212
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- A. M. Hinz, S. Klavžar, U. Milutinović, C. Petr, The Tower of Hanoi - Myths and Maths, Birkhäuser 2013. See page 100. Book's website.
- Index entries for linear recurrences with constant coefficients, signature (12,-27).
Programs
-
Magma
[(1/6)*(9^(n+1)-3^(n+1)): n in [0..20]]; // Vincenzo Librandi, Feb 24 2014
-
Mathematica
Join[{a=1,b=12},Table[c=12*b-27*a;a=b;b=c,{n,60}]] (* Vladimir Joseph Stephan Orlovsky, Jan 31 2011 *) CoefficientList[Series[1/((1-3x)(1-9x)),{x,0,20}],x] (* or *) Table[ (9^(n+1) -3^(n+1))/6,{n,0,20}] (* Harvey P. Dale, Apr 03 2011 *) Table[ncards = 3^nattr; (ncards*(ncards - 1))/6, {nattr, 1, 20}] (* Robert Price, Oct 14 2017 *)
-
PARI
Vec(1/((1-3*x)*(1-9*x))+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
-
PARI
a(n) = (1/6)*(9^(n+1) - 3^(n+1)); \\ Joerg Arndt, Feb 23 2014
-
Sage
[lucas_number1(n,12,27) for n in range(1, 20)] # Zerinvary Lajos, Apr 27 2009
Formula
a(n) = (1/6)*(9^(n+1) - 3^(n+1)).
a(n-1) = Sum_{i=1..n} binomial(n,i)*3^(n-i)*6^(i-1). - Sam Handler (sam_5_5_5_0(AT)yahoo.com), Jun 29 2004
a(n) = 12*a(n-1) - 27*a(n-2), a(0)=1, a(1)=12. - Vincenzo Librandi, Mar 14 2011
E.g.f.: exp(3*x)*(3*exp(3*x) - 1)/2. - Elmo R. Oliveira, Mar 08 2025
Comments