[seqfan] Re: Denomination sequence

Alois Heinz heinz at hs-heilbronn.de
Fri Aug 14 20:33:46 CEST 2009


Nice sequence.  Do you need a program or more?

b:= proc(n,i) option remember;
   if n<0 then 0
 elif n=0 then 1
 elif i<0 then 0
 elif i=1 then n+1
 else b(n,i-1) +b(n-a(i),i)
   fi
end:
a:= n-> b(n,n-1):
seq (a(n), n=0..100);

1, 1, 3, 5, 7, 10, 14, 19, 25, 32, 42, 53, 66, 82, 101, 124, 150, 181, 
216, 257,
306, 361, 424, 495, 577, 671, 776, 895, 1029, 1180, 1350, 1540, 1752, 1988,
2252, 2547, 2872, 3231, 3630, 4071, 4558, 5093, 5683, 6330, 7040, 7822, 
8674,
9606, 10625, 11738, 12952, 14270, 15708, 17270, 18966, 20808, 22803, 24965,
27303, 29835, 32571, 35521, 38707, 42143, 45845, 49829, 54117, 58730, 
63683,
69004, 74718, 80842, 87408, 94445, 101979, 110040, 118661, 127882, 137730,
148244, 159472, 171447, 184217, 197826, 212327, 227768, 244197, 261683, 
280274,
300033, 321030, 343331, 367009, 392127, 418779, 447044, 476997, 508739, 
542360,
577958, 615633

Alois

David Wilson schrieb:
> 1 1 3 5 7 10 14 19 25 32 42 53 66 82 101 124 150 181 216 257 306
>
> Start at the 0th coin. The value of the nth coin is the number of ways 
> to make change for n cents in earlier coins. The two penny coins are 
> considered distinct.
>
> g.f: g(x) = PROD(n >= 0; 1/(1-x^a(n))) - x
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>
>   





More information about the SeqFan mailing list