Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A265404
a(n) = number of Spironacci numbers (A078510) needed to sum to n using the greedy algorithm.
5
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,18
COMMENTS
a(0) = 0, because no numbers are needed to form an empty sum, which is zero.
First 2 occurs as a(17), first 3 at a(234), first 4 at a(3266).
LINKS
EXAMPLE
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.
CROSSREFS
Cf. A078510 (from its term a(7) onward gives also the positions of ones here).
Sequence in context: A113189 A143098 A225515 * A274353 A183028 A114284
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 16 2015
STATUS
approved