%I #7 Jul 31 2015 17:47:38
%S 3,3,12,41,148,517,1809,6316,22052,76982,268737,938126,3274873,
%T 11432137,39908034,139313506,486324452,1697692337,5926412412,
%U 20688297461,72220024873,252110257132,880082523684,3072248060446,10724798971577
%N a(n) = 4*a(n-1)-a(n-2)-3*a(n-3)+a(n-4), n>5.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4, -1, -3, 1).
%F G.f.: (-3*x^2-5*x^3-2*x^4+x^5-3+9*x)/( (x-1) * (x^3-2*x^2-3*x+1)). [Sep 28 2009]
%t b3 = x /. NSolve[x^3 - 3*x^2 - 2*x + 1 == 0, x][[1]] b2 = x /. NSolve[x^3 - 3*x^2 - 2*x + 1 == 0, x][[2]] b1 = x /. NSolve[x^3 - 3*x^2 - 2*x + 1 == 0, x][[3]] digits = 25 a = Table[3*(b3^n + b1^n + b2^n)/(b3 + b2 + b1), {n, 0, digits}]
%t Join[{3,3},LinearRecurrence[{4,-1,-3,1},{12,41,148,517},40]] (* _Harvey P. Dale_, Jul 10 2012 *)
%K nonn,easy
%O 0,1
%A _Roger L. Bagula_, May 22 2005
%E Definition replaced by recurrence by the Associate Editors of the OEIS, Sep 28 2009