login
A056796
Minimal number of steps to get from 0 to n when there are 3 kinds of step: add 1, multiply by 2, multiply by 3.
3
0, 1, 2, 2, 3, 4, 3, 4, 4, 3, 4, 5, 4, 5, 5, 5, 5, 6, 4, 5, 5, 5, 6, 7, 5, 6, 6, 4, 5, 6, 5, 6, 6, 6, 7, 8, 5, 6, 6, 6, 6, 7, 6, 7, 7, 6, 7, 8, 6, 7, 7, 7, 7, 8, 5, 6, 6, 6, 7, 8, 6, 7, 7, 6, 7, 8, 7, 8, 8, 8, 9, 10, 6, 7, 7, 7, 7, 8, 7, 8, 7, 5, 6, 7, 6, 7, 8, 7, 8, 9, 6, 7, 8, 7, 8, 9, 7, 8, 8
OFFSET
0,3
REFERENCES
Proposed by Mark Sapir, Math. Dept., Vanderbilt University, August 2000.
MAPLE
g:= proc(a, b) option remember; local r;
if a = b then return 0 fi;
if a = 0 then return 1 + procname(1, b) fi;
r:= 1 + procname(a+1, b);
if 2*a <= b then r:= min(r, 1+procname(2*a, b)) fi;
if 3*a <= b then r:= min(r, 1+procname(3*a, b)) fi;
r
end proc:
seq(g(0, n), n=0..100); # Robert Israel, Mar 06 2026
CROSSREFS
Sequence in context: A003078 A165359 A002308 * A061295 A081742 A377079
KEYWORD
nonn
AUTHOR
David W. Wilson, Sep 07 2000
STATUS
approved