login
A239577
Expansion of 1/((x-1)*(3*x-1)*(3*x^2+1)).
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,2
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(2*n) = A002452(n+1); a(2*n+1) = 4*A015251(n+2).
a(n) = ( -1 + 3^(2+n) + (-1+(-1)^n)*(-3)^((1+n)/2) )/8. [Bruno Berselli, Mar 24 2014]
EXAMPLE
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.
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 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Philippe Deléham, Mar 21 2014
STATUS
approved