OFFSET
0,3
COMMENTS
Given a(1) = 1, a(n) represents the least number of coins needed to make n cents using coins in the denominations of a(m) for 0 < m < n. For instance, a(10) = 4 because 10 = a(5) + a(5) + a(5) + a(1), and this is the smallest collection of coins with this property. - Alec Jones, Apr 11 2016
LINKS
Peter Kagey, Table of n, a(n) for n = 0..10000
FORMULA
For all m>=2, a(k) = m if m^2-m+1 <= k <= m^2, a(m^2 +1) = m+1, a(k) = m if m^2 +2 <= k <= m^2 +m.
EXAMPLE
The largest value among terms a(0) through a(12) is 4. So a(13) = ceiling(13/4) = 4.
MATHEMATICA
Fold[Append[#1, Ceiling[#2/Max@ #1]] &, {1}, Range@ 100] (* Michael De Vlieger, Oct 16 2017 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Feb 09 2008
STATUS
approved