OFFSET
1,2
EXAMPLE
For n=4, the coins available are 1,2. There are a(4)=3 ways to make 4 cents with these coins:
4 = 1+1+1+1
4 = 2+1+1
4 = 2+2
Since there are 3 ways, now the available coins are 1,2,3. For n=5, we have:
5 = 1+1+1+1+1
5 = 2+1+1+1
5 = 2+2+1
5 = 3+1+1
5 = 3+2
for 5 ways to make change, so now 1,2,3,5 are available, etc.
MATHEMATICA
a = {1, 2}; Do[AppendTo[a, Count[IntegerPartitions@ n, w_ /; AllTrue[w, MemberQ[a, #] &]]], {n, 3, 60}]; a (* Michael De Vlieger, Jan 15 2016, Version 10 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Christopher Cormier, Jan 14 2016
STATUS
approved