OFFSET
1,2
LINKS
David Lovler, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = 8*n - a(n-1) - 13 (with a(1)=1). - Vincenzo Librandi, Aug 06 2010
G.f.: x*(1+x+6*x^2)/((1-x)^2*(1+x)). - Colin Barker, May 13 2012
a(n) = 1 + 8*floor((n-1)/2) + ((n-1) mod 2). - Alois P. Heinz, May 13 2012
a(n) = (-3*(3 + (-1)^n) + 8*n)/2. - Colin Barker, May 14 2012
a(1)=1, a(2)=2, a(3)=9, a(n) = a(n-1) + a(n-2) - a(n-3). - Harvey P. Dale, Mar 26 2013
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(2)*Pi/16 + log(2)/8 + sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 18 2021
E.g.f.: 6 + ((8*x - 9)*exp(x) - 3*exp(-x))/2. - David Lovler, Sep 02 2022
MATHEMATICA
Flatten[#+{1, 2}&/@(8Range[0, 30])] (* or *) LinearRecurrence[{1, 1, -1}, {1, 2, 9}, 60] (* Harvey P. Dale, Mar 26 2013 *)
PROG
(PARI) a(n)=(n-1)\2*8+2-n%2 \\ Charles R Greathouse IV, May 14 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Vincenzo Librandi, Aug 06 2010
STATUS
approved