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!)
A080590 a(1)=1; for n>1, a(n)=a(n-1)+3 if n is already in the sequence, a(n)=a(n-1)+4 otherwise. 2
1, 5, 9, 13, 16, 20, 24, 28, 31, 35, 39, 43, 46, 50, 54, 57, 61, 65, 69, 72, 76, 80, 84, 87, 91, 95, 99, 102, 106, 110, 113, 117, 121, 125, 128, 132, 136, 140, 143, 147, 151, 155, 158, 162, 166, 169, 173, 177, 181, 184, 188, 192, 196, 199, 203, 207 (list; graph; refs; listen; history; text; internal format)
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)
MATHEMATICA
a[n_] := a[n] = If[n == 1, 1, If[MemberQ[Array[a, n-1], n], a[n-1]+3, a[n-1]+4]]; Array[a, 56] (* Jean-François Alcover, Oct 05 2018 *)
PROG
(Haskell)
a080590 n = a080590_list !! (n-1)
a080590_list = 1 : f 2 [1] where
f x zs@(z:_) = y : f (x + 1) (y : zs) where
y = z + (if x `elem` zs then 3 else 4)
-- Reinhard Zumkeller, Sep 26 2014
CROSSREFS
Cf. A081834.
Sequence in context: A227118 A314661 A316838 * A281582 A190696 A314662
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 23 2003
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 May 9 05:44 EDT 2024. Contains 372344 sequences. (Running on oeis4.)