login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A053344 Minimal number of coins needed to pay n cents using coins of sizes 1, 5, 10, 25 cents. 6
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, 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, 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, 4 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

LINKS

Index entries for sequences related to making change.

FORMULA

a(n) = floor(n/25) + floor([n mod 25]/10) + floor([{n mod 25} mod 10]/5) + ([n mod 25] mod 10) mod 5

EXAMPLE

a(57) = 5 because to pay 57 cents at least 5 coins are needed: 2 of 25 cents, 1 of 5 cents and 2 of 1 cent.

MATHEMATICA

f[n_]:=Floor[n/25]+Floor[Mod[n, 25]/10]+Floor[Mod[Mod[n, 25], 10]/5]+Mod[Mod[Mod[n, 25], 10], 5]; lst={}; Do[AppendTo[lst, f[n]], {n, 6!}]; lst [From Vladimir Orlovsky (4vladimir(AT)gmail.com), Sep 28 2009]

CROSSREFS

Cf. A011542, A001299.

Sequence in context: A053840 A010883 A011542 * A092196 A100878 A145172

Adjacent sequences:  A053341 A053342 A053343 * A053345 A053346 A053347

KEYWORD

easy,nonn

AUTHOR

Jean Fontaine (jfontain(AT)odyssee.net), Jan 06 2000

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 19:43 EST 2012. Contains 205949 sequences.