[go: up one dir, main page]

login
A080456
a(1) = a(2) = 2; for n > 2, a(n) = a(n-1) if n is already in the sequence, a(n) = a(n-1) + 4 otherwise.
6
2, 2, 6, 10, 14, 18, 18, 22, 26, 30, 30, 34, 38, 42, 42, 46, 50, 54, 54, 58, 62, 66, 66, 70, 74, 78, 78, 82, 86, 90, 90, 94, 98, 102, 102, 106, 110, 114, 114, 118, 122, 126, 126, 130, 134, 138, 138, 142, 146, 150, 150, 154, 158, 162, 162, 166, 170, 174, 174
OFFSET
1,1
COMMENTS
First differences are 4-periodic.
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.
FORMULA
From Chai Wah Wu, Jul 17 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n > 6.
G.f.: -2*(-1 - 2*x^2 - 2*x^3 - x^4 - 2*x^5 + 2*x^6)/((-1 + x)^2*(1 + x + x^2 + x^3)). (End)
MATHEMATICA
Join[{2}, LinearRecurrence[{1, 0, 0, 1, -1}, {6, 10, 14, 18, 18}, 60]] (* Jean-François Alcover, Sep 02 2018 *)
CoefficientList[Series[-2*(-1 - 2 x^2 - 2 x^3 - x^4 - 2 x^5 + 2 x^6)/((-1 + x)^2 (1 + x +x^2 + x^3)), {x, 0, 60}], x] (* Stefano Spezia, Sep 02 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 20 2003
EXTENSIONS
a(1) = 2 prepended by Stefano Spezia, Sep 04 2018
STATUS
approved