OFFSET
0,2
COMMENTS
Record values and where they occur: a(A002977(n-1)) = A002977(n) and a(m) < A002977(n) for m < A002977(n-1). - Reinhard Zumkeller, Jul 13 2010
REFERENCES
R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 78.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
T. D. Noe, Table of n, a(n) for n = 0..1000
Eric Weisstein's World of Mathematics, Knuth Number.
MAPLE
a := proc(n) option remember; ifelse(n = 0, 1, 1 + min(2 * a(iquo(n-1, 2)), 3 * a(iquo(n-1, 3)))) end: seq(a(n), n = 0..70); # Peter Luschny, Jul 16 2025
MATHEMATICA
a[0] = 1; a[n_] := a[n] = 1 + Min[2*a[Floor[(n - 1)/2]], 3*a[Floor[(n - 1)/3]]]; Table[ a[n], {n, 0, 72}] (* Robert G. Wilson v, Jan 29 2005, corrected by Michael De Vlieger, Jul 16 2025 *)
PROG
(Haskell)
a007448 n = a007448_list !! n
a007448_list = f [0] [0] where
f (x:xs) (y:ys) = z : f (xs ++ [2*z, 2*z]) (ys ++ [3*z, 3*z, 3*z])
where z = 1 + min x y
-- Reinhard Zumkeller, Sep 20 2011
(Python)
def aupton(nn):
alst = [1]
[alst.append(1 + min(2*alst[n//2], 3*alst[n//3])) for n in range(nn)]
return alst
print(aupton(70)) # Michael S. Branicky, Mar 28 2022
CROSSREFS
KEYWORD
easy,nonn,nice
AUTHOR
STATUS
approved
