%I #51 Sep 08 2022 08:45:10
%S 1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,
%T 3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,
%U 1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1,3,3,1,1
%N Expansion of (1+x)^2/((1-x)*(1+x^2)).
%C Partial sums of A084099. Inverse binomial transform of A000749 (without leading zeros).
%C From _Klaus Brockhaus_, May 31 2010: (Start)
%C Periodic sequence: Repeat 1, 3, 3, 1.
%C Interleaving of A010684 and A176040.
%C Continued fraction expansion of (7 + 5*sqrt(29))/26.
%C Decimal expansion of 121/909.
%C a(n) = A143432(n+3) + 1 = 2*A021913(n+1) + 1 = 2*A133872(n+3) + 1.
%C a(n) = A165207(n+1) - 1.
%C First differences of A047538.
%C Binomial transform of A084102. (End)
%C From _Wolfdieter Lang_, Feb 09 2012: (Start)
%C a(n) = A045572(n+1) (Modd 5) := A203571(A045572(n+1)), n >= 0.
%C For general Modd n (not to be confused with mod n) see a comment on A203571. The nonnegative members of the five residue classes Modd 5, called [m] for m=0,1,...,4, are shown in the array A090298 if there the last row is taken as class [0] after inclusion of 0.
%C (End)
%H Guenther Schrack, <a href="/A084101/b084101.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1, -1, 1).
%F a(n) = binomial(3, n mod 4). - _Paul Barry_, May 25 2003
%F From _Klaus Brockhaus_, May 31 2010: (Start)
%F a(n) = a(n-4) for n > 3; a(0) = a(3) = 1, a(1) = a(2) = 3.
%F a(n) = (4 - (1+i)*i^n - (1-i)*(-i)^n)/2 where i = sqrt(-1). (End)
%F E.g.f.: 2*exp(x) + sin(x) - cos(x). - _Arkadiusz Wesolowski_, Nov 04 2017
%F a(n) = 2 - (-1)^(n*(n+1)/2). - _Guenther Schrack_, Feb 26 2019
%e From _Wolfdieter Lang_, Feb 09 2012: (Start)
%e Modd 5 of nonnegative odd numbers restricted mod 5:
%e A045572: 1, 3, 7, 9, 11, 13, 17, 19, 21, 23, ...
%e Modd 5: 1, 3, 3, 1, 1, 3, 3, 1, 1, 3, ...
%e (End)
%t CoefficientList[Series[(1+x)^2/((1-x)(1+x^2)),{x,0,110}],x] (* or *) PadRight[{},110,{1,3,3,1}] (* _Harvey P. Dale_, Nov 21 2012 *)
%o (PARI) x='x+O('x^100); Vec((1+x)^2/((1-x)*(1+x^2))) \\ _Altug Alkan_, Dec 24 2015
%o (Magma) R<x>:=PowerSeriesRing(Integers(), 100); Coefficients(R!( (1+x)^2/((1-x)*(1+x^2)) )); // _G. C. Greubel_, Feb 28 2019
%o (Sage) ((1+x)^2/((1-x)*(1+x^2))).series(x, 100).coefficients(x, sparse=False) # _G. C. Greubel_, Feb 28 2019
%Y Cf. A084102.
%Y Cf. A010684 (repeat 1, 3), A176040 (repeat 3, 1), A178593 (decimal expansion of (7+5*sqrt(29))/26), A143432 (expansion of (1+x^4)/((1-x)*(1+x^2))), A021913 (repeat 0, 0, 1, 1), A133872 (repeat 1, 1, 0, 0), A165207 (repeat 2, 2, 4, 4), A047538 (congruent to 0, 1, 4 or 7 mod 8), A084099 (expansion of (1+x)^2/(1+x^2)), A000749 (expansion of x^3/((1-x)^4-x^4)). - _Klaus Brockhaus_, May 31 2010
%K easy,nonn
%O 0,2
%A _Paul Barry_, May 15 2003