OFFSET
1,3
COMMENTS
There are multiple ways to get a shortest addition chain (A003313), this sequence is the smallest sum of the possible chains.
LINKS
Roy van Rijn, Table of n, a(n) for n = 1..100
FORMULA
For n = 2^s, a(n)=s-1
EXAMPLE
Here are the smallest examples:
1 : 0 []
2 : 1 [1]
3 : 3 [1, 2]
4 : 3 [1, 2]
5 : 6 [1, 2, 3]
6 : 6 [1, 2, 3]
7 : 10 [1, 2, 3, 4]
8 : 7 [1, 2, 4]
9 : 12 [1, 2, 4, 5]
10 : 11 [1, 2, 3, 5]
11 : 17 [1, 2, 3, 5, 6]
12 : 12 [1, 2, 3, 6]
13 : 19 [1, 2, 3, 6, 7]
14 : 17 [1, 2, 3, 4, 7]
15 : 21 [1, 2, 3, 6, 9]
16 : 15 [1, 2, 4, 8]
17 : 24 [1, 2, 4, 8, 9]
18 : 21 [1, 2, 4, 5, 9]
19 : 29 [1, 2, 3, 4, 8, 11]
20 : 21 [1, 2, 3, 5, 10]
... etc
CROSSREFS
KEYWORD
nonn
AUTHOR
Roy van Rijn, Sep 23 2024
STATUS
approved