[go: up one dir, main page]

login
A080455
a(1)=1; for n>1, a(n) = a(n-1) if n is already in the sequence, a(n) = a(n-1) + 4 otherwise.
13
1, 5, 9, 13, 13, 17, 21, 25, 25, 29, 33, 37, 37, 41, 45, 49, 49, 53, 57, 61, 61, 65, 69, 73, 73, 77, 81, 85, 85, 89, 93, 97, 97, 101, 105, 109, 109, 113, 117, 121, 121, 125, 129, 133, 133, 137, 141, 145, 145, 149, 153, 157, 157, 161, 165, 169, 169, 173
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)
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