%I #13 Jun 19 2015 11:19:42
%S 0,1,1,13,10,121,91,1093,820,9841,7381,88573,66430,797161,597871,
%T 7174453,5380840,64570081,48427561,581130733,435848050,5230176601,
%U 3922632451,47071589413,35303692060,423644304721,317733228541,3812798742493,2859599056870
%N a(n) = (3^n-1)/2 if n odd, (3^n-1)/8 if n even.
%H Vincenzo Librandi, <a href="/A152298/b152298.txt">Table of n, a(n) for n = 0..300</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,10,0,-9).
%F a(n) = (3^n - 1)/(2^(3 - 2*Mod[n, 2])).
%F a(n) = 10*a(n-2) - 9*a(n-4). - _Colin Barker_, Jun 17 2015
%F G.f.: x*(3*x^2+x+1) / ((x-1)*(x+1)*(3*x-1)*(3*x+1)). - _Colin Barker_, Jun 17 2015
%t Clear[a, n];
%t a[n_] := (3^n - 1)/(2^(3 - 2*Mod[n, 2]));
%t Table[a[n], {n, 0, 30}]
%o (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
%Y Cf. A003462.
%K nonn,easy
%O 0,4
%A _Roger L. Bagula_, Dec 02 2008
%E Edited by _N. J. A. Sloane_, Aug 15 2013