A265404 a(n) = number of Spironacci numbers (A078510) needed to sum to n using the greedy algorithm.
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2
Offset: 0
Keywords
Examples
For n=17, the largest Spironacci number <= 17 is 16 (= A078510(22)). 17 - 16 = 1, which is A078510(1), thus 17 = A078510(22) + A078510(1), requiring only two such numbers for its sum, thus a(17) = 2. For n=234, the largest Spironacci number <= 234 is 217 (= A078510(45)). 234-217 = 17 (whose decomposition is shown above), so 234 = A078510(45) + A078510(22) + A078510(1), thus a(234) = 3.
Links
- Antti Karttunen, Table of n, a(n) for n = 0..10132
Comments