%I #15 Jun 30 2026 19:27:47
%S 1,3,7,13,29,53,117,213,469,853,1877,3413,7509,13653,30037,54613,
%T 120149,218453,480597,873813,1922389,3495253,7689557,13981013,
%U 30758229,55924053,123032917,223696213,492131669,894784853,1968526677,3579139413,7874106709,14316557653,31496426837,57266230613
%N a(n) = 4*a(n-2)+1 with initial terms 1,3,7.
%H Colin Barker, <a href="/A283323/b283323.txt">Table of n, a(n) for n = 0..1000</a>
%H A. J. Macfarlane, <a href="http://www.damtp.cam.ac.uk/user/ajm/Papers2016/GFsForCAsOfEvenRuleNo.ps">Generating functions for integer sequences defined by the evolution of cellular automata with even rule numbers</a>, 2016. See Fig. 13.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,4,-4).
%F From _Colin Barker_, Mar 16 2017: (Start)
%F G.f.: (1 + 2*x - 2*x^3) / ((1 - x)*(1 - 2*x)*(1 + 2*x)).
%F a(n) = (-4 + (-2)^n + 21*2^n) / 12 for n>0.
%F a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) for n>3.
%F (End)
%p f:=proc(n) option remember;
%p if n=0 then 1 elif n=1 then 3 elif n=2 then 7
%p else 4*f(n-2)+1; fi; end;
%p [seq(f(n),n=0..40)];
%t LinearRecurrence[{1, 4, -4}, {1, 3, 7, 13}, 36] (* _Indranil Ghosh_, Mar 16 2017 *)
%t (* Alternative: *)
%t CoefficientList[Series[(1 + 2*x - 2*x^3) / ((1 - x)*(1 - 2*x)*(1 + 2*x)) , {x, 0, 35}], x] (* _Indranil Ghosh_, Mar 16 2017 *)
%o (PARI) Vec((1 + 2*x - 2*x^3) / ((1 - x)*(1 - 2*x)*(1 + 2*x)) + O(x^40)) \\ _Colin Barker_, Mar 16 2017
%K nonn,easy
%O 0,2
%A _N. J. A. Sloane_, Mar 16 2017