OFFSET
0,3
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,1,-1).
FORMULA
a(n) = 2*n-1 if n == 1 (mod 3), 2*n if n == 2 (mod 3), 2*n + 1 if n == 0 (mod 3).
Differences are periodic with period 3.
From Colin Barker, Jun 20 2013: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4).
G.f.: (2*x^3 + 3*x^2 + 1) / ((x - 1)^2*(x^2 + x +1)). (End)
MATHEMATICA
LinearRecurrence[{1, 0, 1, -1}, {1, 1, 4, 7}, 63] (* Jean-François Alcover, Jan 07 2019 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane and Benoit Cloitre, Apr 01 2003
STATUS
approved