login
A174296
Row sums of A174294.
7
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, 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, 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
OFFSET
0,2
FORMULA
a(A004280(n)) = 3 for n > 2.
From G. C. Greubel, Nov 25 2021: (Start)
a(n) = a(n-2) for n > 3, with a(0) = 1, a(1) = 2, a(2) = 2, a(3) = 3.
a(n) = (5 - (-1)^n)/2 for n > 1, with a(0) = 1, a(1) = 2.
a(n) = (n+1)*[n<2] + A010693(n)*[n>1].
G.f.: (1_+ 2*x + x^2 + x^3)/(1 - x^2).
E.g.f.: (1/2)*( -exp(-x) - 2*(1+x) + 5*exp(x) ). (End)
MATHEMATICA
Table[If[n<2, n+1, (5-(-1)^n)/2], {n, 0, 110}] (* G. C. Greubel, Nov 25 2021 *)
PROG
(Magma) [n lt 2 select (n+1) else 2 + (n mod 2): n in [0..110]]; // G. C. Greubel, Nov 25 2021
(Sage) [1, 2]+[(5-(-1)^n)/2 for n in (2..110)] # G. C. Greubel, Nov 25 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mats Granvik, Mar 15 2010
STATUS
approved