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!)
A080579 a(1)=1; for n>1, a(n)=a(n-1)+1 if n is already in the sequence, a(n)=a(n-1)+4 otherwise. 1
1, 5, 9, 13, 14, 18, 22, 26, 27, 31, 35, 39, 40, 41, 45, 49, 53, 54, 58, 62, 66, 67, 71, 75, 79, 80, 81, 85, 89, 93, 94, 98, 102, 106, 107, 111, 115, 119, 120, 121, 122, 126, 130, 134, 135, 139, 143, 147, 148, 152, 156, 160, 161, 162, 166, 170, 174, 175 (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[1] = 1; a[n_] := a[n] = If[MemberQ[Array[a, n-1], n], a[n-1]+1, a[n-1]+4]; Array[a, 60] (* Jean-François Alcover, Oct 08 2018 *)
PROG
(Haskell)
a080579 n = a080579_list !! (n-1)
a080579_list = 1 : f 2 [1] where
f x zs@(z:_) = y : f (x + 1) (y : zs) where
y = if x `elem` zs then z + 1 else z + 4
-- Reinhard Zumkeller, Sep 26 2014
CROSSREFS
Sequence in context: A189464 A130333 A304868 * A325274 A303264 A165971
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 August 25 19:47 EDT 2024. Contains 375454 sequences. (Running on oeis4.)