
Number Theory Number Theory Math Forum 
 LinkBack  Thread Tools  Display Modes 
September 1st, 2017, 02:12 PM  #1 
Newbie Joined: Sep 2017 From: UK Posts: 3 Thanks: 0  Repetition in an Equation
Hi, Could anyone please tell me why it is that the numbers returned from this equation, repeat (but upon the repeat they are 65535x). Start with x=1 then keep looping this: x=(75*(x+1))INT ((75*(x+1))/65537)*655371 That is: x=MOD(75*(x+1),65537)1 Upon 32768 iterations of this equation the next number will again start the sequence, but it will be of the form 65535x=x(1) What I'm trying to say is that 65535x(32769)=x(1). I hope I am making it clear that 65535 minus the 32769th iteration is the same as the first iteration. I expected that the numbers would repeat after 65536 iterations, but not half way through. Any ideas on why it happens? Thanks for any help guys, matalog. Last edited by skipjack; September 2nd, 2017 at 12:54 AM. 
September 1st, 2017, 03:17 PM  #2 
Math Team Joined: Oct 2011 From: Ottawa Ontario, Canada Posts: 11,865 Thanks: 768  
September 1st, 2017, 10:07 PM  #3 
Newbie Joined: Sep 2017 From: UK Posts: 3 Thanks: 0 
Thanks for replying, but I'm not exactly sure how that WA link you have provided helps to answer my question. Could you explain a bit more please? Thanks, matalog Last edited by skipjack; September 2nd, 2017 at 12:44 AM. 
September 2nd, 2017, 02:14 AM  #4 
Global Moderator Joined: Dec 2006 Posts: 18,721 Thanks: 1536 
Let m denote your constant, 75, and s denote your starting value (of x), 1. Let p denote the minimum number of iterations that results in x becoming 65535  s. It's easy to show that further iterations continue in that manner (so that the sum of the results of the 2nd and (p+1)th iterations is 65535, and so on). I think it would be fairly easy to show that p is a function of m alone, which means that p divides 65536. It's easy to find values of m for which p < 32768. I haven't found a value of m for which p = 65536. 
September 2nd, 2017, 07:13 AM  #5 
Newbie Joined: Sep 2017 From: UK Posts: 3 Thanks: 0 
Yes, a lot of modulos like this behave in a similar way. I would like to know though, why they repeat 65535x in the second half? They seem to do an interesting thing, each iteration of this particular equation, returns an original number between 1 and 65536, between x(1) to x(65536), and half way through that, it uses the very same pattern, albeit 65535x(32769)=x(1). It seems special in some way, can anyone explain it to me in simple terms, why I should not be surprised by what this equation (and others like it) does? Thanks again, for any help, matalog. 

Tags 
equation, modulo, repetition 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Combination with repetition  taylor_1989_2012  Probability and Statistics  5  September 25th, 2016 12:15 PM 
Indexing a permutation with repetition  SabinManiac  Advanced Statistics  0  February 1st, 2012 07:08 AM 
Drawing balls with repetition  butabi  Advanced Statistics  1  November 27th, 2011 08:19 AM 