OFFSET
1,2
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 (math.NT/0305308)
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
For m>=1, a(4m) = a(4m+1) = 12m+1, a(4m+2) = 12m+5, a(4m+3) = 12m+9.
Or, shorter: a(n) = 4*n+1- 4*floor((n+3)/4). - Benoit Cloitre, Mar 20 2003
From Colin Barker, Oct 16 2013: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5).
G.f.: -x*(x^4 - 4*x^3 - 4*x^2 - 4*x - 1) / ((x-1)^2*(x+1)*(x^2+1)). (End)
MATHEMATICA
LinearRecurrence[{1, 0, 0, 1, -1}, {1, 5, 9, 13, 13}, 58] (* Jean-François Alcover, Sep 21 2017 *)
PROG
(PARI) Vec(-x*(x^4-4*x^3-4*x^2-4*x-1)/((x-1)^2*(x+1)*(x^2+1)) + O(x^100)) \\ Colin Barker, Oct 16 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 20 2003
STATUS
approved