A239577 Expansion of 1/((x-1)*(3*x-1)*(3*x^2+1)).
1, 4, 10, 28, 91, 280, 820, 2440, 7381, 22204, 66430, 199108, 597871, 1794160, 5380840, 16140880, 48427561, 145287604, 435848050, 1307529388, 3922632451, 11767941640, 35303692060, 105910943320, 317733228541, 953200084204, 2859599056870, 8578795974868
Offset: 0
Examples
Ternary................Decimal 1............................1 11...........................4 101.........................10 1001........................28 10101.......................91 101101.....................280 1010101....................820 10100101..................2440 101010101.................7381 1010110101...............22204 10101010101..............66430 101010010101............199108, etc.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (4, -6, 12, -9).
Programs
-
Mathematica
Table[(-1 + 3^(2 + n) + (-1 + (-1)^n) (-3)^((1 + n)/2))/8, {n, 0, 30}] (* Bruno Berselli, Mar 24 2014 *) CoefficientList[Series[1/((x - 1) (3 x - 1) (3 x^2 + 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 24 2014 *) LinearRecurrence[{4,-6,12,-9},{1,4,10,28},30] (* Harvey P. Dale, Oct 04 2024 *)
Formula
G.f.: 1/((x-1)*(3*x-1)*(3*x^2+1)).
a(n) = Sum{k=0..n} A154957(n,k)*3^k.
a(n) = 4*a(n-1) - 6*a(n-2) + 12*a(n-3) - 9*a(n-4) for n > 3, a(0)=1, a(1)=4, a(2)=10, a(3)=16.
a(n) = ( -1 + 3^(2+n) + (-1+(-1)^n)*(-3)^((1+n)/2) )/8. [Bruno Berselli, Mar 24 2014]