What is the condition that's required to make the sum of periodic waves periodic and what is the period?

Here is a link to the desmos page from which the below screen shots were taken.

https://www.desmos.com/calculator/eilanhax6u
	


Here's an analogy that helps us understand this.

Think of runners going around a track. (We're talking super human runners here.) 

The purple runner ("Speedy") goes around the track 13 times in .2 seconds. The time he completes his nth loop is .2/13*n.
The blue runner ("Jogger") goes around the track 7 times in .2 seconds. The time he completes his nth loop is .2/7*n.
The green runner ("Pokey") goes around the track 3 times in .2 seconds. The time he completes his nth loop is .2/3*n.

time on the clock at the end of loop n for each runner

n  Speedy   Jogger   Pokey 

1  .2/13*1  .2/7*1   .2/3*1
2  .2/13*2  .2/7*2   .2/3*2
3  .2/13*3  .2/7*3   .2/3*3
4  .2/13*4  .2/7*4
5  .2/13*5  .2/7*5
6  .2/13*6  .2/7*6
7  .2/13*7  .2/7*7
8  .2/13*8  
9  .2/13*9
10 .2/13*10
11 .2/13*11
12 .2/13*12
13 .2/13*13

All three runners are together again at the start line after .2 seconds.

If this analogy doesn't work for you, think of Earth, Jupiter and
Saturn. What is the period between conjunctions?

Here's a desmos that shows the three planets.

https://www.desmos.com/calculator/p2ztpsjz6j

Here's a desmos that shows the 20 year period between conjunctions. This
occurs when all three planets are on a common line from the sun to the
planets

https://www.desmos.com/calculator/p2ztpsjz6j

Finally, what does this have to do with music?

The notes A5, C#5, and E5 when added are periodic.

The frequencies of the notes on a piano are here ...

https://en.m.wikipedia.org/wiki/Piano_key_frequencies 

Here's a desmos on this ...

https://www.desmos.com/calculator/sokbrpa1rs