OFFSET
1,2
COMMENTS
a(n) is the smallest amount (in rupees) that cannot be made with fewer than n coins.
The coins included are those in common circulation in India: Rs. 1, Rs. 2, Rs. 5, Rs. 10 and Rs. 20.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
From Alois P. Heinz, May 19 2026: (Start)
G.f.: x*(10*x^4+5*x^3+3*x^2+x+1)/(x-1)^2.
a(n) = 20*n - 62 for n>=4. (End)
E.g.f.: 62 + 43*x + 25*x^2/2+ 5*x^3/3 + exp(x)*(20*x - 62). - Stefano Spezia, Jun 18 2026
EXAMPLE
For n = 3, 8 is the smallest number that requires 3 coins (1 + 2 + 5).
MATHEMATICA
Join[{1, 3, 8}, 20*Range[4, 60] - 62] (* Paolo Xausa, Jun 18 2026 *)
PROG
(Python)
from math import inf
def indianCoins(up_to=2000, coins=(1, 2, 5, 10, 20)):
coins_needed = [0] + [inf] * up_to
for c in coins:
for i in range(c, up_to + 1):
coins_needed[i] = min(coins_needed[i], coins_needed[i - c] + 1)
record = 0
return [n for n, x in enumerate(coins_needed) if x > record and (record := x)]
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Arjun Maneesh Agarwal, May 19 2026
STATUS
approved
