%I #22 Sep 08 2022 08:45:08
%S 1,1,3,4,5,9,7,16,9,25,11,36,13,49,15,64,17,81,19,100,21,121,23,144,
%T 25,169,27,196,29,225,31,256,33,289,35,324,37,361,39,400,41,441,43,
%U 484,45,529,47,576,49,625,51,676,53,729,55,784,57,841,59,900,61,961,63,1024,65
%N Mix odd numbers and squares.
%C The old entry with this sequence number was a duplicate of A010892.
%C This sequence is visible in the identity 4/Pi = 1 + 1/(3 + 4/(5 + 9/(7 + 16/(9 + 25/(11 + ...))))) (see the Wolfram Research web site).
%H Colin Barker, <a href="/A079097/b079097.txt">Table of n, a(n) for n = 0..1000</a>
%H Wolfram Research, <a href="http://functions.wolfram.com/Constants/Pi/10/0006/">Pi</a>
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,3,0,-3,0,1).
%F a(n) = 3*a(n-2)-3*a(n-4)+a(n-6). G.f.: (1+x^2)*(x^2-x-1)/((x-1)^3*(1+x)^3). - _R. J. Mathar_, Jan 05 2009
%F From _Colin Barker_, Jan 27 2016: (Start)
%F a(n) = (-1)*((1+n)*(-5-3*(-1)^n+(-1+(-1)^n)*n))/8.
%F a(n) = n-1 for n even.
%F a(n) = (n^2+2*n+1)/4 for n odd.
%F (End)
%p f:=n->if n mod 2 = 0 then n+1 else ((n+1)/2)^2; fi;
%t Riffle[2 Range@ Floor[#/2] - 1, Range[#]^2] &@66 (* or *) CoefficientList[Series[(1 + x^2) (x^2 - x - 1)/((x - 1)^3*(1 + x)^3), {x, 0, 64}], x] (* _Michael De Vlieger_, Jan 27 2016 *)
%t LinearRecurrence[{0, 3, 0, -3, 0, 1}, {1, 1, 3, 4, 5, 9}, 70] (* _Vincenzo Librandi_, Jan 28 2016 *)
%o (PARI) Vec((1+x^2)*(x^2-x-1)/((x-1)^3*(1+x)^3) + O(x^100)) \\ _Colin Barker_, Jan 27 2016
%o (Magma) [(-1)*((1+n)*(-5-3*(-1)^n+(-1+(-1)^n)*n))/8: n in [0..70]]; // _Vincenzo Librandi_, Jan 28 2016
%Y Cf. A086377.
%Y Cf. A088538 for decimal expansion of 4/Pi.
%K nonn,easy
%O 0,3
%A _N. J. A. Sloane_, Sep 20 2008