OFFSET
1,2
COMMENTS
Old name was "Start with 1; then repeatedly add 1, then add 10."
LINKS
FORMULA
From R. J. Mathar, Sep 04 2008: (Start)
a(n) = (22*n - 27 - 9*(-1)^n)/4.
G.f.: x*(1 + x + 9*x^2)/((1+x)(1-x)^2).
a(n) = a(n-2) + 11. (End)
a(n) = 11*n - a(n-1) - 19 (with a(1)=1). - Vincenzo Librandi, Nov 25 2010
MATHEMATICA
Rest@ CoefficientList[Series[x (1 + x + 9 x^2)/((1 + x) (1 - x)^2), {x, 0, 56}], x] (* or *)
Nest[Append[#1, #1[[-1]] + 1 + 9 Boole[EvenQ@ #2]] & @@ {#, Length@ #} &, {1}, 55] (* Michael De Vlieger, Nov 23 2018 *)
nxt[{n_, a_}]:={n+1, If[OddQ[n], a+1, a+10]}; NestList[nxt, {1, 1}, 60][[All, 2]] (* or *) LinearRecurrence[{1, 1, -1}, {1, 2, 12}, 60] (* Harvey P. Dale, Jun 22 2021 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Luis Farfan (ljfarfan(AT)gmail.com), Sep 01 2008
EXTENSIONS
Extended by R. J. Mathar, Sep 04 2008
New name from Michael De Vlieger, Nov 24 2018
STATUS
approved