A163169 a(n) = minimal number of consecutive integers required which when summed make n.
0, 2, 0, 2, 0, 2, 3, 2, 0, 2, 4, 2, 3, 2, 4, 2, 0, 2, 3, 2, 5, 2, 4, 2, 3, 2, 4, 2, 7, 2, 3, 2, 0, 2, 4, 2, 3, 2, 4, 2, 5, 2, 3, 2, 8, 2, 4, 2, 3, 2, 4, 2, 8, 2, 3, 2, 7, 2, 4, 2, 3, 2, 4, 2, 0, 2, 3, 2, 8, 2, 4, 2, 3, 2, 4, 2, 8, 2, 3, 2, 5, 2, 4, 2, 3, 2, 4, 2, 11, 2, 3, 2, 8, 2, 4, 2, 3, 2, 4, 2, 5, 2, 3, 2
Offset: 0
Examples
20 = 2 + 3 + 4 + 5 + 6; No shorter sequence of consecutive integers sums to 20 and so a(20) = the number of elements in {2,3,4,5,6} = 5. 15 = 4 + 5 + 6, but also 15 = 7 + 8, so a(15) = 2, since this is the minimum.
Links
- Ray Chandler, Table of n, a(n) for n = 0..10000
Comments