This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A260688 #26 Jul 19 2024 04:24:08 %S A260688 0,1,2,3,4,1,2,3,4,5,1,2,3,4,5,2,3,4,5,6,2,3,4,5,6,1,2,3,4,5,2,3,4,5, %T A260688 6,2,3,4,5,6,3,4,5,6,7,3,4,5,6,7,2,3,4,5,6,3,4,5,6,7,3,4,5,6,7,4,5,6, %U A260688 7,8,4,5,6,7,8,3,4,5,6,7,4,5,6,7,8,4,5,6,7,8,5,6,7,8,9,5,6,7,8,9 %N A260688 a(n) = the least number of pieces of currency of denominations .01, .05, .10, .25, 1, 5, 10, 20, 50, 100 that the greedy algorithm uses to make n times .01 (n "cents") in change. %H A260688 US Treasury, <a href="https://www.treasury.gov/resource-center/faqs/Coins/Pages/denominations.aspx">Denominations of Coins</a> %H A260688 US Treasury, <a href="https://www.treasury.gov/resource-center/faqs/Currency/Pages/denominations.aspx">Denominations of Paper Currency</a> %o A260688 (Python) %o A260688 def how_many(cents): %o A260688 #d = denominations %o A260688 d = ['$0.01', '$0.05', '$0.10', '$0.25', %o A260688 '$1', '$5', '$10', '$20', '$50', '$100'] %o A260688 coins = {coin: 100*float(str(coin)[1:]) for coin in d} %o A260688 how_many = {d[i]: 0 for i in range(10)} %o A260688 while len(d) != 0: %o A260688 how_many[d[-1]] = cents // coins[d[-1]] %o A260688 cents %= coins[d[-1]] %o A260688 d.pop() %o A260688 return int(sum(how_many.values())) %Y A260688 Cf. A053344, A067997, A080897, A108536. %K A260688 nonn %O A260688 0,3 %A A260688 _Edward Minnix III_, Nov 15 2015 %E A260688 Edited by _N. J. A. Sloane_, Apr 24 2016