%I M2276#37 2023年8月27日19:44:37
%S 1,3,3,4,7,7,9,9,10,13,13,15,15,19,19,21,21,22,27,27,27,27,27,
%电话:27,28,31,31,31.31,39,39,39,39,39,
%U 55,55,55,55,55,55,57,57,58,63,63,63,64,67,67,67,79,79,79,79
%N Knuth序列(或Knuth数):a(N+1)=1+min(2*a(地板(N/2)),3*a(地面(N/3)))。
%C记录值及其出现位置:a(A002977(n-1)_Reinhard Zumkeller,2010年7月13日
%C A003817和A179526为子序列_Reinhard Zumkeller_,2010年7月18日
%D R.L.Graham、D E.Knuth和O.Patashnik,《具体数学》。Addison-Wesley,马萨诸塞州雷丁,1990年,第78页。
%D N.J.A.Sloane和Simon Plouffe,《整数序列百科全书》,学术出版社,1995年(包括该序列)。
%H T.D.Noe,n表,n=0..1000时的a(n)</a>
%H Eric Weisstein的数学世界,<a href=“http://mathworld.wolfram.com/KnuthNumber.html“>Knuth编号。
%ta[1]=1;a[n_]:=a[n]=1+最小值[2a[上限[(n-1)/2]],3a[上限];表[a[n],{n,72}](*_Robert G.Wilson v_,2005年1月29日*)
%o(哈斯克尔)
%o a007448 n=a007448_list!!n个
%o a007448_list=f[0][0]其中
%o f(x:xs)(y:ys)=z:f(xs++[2*z,2*z])(ys++[3*z,3*z
%o其中z=1+最小x y
%o--_Reinhard Zumkeller_2011年9月20日
%o(Python)
%o定义缺陷(nn):
%o alst=[1]
%o[alst.append(1+分钟(2*alst[n//2],3*alst[n//3]),对于范围(nn)内的n)]
%o返回alst
%o打印(aupton(70))#_Michael S.Branicky_,2022年3月28日
%Y参考A002977。
%放松,不,很好
%0、2
%A _N.J.A.斯隆_
|