Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A053344
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A053344 Minimal number of coins needed to pay n cents using coins of sizes 1, 5, 10, 25 cents. +0
3
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; listen)
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 this_sequence A092196 A100878 A145172

Adjacent sequences: A053341 A053342 A053343 this_sequence A053345 A053346 A053347

KEYWORD

easy,nonn

AUTHOR

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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 1 19:22 EST 2009. Contains 167811 sequences.


AT&T Labs Research