|
|
A358012
|
|
Minimal number of coins needed to pay n cents using coins of denominations 1 and 5 cents.
|
|
0
|
|
|
0, 1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 6, 7, 8, 9, 10, 7, 8, 9, 10, 11, 8, 9, 10, 11, 12, 9, 10, 11, 12, 13, 10, 11, 12, 13, 14, 11, 12, 13, 14, 15, 12, 13, 14, 15, 16, 13, 14, 15, 16, 17, 14, 15, 16, 17, 18, 15, 16
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Sequence consists of runs of five consecutive integers: 0..4, 1..5, 2..6, 3..7, etc.
|
|
LINKS
|
|
|
FORMULA
|
Sum of quotient and remainder of n/5.
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) a(n) = vecsum(divrem(n, 5)); \\ Michel Marcus, Nov 03 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|