{"id":611,"date":"2017-01-24T17:40:52","date_gmt":"2017-01-25T01:40:52","guid":{"rendered":"http:\/\/www.cornerspots.com\/sirknightj\/?p=611"},"modified":"2017-06-26T08:15:54","modified_gmt":"2017-06-26T16:15:54","slug":"first-10-million-prime-numbers","status":"publish","type":"post","link":"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/","title":{"rendered":"First 10 Million Prime Numbers"},"content":{"rendered":"<p>I&#8217;ve decided to increase the number from 1,000,000 to 10,000,000.<\/p>\n<p><!--more--><\/p>\n<p>Surprisingly, this took more than 2.5 hours to calculate.<\/p>\n<p>Also, it takes a long time to open the notepad file, for some reason.<\/p>\n<p>Here&#8217;s my code again, in case you wanted to look at it:<\/p>\n<pre><code>\r\nimport math\r\ntext_file = open(\"Output.txt\", \"w\")\r\n\r\nprimes = [2, 3]\r\nprint(\"This file was made for cornerspots.com\\n1. 2\\n2. 3\")\r\ntext_file.write(\"This file was made for cornerspots.com\\n2\\n\")\r\nnumber = 1\r\nrowNumber = 2\r\n\r\nwhile rowNumber < 10000000:\r\n    isPrime = True\r\n    number += 2\r\n\r\n    for prime in primes:\r\n        # if number is bigger than the sqrt of num we're checking\r\n        if prime > math.sqrt(number):\r\n            break\r\n        # is not a prime\r\n        if number % prime == 0:\r\n            isPrime = False\r\n            break\r\n\r\n    if isPrime:\r\n        rowNumber += 1\r\n        text_file.write(str(number) + \"\\n\")\r\n        primes.append(number)\r\n        print(str(rowNumber) + \". \" + str(number))\r\n\r\ntext_file.close()<\/code><\/pre>\n<p>And here&#8217;s the zip file of my findings:<a href=\"http:\/\/www.sirknightj.com\/blog\/wp-content\/uploads\/2017\/01\/First10MillionPrimeNumbers.zip\">First10MillionPrimeNumbers<\/a><br \/>\nOh, and in case you&#8217;re wondering, the 10,000,000th prime number is 179,424,671.<br \/>\nIf notepad doesn&#8217;t open and instead says not responding, just wait, and it will open eventually. In case notepad doesn&#8217;t work for some reason, try notepad++<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve decided to increase the number from 1,000,000 to 10,000,000.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[7],"tags":[],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"I&#039;ve decided to increase the number from 1,000,000 to 10,000,000. Surprisingly, this took more than 2.5 hours to calculate. Also, it takes a long time to open the notepad file, for some reason. Here&#039;s my code again, in case you wanted to look at it: import math text_file = open(&quot;Output.txt&quot;, &quot;w&quot;) primes = [2, 3]\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Jeremy\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Sirknightj - Just another amazing website\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"First 10 Million Prime Numbers - Sirknightj\" \/>\n\t\t<meta property=\"og:description\" content=\"I&#039;ve decided to increase the number from 1,000,000 to 10,000,000. Surprisingly, this took more than 2.5 hours to calculate. Also, it takes a long time to open the notepad file, for some reason. Here&#039;s my code again, in case you wanted to look at it: import math text_file = open(&quot;Output.txt&quot;, &quot;w&quot;) primes = [2, 3]\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2017-01-25T01:40:52+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2017-06-26T16:15:54+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"First 10 Million Prime Numbers - Sirknightj\" \/>\n\t\t<meta name=\"twitter:description\" content=\"I&#039;ve decided to increase the number from 1,000,000 to 10,000,000. Surprisingly, this took more than 2.5 hours to calculate. Also, it takes a long time to open the notepad file, for some reason. Here&#039;s my code again, in case you wanted to look at it: import math text_file = open(&quot;Output.txt&quot;, &quot;w&quot;) primes = [2, 3]\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/2017\\\/01\\\/24\\\/first-10-million-prime-numbers\\\/#blogposting\",\"name\":\"First 10 Million Prime Numbers - Sirknightj\",\"headline\":\"First 10 Million Prime Numbers\",\"author\":{\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/author\\\/jeremy\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/#organization\"},\"datePublished\":\"2017-01-24T17:40:52-08:00\",\"dateModified\":\"2017-06-26T08:15:54-08:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/2017\\\/01\\\/24\\\/first-10-million-prime-numbers\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/2017\\\/01\\\/24\\\/first-10-million-prime-numbers\\\/#webpage\"},\"articleSection\":\"sirknightj\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/2017\\\/01\\\/24\\\/first-10-million-prime-numbers\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/category\\\/sirknightj\\\/#listItem\",\"name\":\"sirknightj\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/category\\\/sirknightj\\\/#listItem\",\"position\":2,\"name\":\"sirknightj\",\"item\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/category\\\/sirknightj\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/2017\\\/01\\\/24\\\/first-10-million-prime-numbers\\\/#listItem\",\"name\":\"First 10 Million Prime Numbers\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/2017\\\/01\\\/24\\\/first-10-million-prime-numbers\\\/#listItem\",\"position\":3,\"name\":\"First 10 Million Prime Numbers\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/category\\\/sirknightj\\\/#listItem\",\"name\":\"sirknightj\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/#organization\",\"name\":\"Sirknightj\",\"description\":\"Just another amazing website\",\"url\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/author\\\/jeremy\\\/#author\",\"url\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/author\\\/jeremy\\\/\",\"name\":\"Jeremy\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/2017\\\/01\\\/24\\\/first-10-million-prime-numbers\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8022021fe4f7c726f9f0db6687cecbff?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Jeremy\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/2017\\\/01\\\/24\\\/first-10-million-prime-numbers\\\/#webpage\",\"url\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/2017\\\/01\\\/24\\\/first-10-million-prime-numbers\\\/\",\"name\":\"First 10 Million Prime Numbers - Sirknightj\",\"description\":\"I've decided to increase the number from 1,000,000 to 10,000,000. Surprisingly, this took more than 2.5 hours to calculate. Also, it takes a long time to open the notepad file, for some reason. Here's my code again, in case you wanted to look at it: import math text_file = open(\\\"Output.txt\\\", \\\"w\\\") primes = [2, 3]\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/2017\\\/01\\\/24\\\/first-10-million-prime-numbers\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/author\\\/jeremy\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/author\\\/jeremy\\\/#author\"},\"datePublished\":\"2017-01-24T17:40:52-08:00\",\"dateModified\":\"2017-06-26T08:15:54-08:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/\",\"name\":\"Sirknightj\",\"description\":\"Just another amazing website\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sirknightj.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"First 10 Million Prime Numbers - Sirknightj","description":"I've decided to increase the number from 1,000,000 to 10,000,000. Surprisingly, this took more than 2.5 hours to calculate. Also, it takes a long time to open the notepad file, for some reason. Here's my code again, in case you wanted to look at it: import math text_file = open(\"Output.txt\", \"w\") primes = [2, 3]","canonical_url":"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/#blogposting","name":"First 10 Million Prime Numbers - Sirknightj","headline":"First 10 Million Prime Numbers","author":{"@id":"https:\/\/www.sirknightj.com\/blog\/author\/jeremy\/#author"},"publisher":{"@id":"https:\/\/www.sirknightj.com\/blog\/#organization"},"datePublished":"2017-01-24T17:40:52-08:00","dateModified":"2017-06-26T08:15:54-08:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/#webpage"},"isPartOf":{"@id":"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/#webpage"},"articleSection":"sirknightj"},{"@type":"BreadcrumbList","@id":"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.sirknightj.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.sirknightj.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.sirknightj.com\/blog\/category\/sirknightj\/#listItem","name":"sirknightj"}},{"@type":"ListItem","@id":"https:\/\/www.sirknightj.com\/blog\/category\/sirknightj\/#listItem","position":2,"name":"sirknightj","item":"https:\/\/www.sirknightj.com\/blog\/category\/sirknightj\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/#listItem","name":"First 10 Million Prime Numbers"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.sirknightj.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/#listItem","position":3,"name":"First 10 Million Prime Numbers","previousItem":{"@type":"ListItem","@id":"https:\/\/www.sirknightj.com\/blog\/category\/sirknightj\/#listItem","name":"sirknightj"}}]},{"@type":"Organization","@id":"https:\/\/www.sirknightj.com\/blog\/#organization","name":"Sirknightj","description":"Just another amazing website","url":"https:\/\/www.sirknightj.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.sirknightj.com\/blog\/author\/jeremy\/#author","url":"https:\/\/www.sirknightj.com\/blog\/author\/jeremy\/","name":"Jeremy","image":{"@type":"ImageObject","@id":"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/8022021fe4f7c726f9f0db6687cecbff?s=96&d=mm&r=g","width":96,"height":96,"caption":"Jeremy"}},{"@type":"WebPage","@id":"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/#webpage","url":"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/","name":"First 10 Million Prime Numbers - Sirknightj","description":"I've decided to increase the number from 1,000,000 to 10,000,000. Surprisingly, this took more than 2.5 hours to calculate. Also, it takes a long time to open the notepad file, for some reason. Here's my code again, in case you wanted to look at it: import math text_file = open(\"Output.txt\", \"w\") primes = [2, 3]","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.sirknightj.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/#breadcrumblist"},"author":{"@id":"https:\/\/www.sirknightj.com\/blog\/author\/jeremy\/#author"},"creator":{"@id":"https:\/\/www.sirknightj.com\/blog\/author\/jeremy\/#author"},"datePublished":"2017-01-24T17:40:52-08:00","dateModified":"2017-06-26T08:15:54-08:00"},{"@type":"WebSite","@id":"https:\/\/www.sirknightj.com\/blog\/#website","url":"https:\/\/www.sirknightj.com\/blog\/","name":"Sirknightj","description":"Just another amazing website","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.sirknightj.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Sirknightj - Just another amazing website","og:type":"article","og:title":"First 10 Million Prime Numbers - Sirknightj","og:description":"I've decided to increase the number from 1,000,000 to 10,000,000. Surprisingly, this took more than 2.5 hours to calculate. Also, it takes a long time to open the notepad file, for some reason. Here's my code again, in case you wanted to look at it: import math text_file = open(&quot;Output.txt&quot;, &quot;w&quot;) primes = [2, 3]","og:url":"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/","article:published_time":"2017-01-25T01:40:52+00:00","article:modified_time":"2017-06-26T16:15:54+00:00","twitter:card":"summary_large_image","twitter:title":"First 10 Million Prime Numbers - Sirknightj","twitter:description":"I've decided to increase the number from 1,000,000 to 10,000,000. Surprisingly, this took more than 2.5 hours to calculate. Also, it takes a long time to open the notepad file, for some reason. Here's my code again, in case you wanted to look at it: import math text_file = open(&quot;Output.txt&quot;, &quot;w&quot;) primes = [2, 3]"},"aioseo_meta_data":{"post_id":"611","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-04-10 08:49:49","updated":"2023-04-10 08:49:49","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.sirknightj.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.sirknightj.com\/blog\/category\/sirknightj\/\" title=\"sirknightj\">sirknightj<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tFirst 10 Million Prime Numbers\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.sirknightj.com\/blog"},{"label":"sirknightj","link":"https:\/\/www.sirknightj.com\/blog\/category\/sirknightj\/"},{"label":"First 10 Million Prime Numbers","link":"https:\/\/www.sirknightj.com\/blog\/2017\/01\/24\/first-10-million-prime-numbers\/"}],"_links":{"self":[{"href":"https:\/\/www.sirknightj.com\/blog\/wp-json\/wp\/v2\/posts\/611"}],"collection":[{"href":"https:\/\/www.sirknightj.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sirknightj.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sirknightj.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sirknightj.com\/blog\/wp-json\/wp\/v2\/comments?post=611"}],"version-history":[{"count":5,"href":"https:\/\/www.sirknightj.com\/blog\/wp-json\/wp\/v2\/posts\/611\/revisions"}],"predecessor-version":[{"id":718,"href":"https:\/\/www.sirknightj.com\/blog\/wp-json\/wp\/v2\/posts\/611\/revisions\/718"}],"wp:attachment":[{"href":"https:\/\/www.sirknightj.com\/blog\/wp-json\/wp\/v2\/media?parent=611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sirknightj.com\/blog\/wp-json\/wp\/v2\/categories?post=611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sirknightj.com\/blog\/wp-json\/wp\/v2\/tags?post=611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}