This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A286282 #68 May 08 2025 22:59:52 %S A286282 1,2,5,18,79,408,2469,17314,138555,1247052,12470593,137176614, %T A286282 1646119479,21399553360,299593747197,4493906208138,71902499330419, %U A286282 1222342488617364,22002164795112825,418041131107143982,8360822622142879983,175577275065000480024,3862700051430010560949 %N A286282 Stage at which Ken Knowlton's elevator (version 2) reaches floor n for the first time. %C A286282 Indices of records in A286281. %C A286282 Theorem: Let b(n) = Sum_{k=0..n} n!/k! = A000522(n). Then a(n) = 2*b(n-1)-n+2-2*(n-1)!. - R. L. Graham, May 10 2017 %C A286282 This implies the following recurrence (conjectured by _N. J. A. Sloane_ on May 09 2017): a(1)=1, and for n>=1, a(n+1) = n*a(n) + n^2 - 3*n + 3. From the asymptotic expansion of b(n) (see A000522), we have a(n) ~ 2*(e-1)*(n-1)!. %H A286282 N. J. A. Sloane, <a href="/A286282/b286282.txt">Table of n, a(n) for n = 1..400</a> %F A286282 a(n) = 2*A002627(n-1) - (n-2). - _N. J. A. Sloane_, May 15 2017 %F A286282 Conjecture: a(n) +(-n-2)*a(n-1) +3*(n-1)*a(n-2) +(-3*n+8)*a(n-3) +(n-4)*a(n-4)=0. - _R. J. Mathar_, May 21 2017 %F A286282 Conjecture: (n+1)*a(n) +(-n^2+3*n-27)*a(n-1) +3*(-n^2+10*n-13)*a(n-2) +(n-3)*(4*n-17)*a(n-3)=0. - _R. J. Mathar_, May 21 2017 %p A286282 A286282 := proc(n) %p A286282 2*A002627(n-1)-n+2 ; %p A286282 end proc: %p A286282 seq(A286282(n),n=1..21) ; # _R. J. Mathar_, May 21 2017 %t A286282 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]; Rest@ Map[First, Values@ PositionIndex@ FoldList[Max, 0, f@ 200000]] - 1 (* _Michael De Vlieger_, May 10 2017, Version 10 *) %o A286282 (Python) %o A286282 times = {1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1, 10: 1, 11: 1, 12: 1, 13: 1, 14: 1, 15: 1, 16: 1} %o A286282 first = {1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0} %o A286282 floor = 1 %o A286282 steps = 1 %o A286282 while floor < 17: %o A286282 if first[floor] == 0: %o A286282 first[floor] = 1 %o A286282 print("First Time: ",floor,steps) %o A286282 if floor == 1: %o A286282 floor += 1 %o A286282 else: %o A286282 if times[floor] < floor: %o A286282 times[floor] += 1 %o A286282 floor -= 1 %o A286282 else: %o A286282 times[floor] = 0 %o A286282 floor += 1 %o A286282 steps += 1 %o A286282 print(floor, steps) %o A286282 # _David Consiglio, Jr._, May 09 2017 %Y A286282 Cf. A000522, A002627, A286281, A285201. %K A286282 nonn %O A286282 1,2 %A A286282 _N. J. A. Sloane_, May 09 2017 %E A286282 a(10)-a(13) from _David Consiglio, Jr._, May 09 2017 %E A286282 Further terms added by _N. J. A. Sloane_, May 10 2017 based on R. L. Graham's formula.