OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = ceiling((7*n+2)/2).
a(n) = 7*n - a(n-1) - 8 (with a(1)=1). - Vincenzo Librandi, Aug 05 2010
G.f.: x*(1+4*x+2*x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
a(1)=1, a(2)=5, a(3)=8; for n>3, a(n) = a(n-1) + a(n-2) - a(n-3). - Harvey P. Dale, Dec 24 2012
From Wesley Ivan Hurt, Nov 10 2013: (Start)
a(n) = 4*n - floor((n-1)/2) - 3.
a(2*k-1) = 7*k-6, a(2*k) = 7*k-2. (End)
E.g.f.: 2 + ((14*x - 9)*exp(x) + exp(-x))/4. - David Lovler, Sep 01 2022
MAPLE
MATHEMATICA
Flatten[(#+{1, 5})&/@(7Range[0, 25])] (* or *) LinearRecurrence[ {1, 1, -1}, {1, 5, 8}, 80] (* Harvey P. Dale, Dec 24 2012 *)
PROG
(PARI) a(n)=7*n\2-2 \\ Charles R Greathouse IV, Jun 11 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved