Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #11 Sep 08 2022 08:45:51
%S 1,2,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,
%T 2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,
%U 2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2
%N Row sums of A174294.
%H G. C. Greubel, <a href="/A174296/b174296.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,1).
%F a(A004280(n)) = 3 for n > 2.
%F From _G. C. Greubel_, Nov 25 2021: (Start)
%F a(n) = a(n-2) for n > 3, with a(0) = 1, a(1) = 2, a(2) = 2, a(3) = 3.
%F a(n) = (5 - (-1)^n)/2 for n > 1, with a(0) = 1, a(1) = 2.
%F a(n) = (n+1)*[n<2] + A010693(n)*[n>1].
%F G.f.: (1_+ 2*x + x^2 + x^3)/(1 - x^2).
%F E.g.f.: (1/2)*( -exp(-x) - 2*(1+x) + 5*exp(x) ). (End)
%t Table[If[n<2, n+1, (5-(-1)^n)/2], {n,0,110}] (* _G. C. Greubel_, Nov 25 2021 *)
%o (Magma) [n lt 2 select (n+1) else 2 + (n mod 2): n in [0..110]]; // _G. C. Greubel_, Nov 25 2021
%o (Sage) [1,2]+[(5-(-1)^n)/2 for n in (2..110)] # _G. C. Greubel_, Nov 25 2021
%Y Cf. A010693, A112468, A112467, A174294, A174295, A174297.
%K nonn,easy
%O 0,2
%A _Mats Granvik_, Mar 15 2010