A354914 The least cost to reach n using additions and multiplications, where multiplication is free.
0, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 3, 1, 2, 2, 3, 2, 3, 3, 4, 2, 2, 3, 2, 3, 3, 3, 3, 1, 2, 2, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 3, 4, 4, 2, 3, 2, 3, 3, 4, 2, 3, 3, 3, 3, 3, 3, 4, 3, 3, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 3, 3, 4, 3, 4, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 4, 2, 3, 3, 3, 2
Offset: 1
Keywords
Examples
For n = 23, the least cost a(23) is 4, via the sequence 1, 2, 3, 4, 8, 16, 19, 23.
Links
- Stan Wagon, Table of n, a(n) for n = 1..5000
- H. M. Bahig, On a generalization of addition chains: Addition-multiplication chains, Discrete Mathematics 308 (2008), 611-616.
- Stan Wagon, Optimal paths for n up to 100
Comments