OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = 10*n - a(n-1) - 2, n > 1.
a(n+1) = A017377(floor(n/2)). - R. J. Mathar, Jan 05 2011
G.f.: x*(9+x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Jan 05 2011
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {9, 9, 19}, 60] (* Vincenzo Librandi, Mar 02 2012 *)
PROG
(Magma) I:=[9, 9, 19]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..60]]; // Vincenzo Librandi, Mar 02 2012
(PARI) for(n=1, 60, print1(3/2+5*n-5*(-1)^n/2", ")); \\ Vincenzo Librandi, Mar 02 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 25 2009
EXTENSIONS
Definition rewritten by R. J. Mathar, Jan 05 2011
STATUS
approved