login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A080458 a(1)=4; for n>1, a(n)=a(n-1) if n is already in the sequence, a(n)=a(n-1)+4 otherwise. 13
4, 8, 12, 12, 16, 20, 24, 24, 28, 32, 36, 36, 40, 44, 48, 48, 52, 56, 60, 60, 64, 68, 72, 72, 76, 80, 84, 84, 88, 92, 96, 96, 100, 104, 108, 108, 112, 116, 120, 120, 124, 128, 132, 132, 136, 140, 144, 144, 148, 152, 156, 156, 160, 164, 168, 168, 172, 176 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
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) = 4 + 4*(n-2-floor((n-4)/4)).
From Chai Wah Wu, Jul 17 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n > 5.
G.f.: 4*x*(x^2 + x + 1)/(x^5 - x^4 - x + 1). (End)
From Ilya Gutkovskiy, Jul 17 2016: (Start)
E.g.f.: (3*x + 1)*cosh(x) + (3*x + 2)*sinh(x) - cos(x) - sin(x).
a(n) = (6*n - (-1)^n - 2*sqrt(2)*sin(Pi*n/2+Pi/4) + 3)/2. (End)
MATHEMATICA
LinearRecurrence[{1, 0, 0, 1, -1}, {4, 8, 12, 12, 16}, 60] (* Jean-François Alcover, Sep 20 2018 *)
PROG
(PARI) a(n) = 4 + 4*(n-2-(n-4)\4); \\ Michel Marcus, May 06 2016
CROSSREFS
Sequence in context: A333597 A120427 A060830 * A147646 A080229 A284510
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)