Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have 3 intervals :

$I = \{1, 4, 7, 10, 13, 16, 19, ...\}$ defined by $1 + 3k$, $k \in \mathbb{N}$

$J = \{1, 5, 9, 13, 17, 21, 25, ...\}$ defined by $1 + 4k$, $k \in \mathbb{N}$

$K = \{1, 6, 11, 16, 21, 26, 31, ...\}$ defined by $1 + 5k$, $k \in \mathbb{N}$

And I have to find numbers common for the 3 intervals. So, I made an algorithm to find them, which is working fine. But I wonder if it is possible to find these numbers by mathematical way ?

I tried to draw these intervals as straight line and to find intersection points of these lines, but, of course, it's not working and I don't have any other idea.

share|improve this question
    
Just a short hint: Think about remainders and modular arithmetic. $3$, $4$ and $5$ are pairwise coprime, meaning that no two of them share a prime factor. Observe that $3 \cdot 4 = 12$, and $I \cap J = \{ 1, 13, 25, \ldots \}$. –  m_l Jul 29 '13 at 7:31
    
You can actually find some numbers in the intersection easily and make a guess. Then, go check the Chinese Remainder Theorem at en.wikipedia.org/wiki/Chinese_remainder_theorem –  Andrea Mori Jul 29 '13 at 7:33
1  
The math behind this is the Chinese Remainder Theorem –  Hagen von Eitzen Jul 29 '13 at 7:34
1  
Those aren't intervals. –  Chris Eagle Jul 29 '13 at 7:36
    
Thanks for the Chinese remainder theorem. It helps me a lot. –  Lucas Willems Jul 29 '13 at 7:48

1 Answer 1

All the numbers $1 + 60k$, $k \in \mathbb{N}$

share|improve this answer
    
It's false because 61 is all intervals. –  Lucas Willems Jul 29 '13 at 7:45
    
It should be $1+60k$ ($k\in \mathbb{N}$). And $60 = 3\times 4 \times 5$. –  user37238 Jul 29 '13 at 7:55
    
I am sorry I thought 1+2K was there to –  Eli Elizirov Jul 29 '13 at 8:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.