in a similar vein, I tried to properly define the distinct partitions of n into + or - powers of two. Like counting the ways to pay n (bin-euro's) with getting change allowed: example: 13 ways to pay 4000 bin-euro's using distinct coins and getting change: {l[32] + l[128] + l[256] + l[512] + l[1024] + l[2048], -l[32] + l[64] + l[128] + l[256] + l[512] + l[1024] + l[2048], -l[32] - l[64] + l[4096], l[32] - l[128] + l[4096], -l[32] + l[64] - l[128] + l[4096], l[32] + l[128] - l[256] + l[4096], -l[32] + l[64] + l[128] - l[256] + l[4096], l[32] + l[128] + l[256] - l[512] + l[4096], -l[32] + l[64] + l[128] + l[256] - l[512] + l[4096], l[32] + l[128] + l[256] + l[512] - l[1024] + l[4096], -l[32] + l[64] + l[128] + l[256] + l[512] - l[1024] + l[4096], l[32] + l[128] + l[256] + l[512] + l[1024] - l[2048] + l[4096], -l[32] + l[64] + l[128] + l[256] + l[512] + l[1024] - l[2048] + l[4096]} This has a pretty fractal structure: Drop[CoefficientList[ExpandAll[ x^(2^13-1)Product[1+l[i]x^(2^i),{i,0,12}] Product[1+1/l[i]1/(x^(2^i)),{i,0,12}]] ,x] ,2^13]; Trouble is that the above 13 ways depend on the largest coins allowed (here 2^12). So there is no limiting sequence for such type of problem. If only 1 coin can be given as change, then the count seems to be A000120, or simply the number of ones in the binary repr. of n. Booooring! W. ----- Original Message ----- From: "Henry Baker" <hbaker1@pipeline.com> To: <michael.kleber@gmail.com>; "math-fun" <math-fun@mailman.xmission.com> Sent: Thursday, September 15, 2005 5:27 PM Subject: Re: [math-fun] A ternary notation It's quite common in computer arithmetic units to "recode" a base-2 number using _three_ digits: +1, 0, -1. Thus, although the number is still in base 2, this "balanced" representation has much better rounding behavior, since ignoring the lower order digits always gives the correctly rounded value. Multiplier hardware, in particular, likes this representation. There's been a huge amount of research into various number systems & representations for computer arithmetic, which research continues to this day. Here's a start: http://arith.stanford.edu/ _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun