This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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 (list; graph; refs; listen; history; text; internal format)
 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 a(n) = -2 + 4*((n+2) mod (n+1)) + Sum_{k=0..n} ((1/2)*((k mod 4) + ((k+1) mod 4) - ((k+2) mod 4) + 3*((k+3) mod 4))). - Paolo P. Lava, Aug 29 2007 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 Cf. A080455, A080457, A080458, A080036, A080037. Sequence in context: A081728 A197218 A080460 * A077017 A181551 A127404 Adjacent sequences:  A080453 A080454 A080455 * A080457 A080458 A080459 KEYWORD nonn AUTHOR N. J. A. Sloane, Mar 20 2003 EXTENSIONS a(1) = 2 prepended by Stefano Spezia, Sep 04 2018 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 15 22:02 EST 2019. Contains 330012 sequences. (Running on oeis4.)