Finding when list of numbers reach periodicity given known values I'm trying to figure out when numbers reach "periodicity" given known values.  I've included an example below with image:
I have known sizes (100, 75, and 50) that I would like to know how many times I would need to repeat each item for all the sizes to line up or be periodic.  Does anyone know of a formula for this or how I can go about figuring this out?
As you can see to reach periodicity: 
I need to repeat 100 3 times 
I need to repeat 75 4 times 
I need to repeat 50 6 times 


PS:  This is just a simple example the numbers could be decimals like 1.29. and include several more numbers. 
I will also be converting the formula to octave which is like matlab.
 A: The answer is to find the least common multiple of your given numbers. For instance, in the case of $100, 75, 50$, the least common multiple is $300$. Since $300/100 = 3$, you need $3$ lots of $100$. Since $300/75 = 4$, you need $4$ lots of $75$, etc.
This cannot be done in general. For instance, $1$ and $\pi$ have no common multiple. If all of your numbers are rational, however, then they will have a least common multiple. I'm not sure what the most efficient algorithm for finding the LCM is. Try consulting the CS stack exchange or Wikipedia for more information.
A: It is called LCM - Least Common Multiplier.
In your example, $LCM(50,75,100)=300$, hence:


*

*$ 50$ needs to repeat $\frac{300}{ 50}=6$ times

*$ 75$ needs to repeat $\frac{300}{ 75}=4$ times

*$100$ needs to repeat $\frac{300}{100}=3$ times


In order to compute $LCM(50,75,100)$:


*

*$50=2\cdot5\cdot5$

*$75=3\cdot5\cdot5$

*$100=2\cdot2\cdot5\cdot5$


Of each prime factor, we need to take an amount equivalent to the maximum number of times it occurs in any of the given numbers:


*

*$\color\red2$ appears at most $\color\green2$ times

*$\color\red3$ appears at most $\color\green1$ time

*$\color\red5$ appears at most $\color\green2$ times


Hence $LCM(50,75,100)=\color\red2^\color\green2\cdot\color\red3^\color\green1\cdot\color\red5^\color\green2=300$.
