login
A061339
Minimal number of steps to get from 0 to n by (a) adding 1 or (b) subtracting 1 or (c) multiplying by 2.
1
0, 1, 2, 3, 3, 4, 4, 5, 4, 5, 5, 6, 5, 6, 6, 6, 5, 6, 6, 7, 6, 7, 7, 7, 6, 7, 7, 8, 7, 8, 7, 7, 6, 7, 7, 8, 7, 8, 8, 8, 7, 8, 8, 9, 8, 9, 8, 8, 7, 8, 8, 9, 8, 9, 9, 9, 8, 9, 9, 9, 8, 9, 8, 8, 7, 8, 8, 9, 8, 9, 9, 9, 8, 9, 9, 10, 9, 10, 9, 9, 8, 9, 9, 10, 9, 10, 10, 10, 9, 10, 10, 10, 9, 10, 9, 9, 8, 9, 9
OFFSET
0,3
FORMULA
a(2n)=a(n)+1; a(2n+1)=min{a(n)+2, a(n+1)+2}; a(0)=0, a(1)=1.
EXAMPLE
a(23)=7 since 23=(0+1+1+1)*2*2*2-1.
CROSSREFS
Cf. A056792.
Sequence in context: A218007 A060607 A265690 * A073933 A056792 A292127
KEYWORD
nonn
AUTHOR
Henry Bottomley, Jun 06 2001
STATUS
approved