login
A152298
a(n) = (3^n-1)/2 if n odd, (3^n-1)/8 if n even.
2
0, 1, 1, 13, 10, 121, 91, 1093, 820, 9841, 7381, 88573, 66430, 797161, 597871, 7174453, 5380840, 64570081, 48427561, 581130733, 435848050, 5230176601, 3922632451, 47071589413, 35303692060, 423644304721, 317733228541, 3812798742493, 2859599056870
OFFSET
0,4
FORMULA
a(n) = (3^n - 1)/(2^(3 - 2*Mod[n, 2])).
a(n) = 10*a(n-2) - 9*a(n-4). - Colin Barker, Jun 17 2015
G.f.: x*(3*x^2+x+1) / ((x-1)*(x+1)*(3*x-1)*(3*x+1)). - Colin Barker, Jun 17 2015
MATHEMATICA
Clear[a, n];
a[n_] := (3^n - 1)/(2^(3 - 2*Mod[n, 2]));
Table[a[n], {n, 0, 30}]
PROG
(PARI) concat(0, Vec(x*(3*x^2+x+1)/((x-1)*(x+1)*(3*x-1)*(3*x+1)) + O(x^100))) \\ Colin Barker, Jun 17 2015
CROSSREFS
Cf. A003462.
Sequence in context: A206608 A094813 A364712 * A158956 A259663 A160130
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Dec 02 2008
EXTENSIONS
Edited by N. J. A. Sloane, Aug 15 2013
STATUS
approved