crowlogic

32 Reputation

2 Badges

19 years, 62 days

MaplePrimes Activity


These are replies submitted by crowlogic

Joe, thanks for all your help. Your code led to some more insights.. it turns out that the sequence I am interested in does not wrap at 32.. it is actually the 'ruler function'. if you take the log base 2 ! http://www.research.att.com/~njas/sequences/A001511 In turn, this is related to the ubiquitous Thue-Morse sequence! Als, I'm trying to define this stuff functionally so that there are no while, ifs, loops, etc.. via generating functions, I think I'm close.
What do you mean by "shed some light"? I assume you understand what the function does. That is, if you consider the binary representation of the input, it returns the value of the right most 1 followed by the trailng zeros. For example, d(12) = d(11002]) = 1002 = 4. Ahh! Actually, I didn't notice that until now. Believe it or not, I actually derived this by looking at a series of integral coeffecients that took a very long time to calculate.. about 13 hours for the first 24 terms. So that is very interesting indeed. Should I be able to represent this function with simple binary shifts and logical AND? E.g shift a few to the left to knock off the zeros and then shift back to the right to put it back in place.
Ok, here is the other function which the above is used in Q(m)=(product(1/2*(2*n-1)*piecewise(n = 0, 1, mymod(n, 2) = 1, 2, mymod(n, 4) = 2, 4, mymod(n, 8) = 4, 8, mymod(n, 16) = 8, 16, 32)/n, n = 1 .. m))/(product(piecewise(n = 0, 1, mymod(n, 2) = 1, 2, mymod(n, 4) = 2, 4, mymod(n, 8) = 4, 8, mymod(n, 16) = 8, 16, 32), n = 1 .. m)) Plot this function and it evaluates Q(0)=1 and very slowly approaches 0 in the limit as m tends towards infinity, the curve is nice and smooth and can be verified by plotting.. and I know there has to be a simpler solution, but maple doesn't know how to handle functions of this type, or at least I don't know how to tell maple how to handle it.. So the function should interpolate smoothly between the intergers, just like how GAMMA is a generalization of the factorials, even though I don't stricly care about evaluating it there right now, although I should be able to if it is a well-behaved function, which it appears to be in theory.
Thanks for the helpful comments, all of this works for finding finite values but I'm really interested in doing further calculus on sequence.. I used CurveFitting to find a polynomial and a rational function which only needs 16 points (1..16) but the coefficients are rather messy... This function is only defined on the integers and I have no interest in evaluating it anywhere other than points 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 I'm thinking I need to just put this thing in matrix form.. perhaps that will shed some light. Basically, it's a regular vector or matrix where the indices wrap around and hence the need for the mod operator..
Thanks for that trick, it did let me get a lot further indeed. Rather annoying though, even with assume(n::posint) it didn't help. My issue is now that I have another sequence which I will divide the top one by, and have it simply repeated modulo 16 and I verified that the infinite product does indeed converge but limit() is giving me things like.. > Q(infinity); product: "Cannot show that 1/2*(2*q-1)/q*piecewise(q = 0,1,mymod(q,2) = 1,2,mymod(q,4) = 2,4,mymod(q,8) = 4,8,mymod(q,16) = 8,16,32) is continuous on [1,infinity]" product: "Cannot show that piecewise(n = 0,1,mymod(n,2) = 1,2,mymod(n,4) = 2,4,mymod(n,8) = 4,8,mymod(n,16) = 8,16,32) is continuous on [1,infinity]" I have a feeling that what I'm trying to do is a little too heavyweight for hacking around with mod(). What is the simplest modulus/integer-arithmetic package in maple that would handle this in a cleaner way? I need to bust out some ring theory and finite field stuff it seems..
Page 1 of 1