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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A286281 a(n) = floor the elevator is on at the n-th stage of Ken Knowlton's elevator problem, version 2. 4
 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS An elevator steps up or down a floor at a time. It starts at floor 1, and always goes up from floor 1. From each floor m, it steps up every m-th time it stops there (except that stops when the elevator is going down don't count), otherwise down. REFERENCES Ken Knowlton, Email to R. L. Graham and N. J. A. Sloane, May 04 2017 LINKS N. J. A. Sloane, Table of n, a(n) for n = 1..20000 MAPLE hit:=Array(1..50, 0); hit[1]:=1; a:=[1]; dir:=1; f:=1; for s from 2 to 1000 do if dir>0 or f=1 then f:=f+1; hit[f]:=hit[f]+1; dir:=1; else f:=f-1; dir:=-1; fi; a:=[op(a), f]; if (dir=1) and ((hit[f] mod f) = 0) then dir:=1; else dir:=-1; fi; od: a; MATHEMATICA f[n_, m_: 20] := Block[{a = {}, r = ConstantArray[0, m], f = 1, d = 0}, Do[AppendTo[a, f]; If[d == 1, r = MapAt[# + 1 &, r, f]]; If[Or[And[ Divisible[r[[f]], f], d == 1], f == 1], f++; d = 1, f--; d = -1], {i, n}]; a]; f@ 100 (* Michael De Vlieger, May 10 2017 *) CROSSREFS For records see A286282. See A285200 for the first version of the elevator problem. Sequence in context: A277889 A018194 A338630 * A229830 A105203 A317952 Adjacent sequences: A286278 A286279 A286280 * A286282 A286283 A286284 KEYWORD nonn AUTHOR N. J. A. Sloane, May 09 2017 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.

Last modified February 7 14:14 EST 2023. Contains 360123 sequences. (Running on oeis4.)