OFFSET
1,1
LINKS
B. Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence, J. Integer Seqs., Vol. 6 (2003), #03.2.2.
B. Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence, arXiv:math/0305308 [math.NT], 2003.
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
a(n) = 2 + 4*(n - 2 - floor((n - 2)/4)).
From Chai Wah Wu, Jul 17 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n > 5.
G.f.: 2*x*(x^4 + 2*x^3 + 2*x^2 + 1)/(x^5 - x^4 - x + 1). (End)
From Ilya Gutkovskiy, Jul 17 2016: (Start)
E.g.f.: 2 + (3*x - 2)*sinh(x) + 3*(x - 1)*cosh(x) + sin(x) + cos(x).
a(n) = (6*n - (-1)^n + 2*sqrt(2)*sin(Pi*n/2 + Pi/4) - 5)/2. (End)
MATHEMATICA
LinearRecurrence[{1, 0, 0, 1, -1}, {2, 2, 6, 10, 14}, 58] (* Jean-François Alcover, Jan 07 2019 *)
PROG
(PARI) a(n)=4*n - (n-2)\4*4 - 6 \\ Charles R Greathouse IV, Jul 17 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane and Benoit Cloitre, Mar 22 2003
STATUS
approved