
    
        
        
        
                
        
        
        
                
        
        
        
            
{"version":"https:\/\/jsonfeed.org\/version\/1","title":"mathspp.com feed","home_page_url":"https:\/\/mathspp.com\/blog\/tags\/primes","feed_url":"https:\/\/mathspp.com\/blog\/tags\/primes.json","description":"Stay up-to-date with the articles on mathematics and programming that get published to mathspp.com.","author":{"name":"Rodrigo Gir\u00e3o Serr\u00e3o"},"items":[{"title":"Problem #063 \u2013 arbitrarily many primes in arbitrarily big intervals","date_published":"2023-01-29T00:00:00+01:00","id":"https:\/\/mathspp.com\/blog\/problems\/arbitrarily-many-primes-in-arbitrarily-big-intervals","url":"https:\/\/mathspp.com\/blog\/problems\/arbitrarily-many-primes-in-arbitrarily-big-intervals","content_html":"<p>Can you prove that there are arbitrarily many primes in arbitrarily big intervals?<\/p>\n\n<h2 id=\"problem-statement\">Problem statement<a href=\"#problem-statement\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>The problem statement asks you to prove that for <em>any<\/em> positive integer number <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> you can think of,\nthere will be a certain lower bound <span class=\"mathjax mathjax--inline\">\\(n_0\\)<\/span> (that depends on <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span>) such that for <em>any<\/em> integer <span class=\"mathjax mathjax--inline\">\\(n \\geq n_0\\)<\/span>,\n<em>there is<\/em> an interval of length <span class=\"mathjax mathjax--inline\">\\(n\\)<\/span> that contains <em>exactly<\/em> <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> primes.\n(When we talk about the length of the interval, we are talking about how many integers it contains.)<\/p>\n<p>If the statement confused you a bit, that is ok.\nLet me rephrase it.<\/p>\n<p>You and I will play a game.\nI will think of a positive integer <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span>.\nNow, your job is to come up with another positive integer <span class=\"mathjax mathjax--inline\">\\(n_0\\)<\/span> such that,\nif I pick a number <span class=\"mathjax mathjax--inline\">\\(n\\)<\/span> greater than <span class=\"mathjax mathjax--inline\">\\(n_0\\)<\/span>,\nyou can always find an interval of size <span class=\"mathjax mathjax--inline\">\\(n\\)<\/span> that contains <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> primes.<\/p>\n<p>For example, if I thought of <span class=\"mathjax mathjax--inline\">\\(k = 5\\)<\/span>, you <em>could not<\/em> pick <span class=\"mathjax mathjax--inline\">\\(n_0 = 4\\)<\/span>.\nWhy not?\nBecause if I pick <span class=\"mathjax mathjax--inline\">\\(n = 4\\)<\/span>, there is <em>no<\/em> interval of length <span class=\"mathjax mathjax--inline\">\\(4\\)<\/span> that contains <span class=\"mathjax mathjax--inline\">\\(5\\)<\/span> prime numbers...\nEspecially because an interval of length <span class=\"mathjax mathjax--inline\">\\(4\\)<\/span> contains only <span class=\"mathjax mathjax--inline\">\\(4\\)<\/span> integers!<\/p>\n<p>This problem was posed to me by my mathematician cousin and I confess that worried me a bit.\nFunnily enough, the problem has a surprisingly simple solution.\n(I am not saying you will get there easily.\nI am just saying that once you do, you will realise the solution was not very complicated.)<\/p>\n<div class=\"notices blue\">\n<p>Give it some thought!<\/p>\n<\/div>\n<p><strong>Remember<\/strong>:<\/p>\n<ul><li>there are infinitely many primes; however<\/li>\n<li>they become scarcer and scarcer the further you go down the number line.<\/li>\n<\/ul><h2 id=\"solvers\">Solvers<a href=\"#solvers\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>Congratulations &#127881; to everyone who managed to solve this problem:\nCongratulations to you if you managed to solve this problem correctly!\nIf you did, feel free to<\/p>\n<ul><li>Rodrigo G. S., Portugal &#127477;&#127481;  (&lt;- example);<\/li>\n<\/ul><p>If <em>you<\/em> managed to solve this problem, you can <a href=\"https:\/\/github.com\/mathspp\/mathspp\/edit\/master\/pages\/02.blog\/02.problems\/p063-arbitrarily-many-primes-in-arbitrarily-big-intervals\/item.md\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">add your name to the list<\/a>!\nYou can also <a href=\"mailto:rodrigo@mathspp.com?subject=Solution%20to%20Problem%20#063%20%E2%80%93%20arbitrarily%20many%20primes%20in%20arbitrarily%20big%20intervals\" class=\"mailto\">email me<\/a> your solution and we can discuss it.<\/p>\n<h2 id=\"solution\">Solution<a href=\"#solution\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>A thing I like about this problem is that not only can you prove that interesting statement about the prime numbers, but you can also determine exactly what the lower bound <span class=\"mathjax mathjax--inline\">\\(n_0\\)<\/span> is.<\/p>\n<p>Let us say that <span class=\"mathjax mathjax--inline\">\\(p_k\\)<\/span> is the <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span>-th prime.\nThen, if we set <span class=\"mathjax mathjax--inline\">\\(n_0 = p_k\\)<\/span>, we are good to go.\nLet me show you why.<\/p>\n<p>Suppose that <span class=\"mathjax mathjax--inline\">\\(n\\)<\/span> is any integer <span class=\"mathjax mathjax--inline\">\\(n \\geq n_0\\)<\/span>.\nThen, the interval <span class=\"mathjax mathjax--inline\">\\([1, n]\\)<\/span> contains <span class=\"mathjax mathjax--inline\">\\(p_k\\)<\/span> in it.\nWhy?\nBecause <span class=\"mathjax mathjax--inline\">\\(p_k = n_0\\)<\/span> and <span class=\"mathjax mathjax--inline\">\\(n \\geq n_0\\)<\/span>.<\/p>\n<p>So, the interval <span class=\"mathjax mathjax--inline\">\\([1, n]\\)<\/span> contains <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> <em>or more<\/em> prime numbers.\nIf it contains <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> prime numbers, we just found our interval of length <span class=\"mathjax mathjax--inline\">\\(n\\)<\/span> that contains exactly <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> primes.\nIf it contains more than <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> primes, we must do something about it.<\/p>\n<p>If the interval <span class=\"mathjax mathjax--inline\">\\([1, n]\\)<\/span> contains more than <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> prime numbers, then we start sliding the interval to the right, like so:...<\/p>","summary":"Can you prove that there are arbitrarily many primes in arbitrarily big intervals? In this mathematical problem, which is just a logic challenge, the solution is surprisingly uncomplicated.","date_modified":"2025-07-23T16:49:02+02:00","tags":["logic","mathematics","number theory","primes"],"image":"\/user\/pages\/02.blog\/03.problems\/p063-arbitrarily-many-primes-in-arbitrarily-big-intervals\/thumbnail.webp"},{"title":"Twitter proof: consecutive integers are coprime","date_published":"2020-11-14T00:00:00+01:00","id":"https:\/\/mathspp.com\/blog\/consecutive-integers-are-coprime","url":"https:\/\/mathspp.com\/blog\/consecutive-integers-are-coprime","content_html":"<p>Let's prove that if <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> is an integer, then <span class=\"mathjax mathjax--inline\">\\(\\gcd(k, k+1) = 1\\)<\/span>. That is, any two consecutive integers are coprime.<\/p>\n\n<script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n<p><img alt=\"Two consecutive integers are coprime\" src=\"\/images\/7\/b\/2\/3\/f\/7b23f660509f21b995daee842a08888b995cb794-consecutive-coprime.webp\"><\/p>\n<h2 id=\"twitter-proof\">Twitter proof<a href=\"#twitter-proof\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<blockquote class=\"twitter-tweet\">\n<p lang=\"en\" dir=\"ltr\">Twitter proof:<br>Let k be an integer and let d be the greatest common divisor of k and k+1. We have that (k+1)\/d=k\/d+1\/d and both (k+1)\/d and k\/d are integers, so 1\/d must be an integer and we can only have d=1.<a href=\"https:\/\/t.co\/pItsAnueib\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">https:\/\/t.co\/pItsAnueib<\/a><\/p>\u2014 Mathspp (@mathsppblog) <a href=\"https:\/\/twitter.com\/mathsppblog\/status\/1327660984266338321?ref_src=twsrc%5Etfw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">November 14, 2020<\/a>\n<\/blockquote>\n<p>Do you have an idea for a twitter proof? Let me know in the comments below!<\/p>","summary":"In this twitter proof I show that two consecutive integers have to be coprime.","date_modified":"2025-07-23T16:49:02+02:00","tags":["mathematics","number theory","primes"],"image":"\/user\/pages\/02.blog\/consecutive-integers-are-coprime\/consecutive-coprime.webp"},{"title":"Problem #022 - coprimes in the crowd","date_published":"2020-11-01T00:00:00+01:00","id":"https:\/\/mathspp.com\/blog\/problems\/coprimes-in-the-crowd","url":"https:\/\/mathspp.com\/blog\/problems\/coprimes-in-the-crowd","content_html":"<p>This simple problem is an example of a very interesting phenomenon: if you have a large enough \"universe\" to consider, even randomly picked parts exhibit structured properties.<\/p>\n\n<p><img alt=\"A crowd of people, photo by Rob Curran on Unsplash\" src=\"\/images\/4\/a\/6\/6\/e\/4a66e48b9af65eb2a0b7e9bd9aa34ba62f0bd045-crowd.jpg\"><\/p>\n<h2 id=\"problem-statement\">Problem statement<a href=\"#problem-statement\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>Let <span class=\"mathjax mathjax--inline\">\\(n \\geq 2\\)<\/span> be an integer. Then, consider the integers<\/p>\n<p class=\"mathjax mathjax--block\">\\[\n\\{3, 4, \\cdots, 2n-1, 2n\\}\\ .\\]<\/p>\n<p>Show that, if you pick <span class=\"mathjax mathjax--inline\">\\(n\\)<\/span> from those, you always have two numbers that will share no divisors whatsoever.<\/p>\n<p>In other words, show that there's two of those <span class=\"mathjax mathjax--inline\">\\(n\\)<\/span> numbers that are coprime.<\/p>\n<div class=\"notices blue\">\n<p>Give it some thought...<\/p>\n<\/div>\n<p>If you need any clarification whatsoever, feel free to ask in the comment section below.<\/p>\n<h2 id=\"solution\">Solution<a href=\"#solution\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>The solution is a simple application of the pigeonhole principle.<\/p>\n<div class=\"notices blue\">\n<p>The <em>pigeonhole principle<\/em> says that, if you have <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> pigeons and <span class=\"mathjax mathjax--inline\">\\(n &lt; k\\)<\/span> holes, then if you put all pigeons in the holes there will be at least one hole with more than one pigeon.<\/p>\n<\/div>\n<p>For some <span class=\"mathjax mathjax--inline\">\\(n \\geq 2\\)<\/span>, consider the following <span class=\"mathjax mathjax--inline\">\\(n-1\\)<\/span> pairs of integers:<\/p>\n<p class=\"mathjax mathjax--block\">\\[\n\\{3, 4\\}, \\{5, 6\\}, \\cdots, \\{2n-1, 2n\\}\\]<\/p>\n<p>which together make up for the whole set <span class=\"mathjax mathjax--inline\">\\(\\{3, 4, \\cdots, 2n-1, 2n\\}\\)<\/span>.\nIf we pick <span class=\"mathjax mathjax--inline\">\\(n\\)<\/span> numbers from this set (the pigeons) and if we look for the pairs from where they came (the holes) then we see we <strong>must<\/strong> have picked two consecutive integers from one of the pairs. Those two numbers that came from the same pair are consecutive integers, and hence are coprime!<\/p>\n<p>To see that two consecutive integers are coprime, you can <a href=\"\/blog\/consecutive-integers-are-coprime\">read this twitter proof<\/a>.<\/p>\n<p><a href=\"https:\/\/mathspp.com\/subscribe\">Don't forget to subscribe to the newsletter<\/a> to get bi-weekly\nproblems sent straight to your inbox and to add your reaction below.<\/p>","summary":"A simple problem showing that there is always some order among chaos.","date_modified":"2025-07-23T16:49:02+02:00","tags":["mathematics","number theory","primes"],"image":"\/user\/pages\/02.blog\/03.problems\/p022-coprimes-in-the-crowd\/crowd.jpg"}]}
