CINXE.COM
Formula for primes - Wikipedia
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Formula for primes - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy", "wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"a1de6c74-24f4-4000-85ec-dd10c8e52435","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Formula_for_primes","wgTitle":"Formula for primes","wgCurRevisionId":1251704784,"wgRevisionId":1251704784,"wgArticleId":509009,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with short description","Short description is different from Wikidata","Articles containing potentially dated statements from 2020","All articles containing potentially dated statements","Prime numbers"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Formula_for_primes","wgRelevantArticleId":509009,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[], "wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":20000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q1136501","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false, "wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.math.styles":"ready","ext.cite.styles":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.scribunto.logs","site","mediawiki.page.ready","jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","ext.popups", "ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.quicksurveys.init","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.cite.styles%7Cext.math.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Formula for primes - Wikipedia"> <meta property="og:type" content="website"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Formula_for_primes"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Formula_for_primes&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Formula_for_primes"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Formula_for_primes rootpage-Formula_for_primes skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&returnto=Formula+for+primes" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&returnto=Formula+for+primes" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=Formula+for+primes" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=Formula+for+primes" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-Formulas_based_on_Wilson's_theorem" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Formulas_based_on_Wilson's_theorem"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Formulas based on Wilson's theorem</span> </div> </a> <ul id="toc-Formulas_based_on_Wilson's_theorem-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Formula_based_on_a_system_of_Diophantine_equations" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Formula_based_on_a_system_of_Diophantine_equations"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Formula based on a system of Diophantine equations</span> </div> </a> <ul id="toc-Formula_based_on_a_system_of_Diophantine_equations-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Mills'_formula" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Mills'_formula"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Mills' formula</span> </div> </a> <ul id="toc-Mills'_formula-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Wright's_formula" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Wright's_formula"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Wright's formula</span> </div> </a> <ul id="toc-Wright's_formula-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-A_function_that_represents_all_primes" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#A_function_that_represents_all_primes"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>A function that represents all primes</span> </div> </a> <ul id="toc-A_function_that_represents_all_primes-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Plouffe's_formulas" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Plouffe's_formulas"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Plouffe's formulas</span> </div> </a> <ul id="toc-Plouffe's_formulas-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Prime_formulas_and_polynomial_functions" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Prime_formulas_and_polynomial_functions"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>Prime formulas and polynomial functions</span> </div> </a> <ul id="toc-Prime_formulas_and_polynomial_functions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Possible_formula_using_a_recurrence_relation" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Possible_formula_using_a_recurrence_relation"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>Possible formula using a recurrence relation</span> </div> </a> <ul id="toc-Possible_formula_using_a_recurrence_relation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">10</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Further_reading" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Further_reading"> <div class="vector-toc-text"> <span class="vector-toc-numb">11</span> <span>Further reading</span> </div> </a> <ul id="toc-Further_reading-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-External_links" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#External_links"> <div class="vector-toc-text"> <span class="vector-toc-numb">12</span> <span>External links</span> </div> </a> <ul id="toc-External_links-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Formula for primes</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in 8 languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-8" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">8 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%B5%D9%8A%D8%BA%D8%A9_%D9%84%D9%84%D8%A3%D8%B9%D8%AF%D8%A7%D8%AF_%D8%A7%D9%84%D8%A3%D9%88%D9%84%D9%8A%D8%A9" title="صيغة للأعداد الأولية – Arabic" lang="ar" hreflang="ar" data-title="صيغة للأعداد الأولية" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Primzahlgenerator" title="Primzahlgenerator – German" lang="de" hreflang="de" data-title="Primzahlgenerator" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/F%C3%B3rmula_de_los_n%C3%BAmeros_primos" title="Fórmula de los números primos – Spanish" lang="es" hreflang="es" data-title="Fórmula de los números primos" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Formules_pour_les_nombres_premiers" title="Formules pour les nombres premiers – French" lang="fr" hreflang="fr" data-title="Formules pour les nombres premiers" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Formula_per_i_numeri_primi" title="Formula per i numeri primi – Italian" lang="it" hreflang="it" data-title="Formula per i numeri primi" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/Formula_for_primes" title="Formula for primes – Simple English" lang="en-simple" hreflang="en-simple" data-title="Formula for primes" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Formler_f%C3%B6r_primtal" title="Formler för primtal – Swedish" lang="sv" hreflang="sv" data-title="Formler för primtal" data-language-autonym="Svenska" data-language-local-name="Swedish" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E7%B4%A0%E6%95%B0%E5%85%AC%E5%BC%8F" title="素数公式 – Chinese" lang="zh" hreflang="zh" data-title="素数公式" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q1136501#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Formula_for_primes" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:Formula_for_primes" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Formula_for_primes"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Formula_for_primes&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Formula_for_primes&action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Formula_for_primes"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Formula_for_primes&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Formula_for_primes&action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Formula_for_primes" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Formula_for_primes" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Formula_for_primes&oldid=1251704784" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Formula_for_primes&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&page=Formula_for_primes&id=1251704784&wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FFormula_for_primes"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FFormula_for_primes"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=Formula_for_primes&action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Formula_for_primes&printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q1136501" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">Formula whose values are the prime numbers</div> <p>In <a href="/wiki/Number_theory" title="Number theory">number theory</a>, a <b>formula for primes</b> is a <a href="/wiki/Formula#In_mathematics" title="Formula">formula</a> generating the <a href="/wiki/Prime_number" title="Prime number">prime numbers</a>, exactly and without exception. Formulas for calculating primes do exist; however, they are computationally very slow. A number of constraints are known, showing what such a "formula" can and cannot be. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Formulas_based_on_Wilson's_theorem"><span id="Formulas_based_on_Wilson.27s_theorem"></span>Formulas based on Wilson's theorem</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Formula_for_primes&action=edit&section=1" title="Edit section: Formulas based on Wilson's theorem"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A simple formula is </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f(n)=\left\lfloor {\frac {n!{\bmod {(}}n+1)}{n}}\right\rfloor (n-1)+2}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>f</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow> <mo>⌊</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>!</mo> <mrow class="MJX-TeXAtom-ORD"> <mo lspace="thickmathspace" rspace="thickmathspace">mod</mo> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> </mrow> </mrow> <mi>n</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>⌋</mo> </mrow> <mo stretchy="false">(</mo> <mi>n</mi> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>+</mo> <mn>2</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f(n)=\left\lfloor {\frac {n!{\bmod {(}}n+1)}{n}}\right\rfloor (n-1)+2}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/dd29d87778ae21fbcbcb26c8ecc771650bb0f5b0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:37.654ex; height:6.343ex;" alt="{\displaystyle f(n)=\left\lfloor {\frac {n!{\bmod {(}}n+1)}{n}}\right\rfloor (n-1)+2}"></span></dd></dl> <p>for positive <a href="/wiki/Integer" title="Integer">integer</a> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a601995d55609f2d9f5e233e36fbe9ea26011b3b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.395ex; height:1.676ex;" alt="{\displaystyle n}"></span>, where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor \ \rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">⌊<!-- ⌊ --></mo> <mtext> </mtext> <mo fence="false" stretchy="false">⌋<!-- ⌋ --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lfloor \ \rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a5c5f3c09db405aa8eeb516b1281a0af12c5633b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.645ex; height:2.843ex;" alt="{\displaystyle \lfloor \ \rfloor }"></span> is the <a href="/wiki/Floor_function" class="mw-redirect" title="Floor function">floor function</a>, which rounds down to the nearest integer. By <a href="/wiki/Wilson%27s_theorem" title="Wilson's theorem">Wilson's theorem</a>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n+1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n+1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2a135e65a42f2d73cccbfc4569523996ca0036f1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:5.398ex; height:2.343ex;" alt="{\displaystyle n+1}"></span> is prime if and only if <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n!\equiv n{\pmod {n+1}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>!</mo> <mo>≡<!-- ≡ --></mo> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mspace width="1em" /> <mo stretchy="false">(</mo> <mi>mod</mi> <mspace width="0.333em" /> <mi>n</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n!\equiv n{\pmod {n+1}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/340204cd2fff661525ad5934425cb9d0585316d7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:21.616ex; height:2.843ex;" alt="{\displaystyle n!\equiv n{\pmod {n+1}}}"></span>. Thus, when <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n+1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n+1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2a135e65a42f2d73cccbfc4569523996ca0036f1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:5.398ex; height:2.343ex;" alt="{\displaystyle n+1}"></span> is prime, the first factor in the product becomes one, and the formula produces the prime number <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n+1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n+1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2a135e65a42f2d73cccbfc4569523996ca0036f1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:5.398ex; height:2.343ex;" alt="{\displaystyle n+1}"></span>. But when <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n+1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n+1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2a135e65a42f2d73cccbfc4569523996ca0036f1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:5.398ex; height:2.343ex;" alt="{\displaystyle n+1}"></span> is not prime, the first factor becomes zero and the formula produces the prime number 2.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> This formula is not an efficient way to generate prime numbers because evaluating <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n!{\bmod {(}}n+1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>!</mo> <mrow class="MJX-TeXAtom-ORD"> <mo lspace="thickmathspace" rspace="thickmathspace">mod</mo> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> </mrow> </mrow> <mi>n</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n!{\bmod {(}}n+1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6746255dd8f85f55df5891b0e61bc9e9a389a832" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:14.93ex; height:2.843ex;" alt="{\displaystyle n!{\bmod {(}}n+1)}"></span> requires about <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n-1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>−<!-- − --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n-1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fbd0b0f32b28f51962943ee9ede4fb34198a2521" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:5.398ex; height:2.343ex;" alt="{\displaystyle n-1}"></span> multiplications and reductions modulo <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n+1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n+1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2a135e65a42f2d73cccbfc4569523996ca0036f1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:5.398ex; height:2.343ex;" alt="{\displaystyle n+1}"></span>. </p><p>In 1964, Willans gave the formula </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{n}=1+\sum _{i=1}^{2^{n}}\left\lfloor \left({\frac {n}{\sum _{j=1}^{i}\left\lfloor \left(\cos {\frac {(j-1)!+1}{j}}\pi \right)^{2}\right\rfloor }}\right)^{1/n}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo>+</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mrow> </munderover> <mrow> <mo>⌊</mo> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>n</mi> <mrow> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </munderover> <mrow> <mo>⌊</mo> <msup> <mrow> <mo>(</mo> <mrow> <mi>cos</mi> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>j</mi> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>!</mo> <mo>+</mo> <mn>1</mn> </mrow> <mi>j</mi> </mfrac> </mrow> <mi>π<!-- π --></mi> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>⌋</mo> </mrow> </mrow> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mi>n</mi> </mrow> </msup> <mo>⌋</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{n}=1+\sum _{i=1}^{2^{n}}\left\lfloor \left({\frac {n}{\sum _{j=1}^{i}\left\lfloor \left(\cos {\frac {(j-1)!+1}{j}}\pi \right)^{2}\right\rfloor }}\right)^{1/n}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/350aec20a0065e791db5edf02d3731001cc43aac" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -6.505ex; margin-left: -0.089ex; width:48.86ex; height:14.176ex;" alt="{\displaystyle p_{n}=1+\sum _{i=1}^{2^{n}}\left\lfloor \left({\frac {n}{\sum _{j=1}^{i}\left\lfloor \left(\cos {\frac {(j-1)!+1}{j}}\pi \right)^{2}\right\rfloor }}\right)^{1/n}\right\rfloor }"></span></dd></dl> <p>for the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a601995d55609f2d9f5e233e36fbe9ea26011b3b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.395ex; height:1.676ex;" alt="{\displaystyle n}"></span>th prime number <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6f79dcba35ecde0d43fbb7c914165586166ce8c2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:2.477ex; height:2.009ex;" alt="{\displaystyle p_{n}}"></span>.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> This formula reduces to<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{n}=1+\sum _{i=1}^{2^{n}}[\pi (i)<n]}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo>+</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mrow> </munderover> <mo stretchy="false">[</mo> <mi>π<!-- π --></mi> <mo stretchy="false">(</mo> <mi>i</mi> <mo stretchy="false">)</mo> <mo><</mo> <mi>n</mi> <mo stretchy="false">]</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{n}=1+\sum _{i=1}^{2^{n}}[\pi (i)<n]}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2f088c57fed2d59382f5604c02828d5604903517" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; margin-left: -0.089ex; width:22.664ex; height:7.343ex;" alt="{\displaystyle p_{n}=1+\sum _{i=1}^{2^{n}}[\pi (i)<n]}"></span>; that is, it tautologically defines <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6f79dcba35ecde0d43fbb7c914165586166ce8c2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:2.477ex; height:2.009ex;" alt="{\displaystyle p_{n}}"></span> as the smallest integer <i>m</i> for which the <a href="/wiki/Prime-counting_function" title="Prime-counting function">prime-counting function</a> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \pi (m)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>π<!-- π --></mi> <mo stretchy="false">(</mo> <mi>m</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \pi (m)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b49573f7f384fd489f9a1c68db27d4ca4d0b21c0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.182ex; height:2.843ex;" alt="{\displaystyle \pi (m)}"></span> is at least <i>n</i>. This formula is also not efficient. In addition to the appearance of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (j-1)!}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>j</mi> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>!</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (j-1)!}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3b3f212ced92eee933f91378ddaccb195053287b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.417ex; height:2.843ex;" alt="{\displaystyle (j-1)!}"></span>, it computes <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6f79dcba35ecde0d43fbb7c914165586166ce8c2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:2.477ex; height:2.009ex;" alt="{\displaystyle p_{n}}"></span> by adding up <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6f79dcba35ecde0d43fbb7c914165586166ce8c2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:2.477ex; height:2.009ex;" alt="{\displaystyle p_{n}}"></span> copies of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/92d98b82a3778f043108d4e20960a9193df57cbf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 1}"></span>; for example, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{5}=1+1+1+1+1+1+1+1+1+1+1+0+0+\dots +0=11}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>5</mn> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo>+</mo> <mn>1</mn> <mo>+</mo> <mn>1</mn> <mo>+</mo> <mn>1</mn> <mo>+</mo> <mn>1</mn> <mo>+</mo> <mn>1</mn> <mo>+</mo> <mn>1</mn> <mo>+</mo> <mn>1</mn> <mo>+</mo> <mn>1</mn> <mo>+</mo> <mn>1</mn> <mo>+</mo> <mn>1</mn> <mo>+</mo> <mn>0</mn> <mo>+</mo> <mn>0</mn> <mo>+</mo> <mo>⋯<!-- ⋯ --></mo> <mo>+</mo> <mn>0</mn> <mo>=</mo> <mn>11</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{5}=1+1+1+1+1+1+1+1+1+1+1+0+0+\dots +0=11}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/25c55aff1762009cd170bc344a08c747a81586a1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:69.598ex; height:2.509ex;" alt="{\displaystyle p_{5}=1+1+1+1+1+1+1+1+1+1+1+0+0+\dots +0=11}"></span>. </p><p>The articles <i>What is an Answer?</i> by <a href="/wiki/Herbert_Wilf" title="Herbert Wilf">Herbert Wilf</a> (1982)<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> and <i>Formulas for Primes</i> by <a href="/wiki/Underwood_Dudley" title="Underwood Dudley">Underwood Dudley</a> (1983)<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> have further discussion about the worthlessness of such formulas. </p> <div class="mw-heading mw-heading2"><h2 id="Formula_based_on_a_system_of_Diophantine_equations">Formula based on a system of Diophantine equations</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Formula_for_primes&action=edit&section=2" title="Edit section: Formula based on a system of Diophantine equations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Because the set of primes is a <a href="/wiki/Computably_enumerable_set" title="Computably enumerable set">computably enumerable set</a>, by <a href="/wiki/Matiyasevich%27s_theorem" class="mw-redirect" title="Matiyasevich's theorem">Matiyasevich's theorem</a>, it can be obtained from a system of <a href="/wiki/Diophantine_equation" title="Diophantine equation">Diophantine equations</a>. <a href="#CITEREFJonesSatoWadaWiens1976">Jones et al. (1976)</a> found an explicit set of 14 Diophantine equations in 26 variables, such that a given number <i>k</i> + 2 is prime <a href="/wiki/If_and_only_if" title="If and only if">if and only if</a> that system has a solution in nonnegative integers:<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha _{0}=wz+h+j-q=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>=</mo> <mi>w</mi> <mi>z</mi> <mo>+</mo> <mi>h</mi> <mo>+</mo> <mi>j</mi> <mo>−<!-- − --></mo> <mi>q</mi> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha _{0}=wz+h+j-q=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/620acf79741a9460c1bf1aa8b3b6d06d6fcee4c0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:24.541ex; height:2.509ex;" alt="{\displaystyle \alpha _{0}=wz+h+j-q=0}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha _{1}=(gk+2g+k+1)(h+j)+h-z=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>=</mo> <mo stretchy="false">(</mo> <mi>g</mi> <mi>k</mi> <mo>+</mo> <mn>2</mn> <mi>g</mi> <mo>+</mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>h</mi> <mo>+</mo> <mi>j</mi> <mo stretchy="false">)</mo> <mo>+</mo> <mi>h</mi> <mo>−<!-- − --></mo> <mi>z</mi> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha _{1}=(gk+2g+k+1)(h+j)+h-z=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6650e95d3729ed734e822369cb169840bed4b3b3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:42.266ex; height:2.843ex;" alt="{\displaystyle \alpha _{1}=(gk+2g+k+1)(h+j)+h-z=0}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha _{2}=16(k+1)^{3}(k+2)(n+1)^{2}+1-f^{2}=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>=</mo> <mn>16</mn> <mo stretchy="false">(</mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msup> <mo stretchy="false">(</mo> <mi>k</mi> <mo>+</mo> <mn>2</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>n</mi> <mo>+</mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>+</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha _{2}=16(k+1)^{3}(k+2)(n+1)^{2}+1-f^{2}=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5cd22e73f59a604cab93861237c27beaf95b756a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:44.806ex; height:3.176ex;" alt="{\displaystyle \alpha _{2}=16(k+1)^{3}(k+2)(n+1)^{2}+1-f^{2}=0}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha _{3}=2n+p+q+z-e=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msub> <mo>=</mo> <mn>2</mn> <mi>n</mi> <mo>+</mo> <mi>p</mi> <mo>+</mo> <mi>q</mi> <mo>+</mo> <mi>z</mi> <mo>−<!-- − --></mo> <mi>e</mi> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha _{3}=2n+p+q+z-e=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/74cc0b5267107f281ea4b7887de73206a8b661ec" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:28.231ex; height:2.509ex;" alt="{\displaystyle \alpha _{3}=2n+p+q+z-e=0}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha _{4}=e^{3}(e+2)(a+1)^{2}+1-o^{2}=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>4</mn> </mrow> </msub> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msup> <mo stretchy="false">(</mo> <mi>e</mi> <mo>+</mo> <mn>2</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>a</mi> <mo>+</mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>+</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>o</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha _{4}=e^{3}(e+2)(a+1)^{2}+1-o^{2}=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/adfea0a03219eab6dcb670de3c57d49b2c85cd2d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:36.056ex; height:3.176ex;" alt="{\displaystyle \alpha _{4}=e^{3}(e+2)(a+1)^{2}+1-o^{2}=0}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha _{5}=(a^{2}-1)y^{2}+1-x^{2}=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>5</mn> </mrow> </msub> <mo>=</mo> <mo stretchy="false">(</mo> <msup> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <msup> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>+</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha _{5}=(a^{2}-1)y^{2}+1-x^{2}=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4d2a10a1942c443f10c32938826946d5ed0518ee" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:29.439ex; height:3.176ex;" alt="{\displaystyle \alpha _{5}=(a^{2}-1)y^{2}+1-x^{2}=0}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha _{6}=16r^{2}y^{4}(a^{2}-1)+1-u^{2}=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>6</mn> </mrow> </msub> <mo>=</mo> <mn>16</mn> <msup> <mi>r</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>4</mn> </mrow> </msup> <mo stretchy="false">(</mo> <msup> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>+</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>u</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha _{6}=16r^{2}y^{4}(a^{2}-1)+1-u^{2}=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ed180a8ac2eb9bf244d40ee259d14c1ebc28562e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:33.867ex; height:3.176ex;" alt="{\displaystyle \alpha _{6}=16r^{2}y^{4}(a^{2}-1)+1-u^{2}=0}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha _{7}=n+\ell +v-y=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>7</mn> </mrow> </msub> <mo>=</mo> <mi>n</mi> <mo>+</mo> <mi>ℓ<!-- ℓ --></mi> <mo>+</mo> <mi>v</mi> <mo>−<!-- − --></mo> <mi>y</mi> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha _{7}=n+\ell +v-y=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2ec3090f78cb4d9c2cdef3819348b7e02a5672ec" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:23.07ex; height:2.509ex;" alt="{\displaystyle \alpha _{7}=n+\ell +v-y=0}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha _{8}=(a^{2}-1)\ell ^{2}+1-m^{2}=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>8</mn> </mrow> </msub> <mo>=</mo> <mo stretchy="false">(</mo> <msup> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <msup> <mi>ℓ<!-- ℓ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>+</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>m</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha _{8}=(a^{2}-1)\ell ^{2}+1-m^{2}=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5907f55e8ed2068a9b0a3bc131e3208056834c56" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:29.959ex; height:3.176ex;" alt="{\displaystyle \alpha _{8}=(a^{2}-1)\ell ^{2}+1-m^{2}=0}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha _{9}=ai+k+1-\ell -i=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>9</mn> </mrow> </msub> <mo>=</mo> <mi>a</mi> <mi>i</mi> <mo>+</mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mi>ℓ<!-- ℓ --></mi> <mo>−<!-- − --></mo> <mi>i</mi> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha _{9}=ai+k+1-\ell -i=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/69a1dd3b7d6396a0791bd62d745b30f249c91d76" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:27.441ex; height:2.509ex;" alt="{\displaystyle \alpha _{9}=ai+k+1-\ell -i=0}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha _{10}=((a+u^{2}(u^{2}-a))^{2}-1)(n+4dy)^{2}+1-(x+cu)^{2}=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>10</mn> </mrow> </msub> <mo>=</mo> <mo stretchy="false">(</mo> <mo stretchy="false">(</mo> <mi>a</mi> <mo>+</mo> <msup> <mi>u</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo stretchy="false">(</mo> <msup> <mi>u</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mi>a</mi> <mo stretchy="false">)</mo> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>n</mi> <mo>+</mo> <mn>4</mn> <mi>d</mi> <mi>y</mi> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>+</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo>+</mo> <mi>c</mi> <mi>u</mi> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha _{10}=((a+u^{2}(u^{2}-a))^{2}-1)(n+4dy)^{2}+1-(x+cu)^{2}=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b7ff63f6da80086611daf367697a7c35244439bf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:60.962ex; height:3.176ex;" alt="{\displaystyle \alpha _{10}=((a+u^{2}(u^{2}-a))^{2}-1)(n+4dy)^{2}+1-(x+cu)^{2}=0}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha _{11}=p+\ell (a-n-1)+b(2an+2a-n^{2}-2n-2)-m=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>11</mn> </mrow> </msub> <mo>=</mo> <mi>p</mi> <mo>+</mo> <mi>ℓ<!-- ℓ --></mi> <mo stretchy="false">(</mo> <mi>a</mi> <mo>−<!-- − --></mo> <mi>n</mi> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>+</mo> <mi>b</mi> <mo stretchy="false">(</mo> <mn>2</mn> <mi>a</mi> <mi>n</mi> <mo>+</mo> <mn>2</mn> <mi>a</mi> <mo>−<!-- − --></mo> <msup> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>2</mn> <mi>n</mi> <mo>−<!-- − --></mo> <mn>2</mn> <mo stretchy="false">)</mo> <mo>−<!-- − --></mo> <mi>m</mi> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha _{11}=p+\ell (a-n-1)+b(2an+2a-n^{2}-2n-2)-m=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/400afcbc5b622478ee0b9283cfd665d2eb3678d3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:61.217ex; height:3.176ex;" alt="{\displaystyle \alpha _{11}=p+\ell (a-n-1)+b(2an+2a-n^{2}-2n-2)-m=0}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha _{12}=q+y(a-p-1)+s(2ap+2a-p^{2}-2p-2)-x=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>12</mn> </mrow> </msub> <mo>=</mo> <mi>q</mi> <mo>+</mo> <mi>y</mi> <mo stretchy="false">(</mo> <mi>a</mi> <mo>−<!-- − --></mo> <mi>p</mi> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>+</mo> <mi>s</mi> <mo stretchy="false">(</mo> <mn>2</mn> <mi>a</mi> <mi>p</mi> <mo>+</mo> <mn>2</mn> <mi>a</mi> <mo>−<!-- − --></mo> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>2</mn> <mi>p</mi> <mo>−<!-- − --></mo> <mn>2</mn> <mo stretchy="false">)</mo> <mo>−<!-- − --></mo> <mi>x</mi> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha _{12}=q+y(a-p-1)+s(2ap+2a-p^{2}-2p-2)-x=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/afa39fdb2a52b2f597ac88bd8d09eb5030b666b3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:59.784ex; height:3.176ex;" alt="{\displaystyle \alpha _{12}=q+y(a-p-1)+s(2ap+2a-p^{2}-2p-2)-x=0}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha _{13}=z+p\ell (a-p)+t(2ap-p^{2}-1)-pm=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>13</mn> </mrow> </msub> <mo>=</mo> <mi>z</mi> <mo>+</mo> <mi>p</mi> <mi>ℓ<!-- ℓ --></mi> <mo stretchy="false">(</mo> <mi>a</mi> <mo>−<!-- − --></mo> <mi>p</mi> <mo stretchy="false">)</mo> <mo>+</mo> <mi>t</mi> <mo stretchy="false">(</mo> <mn>2</mn> <mi>a</mi> <mi>p</mi> <mo>−<!-- − --></mo> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>−<!-- − --></mo> <mi>p</mi> <mi>m</mi> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha _{13}=z+p\ell (a-p)+t(2ap-p^{2}-1)-pm=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/01b41acfa8ea2b83b28081bbc6e4606423912f30" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:48.008ex; height:3.176ex;" alt="{\displaystyle \alpha _{13}=z+p\ell (a-p)+t(2ap-p^{2}-1)-pm=0}"></span></dd></dl> <p>The 14 equations <i>α</i><sub>0</sub>, …, <i>α</i><sub>13</sub> can be used to produce a prime-generating polynomial inequality in 26 variables: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (k+2)(1-\alpha _{0}^{2}-\alpha _{1}^{2}-\cdots -\alpha _{13}^{2})>0.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>k</mi> <mo>+</mo> <mn>2</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msubsup> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>−<!-- − --></mo> <msubsup> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>−<!-- − --></mo> <mo>⋯<!-- ⋯ --></mo> <mo>−<!-- − --></mo> <msubsup> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>13</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo stretchy="false">)</mo> <mo>></mo> <mn>0.</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (k+2)(1-\alpha _{0}^{2}-\alpha _{1}^{2}-\cdots -\alpha _{13}^{2})>0.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b338b6f0dc87b4442149e2c8d0bf0d953887917a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:37.435ex; height:3.176ex;" alt="{\displaystyle (k+2)(1-\alpha _{0}^{2}-\alpha _{1}^{2}-\cdots -\alpha _{13}^{2})>0.}"></span></dd></dl> <p>That is, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}&(k+2)(1-{}\\[6pt]&[wz+h+j-q]^{2}-{}\\[6pt]&[(gk+2g+k+1)(h+j)+h-z]^{2}-{}\\[6pt]&[16(k+1)^{3}(k+2)(n+1)^{2}+1-f^{2}]^{2}-{}\\[6pt]&[2n+p+q+z-e]^{2}-{}\\[6pt]&[e^{3}(e+2)(a+1)^{2}+1-o^{2}]^{2}-{}\\[6pt]&[(a^{2}-1)y^{2}+1-x^{2}]^{2}-{}\\[6pt]&[16r^{2}y^{4}(a^{2}-1)+1-u^{2}]^{2}-{}\\[6pt]&[n+\ell +v-y]^{2}-{}\\[6pt]&[(a^{2}-1)\ell ^{2}+1-m^{2}]^{2}-{}\\[6pt]&[ai+k+1-\ell -i]^{2}-{}\\[6pt]&[((a+u^{2}(u^{2}-a))^{2}-1)(n+4dy)^{2}+1-(x+cu)^{2}]^{2}-{}\\[6pt]&[p+\ell (a-n-1)+b(2an+2a-n^{2}-2n-2)-m]^{2}-{}\\[6pt]&[q+y(a-p-1)+s(2ap+2a-p^{2}-2p-2)-x]^{2}-{}\\[6pt]&[z+p\ell (a-p)+t(2ap-p^{2}-1)-pm]^{2})\\[6pt]&>0\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.9em 0.9em 0.9em 0.9em 0.9em 0.9em 0.9em 0.9em 0.9em 0.9em 0.9em 0.9em 0.9em 0.9em 0.9em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">(</mo> <mi>k</mi> <mo>+</mo> <mn>2</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">[</mo> <mi>w</mi> <mi>z</mi> <mo>+</mo> <mi>h</mi> <mo>+</mo> <mi>j</mi> <mo>−<!-- − --></mo> <mi>q</mi> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">[</mo> <mo stretchy="false">(</mo> <mi>g</mi> <mi>k</mi> <mo>+</mo> <mn>2</mn> <mi>g</mi> <mo>+</mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>h</mi> <mo>+</mo> <mi>j</mi> <mo stretchy="false">)</mo> <mo>+</mo> <mi>h</mi> <mo>−<!-- − --></mo> <mi>z</mi> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">[</mo> <mn>16</mn> <mo stretchy="false">(</mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msup> <mo stretchy="false">(</mo> <mi>k</mi> <mo>+</mo> <mn>2</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>n</mi> <mo>+</mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>+</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">[</mo> <mn>2</mn> <mi>n</mi> <mo>+</mo> <mi>p</mi> <mo>+</mo> <mi>q</mi> <mo>+</mo> <mi>z</mi> <mo>−<!-- − --></mo> <mi>e</mi> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">[</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msup> <mo stretchy="false">(</mo> <mi>e</mi> <mo>+</mo> <mn>2</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>a</mi> <mo>+</mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>+</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>o</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">[</mo> <mo stretchy="false">(</mo> <msup> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <msup> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>+</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">[</mo> <mn>16</mn> <msup> <mi>r</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>4</mn> </mrow> </msup> <mo stretchy="false">(</mo> <msup> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>+</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>u</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">[</mo> <mi>n</mi> <mo>+</mo> <mi>ℓ<!-- ℓ --></mi> <mo>+</mo> <mi>v</mi> <mo>−<!-- − --></mo> <mi>y</mi> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">[</mo> <mo stretchy="false">(</mo> <msup> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <msup> <mi>ℓ<!-- ℓ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>+</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mi>m</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">[</mo> <mi>a</mi> <mi>i</mi> <mo>+</mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mi>ℓ<!-- ℓ --></mi> <mo>−<!-- − --></mo> <mi>i</mi> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">[</mo> <mo stretchy="false">(</mo> <mo stretchy="false">(</mo> <mi>a</mi> <mo>+</mo> <msup> <mi>u</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo stretchy="false">(</mo> <msup> <mi>u</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mi>a</mi> <mo stretchy="false">)</mo> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>n</mi> <mo>+</mo> <mn>4</mn> <mi>d</mi> <mi>y</mi> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>+</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo>+</mo> <mi>c</mi> <mi>u</mi> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">[</mo> <mi>p</mi> <mo>+</mo> <mi>ℓ<!-- ℓ --></mi> <mo stretchy="false">(</mo> <mi>a</mi> <mo>−<!-- − --></mo> <mi>n</mi> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>+</mo> <mi>b</mi> <mo stretchy="false">(</mo> <mn>2</mn> <mi>a</mi> <mi>n</mi> <mo>+</mo> <mn>2</mn> <mi>a</mi> <mo>−<!-- − --></mo> <msup> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>2</mn> <mi>n</mi> <mo>−<!-- − --></mo> <mn>2</mn> <mo stretchy="false">)</mo> <mo>−<!-- − --></mo> <mi>m</mi> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">[</mo> <mi>q</mi> <mo>+</mo> <mi>y</mi> <mo stretchy="false">(</mo> <mi>a</mi> <mo>−<!-- − --></mo> <mi>p</mi> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>+</mo> <mi>s</mi> <mo stretchy="false">(</mo> <mn>2</mn> <mi>a</mi> <mi>p</mi> <mo>+</mo> <mn>2</mn> <mi>a</mi> <mo>−<!-- − --></mo> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>2</mn> <mi>p</mi> <mo>−<!-- − --></mo> <mn>2</mn> <mo stretchy="false">)</mo> <mo>−<!-- − --></mo> <mi>x</mi> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo stretchy="false">[</mo> <mi>z</mi> <mo>+</mo> <mi>p</mi> <mi>ℓ<!-- ℓ --></mi> <mo stretchy="false">(</mo> <mi>a</mi> <mo>−<!-- − --></mo> <mi>p</mi> <mo stretchy="false">)</mo> <mo>+</mo> <mi>t</mi> <mo stretchy="false">(</mo> <mn>2</mn> <mi>a</mi> <mi>p</mi> <mo>−<!-- − --></mo> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>−<!-- − --></mo> <mi>p</mi> <mi>m</mi> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>></mo> <mn>0</mn> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}&(k+2)(1-{}\\[6pt]&[wz+h+j-q]^{2}-{}\\[6pt]&[(gk+2g+k+1)(h+j)+h-z]^{2}-{}\\[6pt]&[16(k+1)^{3}(k+2)(n+1)^{2}+1-f^{2}]^{2}-{}\\[6pt]&[2n+p+q+z-e]^{2}-{}\\[6pt]&[e^{3}(e+2)(a+1)^{2}+1-o^{2}]^{2}-{}\\[6pt]&[(a^{2}-1)y^{2}+1-x^{2}]^{2}-{}\\[6pt]&[16r^{2}y^{4}(a^{2}-1)+1-u^{2}]^{2}-{}\\[6pt]&[n+\ell +v-y]^{2}-{}\\[6pt]&[(a^{2}-1)\ell ^{2}+1-m^{2}]^{2}-{}\\[6pt]&[ai+k+1-\ell -i]^{2}-{}\\[6pt]&[((a+u^{2}(u^{2}-a))^{2}-1)(n+4dy)^{2}+1-(x+cu)^{2}]^{2}-{}\\[6pt]&[p+\ell (a-n-1)+b(2an+2a-n^{2}-2n-2)-m]^{2}-{}\\[6pt]&[q+y(a-p-1)+s(2ap+2a-p^{2}-2p-2)-x]^{2}-{}\\[6pt]&[z+p\ell (a-p)+t(2ap-p^{2}-1)-pm]^{2})\\[6pt]&>0\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3484e9eb9010c1c6264c9001fadcfa14fccf3239" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -36.171ex; width:56.434ex; height:73.509ex;" alt="{\displaystyle {\begin{aligned}&(k+2)(1-{}\\[6pt]&[wz+h+j-q]^{2}-{}\\[6pt]&[(gk+2g+k+1)(h+j)+h-z]^{2}-{}\\[6pt]&[16(k+1)^{3}(k+2)(n+1)^{2}+1-f^{2}]^{2}-{}\\[6pt]&[2n+p+q+z-e]^{2}-{}\\[6pt]&[e^{3}(e+2)(a+1)^{2}+1-o^{2}]^{2}-{}\\[6pt]&[(a^{2}-1)y^{2}+1-x^{2}]^{2}-{}\\[6pt]&[16r^{2}y^{4}(a^{2}-1)+1-u^{2}]^{2}-{}\\[6pt]&[n+\ell +v-y]^{2}-{}\\[6pt]&[(a^{2}-1)\ell ^{2}+1-m^{2}]^{2}-{}\\[6pt]&[ai+k+1-\ell -i]^{2}-{}\\[6pt]&[((a+u^{2}(u^{2}-a))^{2}-1)(n+4dy)^{2}+1-(x+cu)^{2}]^{2}-{}\\[6pt]&[p+\ell (a-n-1)+b(2an+2a-n^{2}-2n-2)-m]^{2}-{}\\[6pt]&[q+y(a-p-1)+s(2ap+2a-p^{2}-2p-2)-x]^{2}-{}\\[6pt]&[z+p\ell (a-p)+t(2ap-p^{2}-1)-pm]^{2})\\[6pt]&>0\end{aligned}}}"></span></dd></dl> <p>is a polynomial inequality in 26 variables, and the set of prime numbers is identical to the set of positive values taken on by the left-hand side as the variables <i>a</i>, <i>b</i>, …, <i>z</i> range over the nonnegative integers. </p><p>A general theorem of <a href="/wiki/Yuri_Matiyasevich" title="Yuri Matiyasevich">Matiyasevich</a> says that if a set is defined by a system of Diophantine equations, it can also be defined by a system of Diophantine equations in only 9 variables.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> Hence, there is a prime-generating polynomial inequality as above with only 10 variables. However, its degree is large (in the order of 10<sup>45</sup>). On the other hand, there also exists such a set of equations of degree only 4, but in 58 variables.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Mills'_formula"><span id="Mills.27_formula"></span>Mills' formula</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Formula_for_primes&action=edit&section=3" title="Edit section: Mills' formula"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The first such formula known was established by W. H. Mills (<a href="#CITEREFMills1947">1947</a>), who proved that there exists a <a href="/wiki/Real_number" title="Real number">real number</a> <i>A</i> such that, if </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d_{n}=A^{3^{n}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>=</mo> <msup> <mi>A</mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>3</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle d_{n}=A^{3^{n}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/76aae8470aed164c765b7ce2494093b3bd90adb2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:9.288ex; height:3.009ex;" alt="{\displaystyle d_{n}=A^{3^{n}}}"></span></dd></dl> <p>then </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor d_{n}\right\rfloor =\left\lfloor A^{3^{n}}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>⌋</mo> </mrow> <mo>=</mo> <mrow> <mo>⌊</mo> <msup> <mi>A</mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>3</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mrow> </msup> <mo>⌋</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor d_{n}\right\rfloor =\left\lfloor A^{3^{n}}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/18f97b738389c3c01e68024c878f4b4f583ddf10" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:13.808ex; height:4.843ex;" alt="{\displaystyle \left\lfloor d_{n}\right\rfloor =\left\lfloor A^{3^{n}}\right\rfloor }"></span></dd></dl> <p>is a prime number for all positive integers <i>n</i>.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup> If the <a href="/wiki/Riemann_hypothesis" title="Riemann hypothesis">Riemann hypothesis</a> is true, then the smallest such <i>A</i> has a value of around 1.3063778838630806904686144926... (sequence <span class="nowrap external"><a href="//oeis.org/A051021" class="extiw" title="oeis:A051021">A051021</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>) and is known as <a href="/wiki/Mills%27_constant" title="Mills' constant">Mills' constant</a>.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> This value gives rise to the primes <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor d_{1}\right\rfloor =2}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⌋</mo> </mrow> <mo>=</mo> <mn>2</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor d_{1}\right\rfloor =2}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c2bc65ad571800d9aef98c67ec1ff7a50c8142e6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.589ex; height:2.843ex;" alt="{\displaystyle \left\lfloor d_{1}\right\rfloor =2}"></span>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor d_{2}\right\rfloor =11}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>⌋</mo> </mrow> <mo>=</mo> <mn>11</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor d_{2}\right\rfloor =11}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c2b41e4480c0420f1675b145be389f8dd96c179c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.751ex; height:2.843ex;" alt="{\displaystyle \left\lfloor d_{2}\right\rfloor =11}"></span>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor d_{3}\right\rfloor =1361}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msub> <mo>⌋</mo> </mrow> <mo>=</mo> <mn>1361</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor d_{3}\right\rfloor =1361}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e530103416ff99cbd22628623ca0fd7e938d280c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:12.076ex; height:2.843ex;" alt="{\displaystyle \left\lfloor d_{3}\right\rfloor =1361}"></span>, ... (sequence <span class="nowrap external"><a href="//oeis.org/A051254" class="extiw" title="oeis:A051254">A051254</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>). Very little is known about the constant <i>A</i> (not even whether it is <a href="/wiki/Rational_number" title="Rational number">rational</a>). This formula has no practical value, because there is no known way of calculating the constant without finding primes in the first place. </p><p>There is nothing special about the <a href="/wiki/Floor_function" class="mw-redirect" title="Floor function">floor function</a> in the formula. Tóth proved that there also exists a constant <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle B}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>B</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle B}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/47136aad860d145f75f3eed3022df827cee94d7a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.764ex; height:2.176ex;" alt="{\displaystyle B}"></span> such that </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lceil B^{r^{n}}\rceil }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">⌈<!-- ⌈ --></mo> <msup> <mi>B</mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mi>r</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mrow> </msup> <mo fence="false" stretchy="false">⌉<!-- ⌉ --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lceil B^{r^{n}}\rceil }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8ced528c6b31da254e18541a1bf3c50225fa0387" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.767ex; height:3.176ex;" alt="{\displaystyle \lceil B^{r^{n}}\rceil }"></span></dd></dl> <p>is also prime-representing for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r>2.106\ldots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>r</mi> <mo>></mo> <mn>2.106</mn> <mo>…<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle r>2.106\ldots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d7a9941b7866377ef24150212758c4eca2b763c1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:12.554ex; height:2.176ex;" alt="{\displaystyle r>2.106\ldots }"></span>.<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> </p><p>In the case <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r=3}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>r</mi> <mo>=</mo> <mn>3</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle r=3}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2452d01ccc3bc930e3e2bff9fb18d2a425272ec9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.31ex; height:2.176ex;" alt="{\displaystyle r=3}"></span>, the value of the constant <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle B}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>B</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle B}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/47136aad860d145f75f3eed3022df827cee94d7a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.764ex; height:2.176ex;" alt="{\displaystyle B}"></span> begins with 1.24055470525201424067... The first few primes generated are: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2,7,337,38272739,56062005704198360319209,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>2</mn> <mo>,</mo> <mn>7</mn> <mo>,</mo> <mn>337</mn> <mo>,</mo> <mn>38272739</mn> <mo>,</mo> <mn>56062005704198360319209</mn> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 2,7,337,38272739,56062005704198360319209,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/63f814d3a873f5647070f31d1572c5d2dca82b2c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:46.631ex; height:2.509ex;" alt="{\displaystyle 2,7,337,38272739,56062005704198360319209,}"></span></dd> <dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 176199995814327287356671209104585864397055039072110696028654438846269,\ldots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>176199995814327287356671209104585864397055039072110696028654438846269</mn> <mo>,</mo> <mo>…<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 176199995814327287356671209104585864397055039072110696028654438846269,\ldots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c38784a9a708ed287f60d631b6236e2b862264c7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:83.967ex; height:2.509ex;" alt="{\displaystyle 176199995814327287356671209104585864397055039072110696028654438846269,\ldots }"></span></dd></dl> <p><i>Without</i> assuming the Riemann hypothesis, Elsholtz developed several prime-representing <a href="/wiki/Function_(mathematics)" title="Function (mathematics)">functions</a> similar to those of Mills. For example, if <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle A=1.00536773279814724017\ldots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>A</mi> <mo>=</mo> <mn>1.00536773279814724017</mn> <mo>…<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle A=1.00536773279814724017\ldots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5dda47906124173294a86d046db28018acda4885" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:33.01ex; height:2.176ex;" alt="{\displaystyle A=1.00536773279814724017\ldots }"></span>, then <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor A^{10^{10n}}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msup> <mi>A</mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>10</mn> <mi>n</mi> </mrow> </msup> </mrow> </msup> <mo>⌋</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor A^{10^{10n}}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/017466622d455f471afbdde9ba9a5189a20e7c6a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:8.374ex; height:4.843ex;" alt="{\displaystyle \left\lfloor A^{10^{10n}}\right\rfloor }"></span> is prime for all positive integers <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a601995d55609f2d9f5e233e36fbe9ea26011b3b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.395ex; height:1.676ex;" alt="{\displaystyle n}"></span>. Similarly, if <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle A=3.8249998073439146171615551375\ldots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>A</mi> <mo>=</mo> <mn>3.8249998073439146171615551375</mn> <mo>…<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle A=3.8249998073439146171615551375\ldots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2ea45cb9124f671e6bbfff158e95c5259cb6245b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:42.31ex; height:2.176ex;" alt="{\displaystyle A=3.8249998073439146171615551375\ldots }"></span>, then <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor A^{3^{13n}}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msup> <mi>A</mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>3</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>13</mn> <mi>n</mi> </mrow> </msup> </mrow> </msup> <mo>⌋</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor A^{3^{13n}}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/73757061088132f24fcd2395e8de3c32d178adb3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:7.552ex; height:4.843ex;" alt="{\displaystyle \left\lfloor A^{3^{13n}}\right\rfloor }"></span> is prime for all positive integers <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a601995d55609f2d9f5e233e36fbe9ea26011b3b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.395ex; height:1.676ex;" alt="{\displaystyle n}"></span>.<sup id="cite_ref-Elsholtz_13-0" class="reference"><a href="#cite_note-Elsholtz-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Wright's_formula"><span id="Wright.27s_formula"></span>Wright's formula</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Formula_for_primes&action=edit&section=4" title="Edit section: Wright's formula"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Another <a href="/wiki/Tetration" title="Tetration">tetrationally</a> growing prime-generating formula similar to Mills' comes from a theorem of <a href="/wiki/E._M._Wright" title="E. M. Wright">E. M. Wright</a>. He proved that there exists a real number <i>α</i> such that, if </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle g_{0}=\alpha }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>=</mo> <mi>α<!-- α --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g_{0}=\alpha }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9538f2ece7938aad76d354f3c6853bb13e193ec0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.749ex; height:2.009ex;" alt="{\displaystyle g_{0}=\alpha }"></span> and</dd> <dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle g_{n+1}=2^{g_{n}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> <mo>=</mo> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g_{n+1}=2^{g_{n}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ce8aea0479e66924725b0a44bf89df9f3a7c3a03" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:10.67ex; height:2.676ex;" alt="{\displaystyle g_{n+1}=2^{g_{n}}}"></span> for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n\geq 0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>≥<!-- ≥ --></mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n\geq 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ce8a1b7b3bc3c790054d93629fc3b08cd1da1fd0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:5.656ex; height:2.343ex;" alt="{\displaystyle n\geq 0}"></span>,</dd></dl> <p>then </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor g_{n}\right\rfloor =\left\lfloor 2^{\dots ^{2^{2^{\alpha }}}}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>⌋</mo> </mrow> <mo>=</mo> <mrow> <mo>⌊</mo> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>…<!-- … --></mo> <msup> <mi></mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>α<!-- α --></mi> </mrow> </msup> </mrow> </msup> </mrow> </msup> </mrow> </msup> <mo>⌋</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor g_{n}\right\rfloor =\left\lfloor 2^{\dots ^{2^{2^{\alpha }}}}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e6ba759c7a0eb86908f38520a77e8442804e303f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:16.141ex; height:6.176ex;" alt="{\displaystyle \left\lfloor g_{n}\right\rfloor =\left\lfloor 2^{\dots ^{2^{2^{\alpha }}}}\right\rfloor }"></span></dd></dl> <p>is prime for all <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n\geq 1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>≥<!-- ≥ --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n\geq 1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d8ce9ce38d06f6bf5a3fe063118c09c2b6202bfe" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:5.656ex; height:2.343ex;" alt="{\displaystyle n\geq 1}"></span>.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup> Wright gives the first seven decimal places of such a constant: <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha =1.9287800}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>α<!-- α --></mi> <mo>=</mo> <mn>1.9287800</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha =1.9287800}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fef0432a4dcc98108c6281aa53c06bde68fd300b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:14.533ex; height:2.176ex;" alt="{\displaystyle \alpha =1.9287800}"></span>. This value gives rise to the primes <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor g_{1}\right\rfloor =\left\lfloor 2^{\alpha }\right\rfloor =3}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⌋</mo> </mrow> <mo>=</mo> <mrow> <mo>⌊</mo> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>α<!-- α --></mi> </mrow> </msup> <mo>⌋</mo> </mrow> <mo>=</mo> <mn>3</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor g_{1}\right\rfloor =\left\lfloor 2^{\alpha }\right\rfloor =3}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a33d30ab2294c57c2f280b13396104bd79dfa49c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.099ex; height:2.843ex;" alt="{\displaystyle \left\lfloor g_{1}\right\rfloor =\left\lfloor 2^{\alpha }\right\rfloor =3}"></span>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor g_{2}\right\rfloor =13}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>⌋</mo> </mrow> <mo>=</mo> <mn>13</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor g_{2}\right\rfloor =13}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e0d97024839a1a2ed839944c7eb8143280f9cc4e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.651ex; height:2.843ex;" alt="{\displaystyle \left\lfloor g_{2}\right\rfloor =13}"></span>, and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor g_{3}\right\rfloor =16381}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msub> <mo>⌋</mo> </mrow> <mo>=</mo> <mn>16381</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor g_{3}\right\rfloor =16381}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/64dadd610d29a955b13e37ece8b6fd01715d50a2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:13.139ex; height:2.843ex;" alt="{\displaystyle \left\lfloor g_{3}\right\rfloor =16381}"></span>. <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor g_{4}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>4</mn> </mrow> </msub> <mo>⌋</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor g_{4}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7a9d9ade5a4c20b96232d507fa05ef4c9a716f70" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.228ex; height:2.843ex;" alt="{\displaystyle \left\lfloor g_{4}\right\rfloor }"></span> is <a href="/wiki/Parity_(mathematics)" title="Parity (mathematics)">even</a>, and so is not prime. However, with <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha =1.9287800+8.2843\cdot 10^{-4933}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>α<!-- α --></mi> <mo>=</mo> <mn>1.9287800</mn> <mo>+</mo> <mn>8.2843</mn> <mo>⋅<!-- ⋅ --></mo> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mn>4933</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha =1.9287800+8.2843\cdot 10^{-4933}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f378bf0cb2f72f34171f7e9966e9f0dabde02e98" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:32.635ex; height:2.843ex;" alt="{\displaystyle \alpha =1.9287800+8.2843\cdot 10^{-4933}}"></span>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor g_{1}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⌋</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor g_{1}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0855d218a54a1a7d3aee5a4a90be622ff39ee65b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.228ex; height:2.843ex;" alt="{\displaystyle \left\lfloor g_{1}\right\rfloor }"></span>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor g_{2}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>⌋</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor g_{2}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6d6634b8e09ad1260dbe7cf5931e28a4b7b8e192" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.228ex; height:2.843ex;" alt="{\displaystyle \left\lfloor g_{2}\right\rfloor }"></span>, and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor g_{3}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msub> <mo>⌋</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor g_{3}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/82c7aae536485d7e9106846b1a783f95fa1a9f83" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.228ex; height:2.843ex;" alt="{\displaystyle \left\lfloor g_{3}\right\rfloor }"></span> are unchanged, while <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor g_{4}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>4</mn> </mrow> </msub> <mo>⌋</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor g_{4}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7a9d9ade5a4c20b96232d507fa05ef4c9a716f70" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.228ex; height:2.843ex;" alt="{\displaystyle \left\lfloor g_{4}\right\rfloor }"></span> is a prime with 4932 digits.<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup> This <a href="/wiki/Sequence" title="Sequence">sequence</a> of primes cannot be extended beyond <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor g_{4}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>g</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>4</mn> </mrow> </msub> <mo>⌋</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor g_{4}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7a9d9ade5a4c20b96232d507fa05ef4c9a716f70" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.228ex; height:2.843ex;" alt="{\displaystyle \left\lfloor g_{4}\right\rfloor }"></span> without knowing more digits of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>α<!-- α --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b79333175c8b3f0840bfb4ec41b8072c83ea88d3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.488ex; height:1.676ex;" alt="{\displaystyle \alpha }"></span>. Like Mills' formula, and for the same reasons, Wright's formula cannot be used to find primes. </p> <div class="mw-heading mw-heading2"><h2 id="A_function_that_represents_all_primes">A function that represents all primes</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Formula_for_primes&action=edit&section=5" title="Edit section: A function that represents all primes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Given the constant <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f_{1}=2.920050977316\ldots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>=</mo> <mn>2.920050977316</mn> <mo>…<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f_{1}=2.920050977316\ldots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/90d936f86953a6d9918db1438f170b3cb4543656" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:24.161ex; height:2.509ex;" alt="{\displaystyle f_{1}=2.920050977316\ldots }"></span> (sequence <span class="nowrap external"><a href="//oeis.org/A249270" class="extiw" title="oeis:A249270">A249270</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>), for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n\geq 2}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>≥<!-- ≥ --></mo> <mn>2</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n\geq 2}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e6bf67f9d06ca3af619657f8d20ee1322da77174" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:5.656ex; height:2.343ex;" alt="{\displaystyle n\geq 2}"></span>, define the sequence </p> <table role="presentation" style="border-collapse:collapse; margin:0 0 0 1.6em; border:none;"><tbody><tr><td style="vertical-align:middle; border:none; padding:0;" class="nowrap"><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f_{n}=\left\lfloor f_{n-1}\right\rfloor (f_{n-1}-\left\lfloor f_{n-1}\right\rfloor +1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>=</mo> <mrow> <mo>⌊</mo> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msub> <mo>⌋</mo> </mrow> <mo stretchy="false">(</mo> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msub> <mo>−<!-- − --></mo> <mrow> <mo>⌊</mo> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msub> <mo>⌋</mo> </mrow> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f_{n}=\left\lfloor f_{n-1}\right\rfloor (f_{n-1}-\left\lfloor f_{n-1}\right\rfloor +1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/30c5abcbee8981c5408cb42841aad60fa123758c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:32ex; height:2.843ex;" alt="{\displaystyle f_{n}=\left\lfloor f_{n-1}\right\rfloor (f_{n-1}-\left\lfloor f_{n-1}\right\rfloor +1)}"></span></td> <td style="vertical-align:middle; width:99%; border:none; padding:0;"></td> <td style="vertical-align:middle; border:none; padding:0;" class="nowrap"><b>(<span id="math_1" class="reference nourlexpansion" style="font-weight:bold;">1</span>)</b></td></tr></tbody></table> <p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor \ \right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <mtext> </mtext> <mo>⌋</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor \ \right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6ff0754f7dd4ac4350a2c5874a3f6b230c85e725" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.645ex; height:2.843ex;" alt="{\displaystyle \left\lfloor \ \right\rfloor }"></span> is the <a href="/wiki/Floor_function" class="mw-redirect" title="Floor function">floor function</a>. Then for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n\geq 1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>≥<!-- ≥ --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n\geq 1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d8ce9ce38d06f6bf5a3fe063118c09c2b6202bfe" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:5.656ex; height:2.343ex;" alt="{\displaystyle n\geq 1}"></span>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor f_{n}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>⌋</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor f_{n}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a3b5b4295b1212f5dd3c23dac6c4712c07baf121" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.422ex; height:2.843ex;" alt="{\displaystyle \left\lfloor f_{n}\right\rfloor }"></span> equals the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a601995d55609f2d9f5e233e36fbe9ea26011b3b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.395ex; height:1.676ex;" alt="{\displaystyle n}"></span>th prime: <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor f_{1}\right\rfloor =2}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⌋</mo> </mrow> <mo>=</mo> <mn>2</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor f_{1}\right\rfloor =2}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2e9e9f672e2aa772d3358df97130dd0e76730a88" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.519ex; height:2.843ex;" alt="{\displaystyle \left\lfloor f_{1}\right\rfloor =2}"></span>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor f_{2}\right\rfloor =3}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>⌋</mo> </mrow> <mo>=</mo> <mn>3</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor f_{2}\right\rfloor =3}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/dac39af55a8021b6db4ff2578791fd13c54a2d46" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.519ex; height:2.843ex;" alt="{\displaystyle \left\lfloor f_{2}\right\rfloor =3}"></span>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor f_{3}\right\rfloor =5}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>⌊</mo> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msub> <mo>⌋</mo> </mrow> <mo>=</mo> <mn>5</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor f_{3}\right\rfloor =5}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/539ecfa3e0f926291f43ceb7fca504eff0030ac6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.519ex; height:2.843ex;" alt="{\displaystyle \left\lfloor f_{3}\right\rfloor =5}"></span>, etc. <sup id="cite_ref-FridmanEtAl_16-0" class="reference"><a href="#cite_note-FridmanEtAl-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup> The initial constant <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f_{1}=2.920050977316}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>=</mo> <mn>2.920050977316</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f_{1}=2.920050977316}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ff9036af87ea5dba7bec1fd9f82860918494563b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:21.051ex; height:2.509ex;" alt="{\displaystyle f_{1}=2.920050977316}"></span> given in the article is precise enough for equation (<b><a href="#math_1">1</a></b>) to generate the primes through 37, the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 12}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>12</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 12}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a522d3aa5812a136a69f06e1b909d809e849be39" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.325ex; height:2.176ex;" alt="{\displaystyle 12}"></span>th prime. </p><p>The <i>exact</i> value of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f_{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f_{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/50dfd257a51e037112c917f8a9e47c9c053466df" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.193ex; height:2.509ex;" alt="{\displaystyle f_{1}}"></span> that generates <i>all</i> primes is given by the rapidly-converging <a href="/wiki/Series_(mathematics)" title="Series (mathematics)">series</a> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f_{1}=\sum _{n=1}^{\infty }{\frac {p_{n}-1}{P_{n}}}={\frac {2-1}{1}}+{\frac {3-1}{2}}+{\frac {5-1}{2\cdot 3}}+{\frac {7-1}{2\cdot 3\cdot 5}}+\cdots ,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">∞<!-- ∞ --></mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> <msub> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>2</mn> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> <mn>1</mn> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>3</mn> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> <mn>2</mn> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>5</mn> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> <mrow> <mn>2</mn> <mo>⋅<!-- ⋅ --></mo> <mn>3</mn> </mrow> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>7</mn> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> <mrow> <mn>2</mn> <mo>⋅<!-- ⋅ --></mo> <mn>3</mn> <mo>⋅<!-- ⋅ --></mo> <mn>5</mn> </mrow> </mfrac> </mrow> <mo>+</mo> <mo>⋯<!-- ⋯ --></mo> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f_{1}=\sum _{n=1}^{\infty }{\frac {p_{n}-1}{P_{n}}}={\frac {2-1}{1}}+{\frac {3-1}{2}}+{\frac {5-1}{2\cdot 3}}+{\frac {7-1}{2\cdot 3\cdot 5}}+\cdots ,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ef30f5411fbe5bc9a13c474b2d36918e81c38bb2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:60.164ex; height:6.843ex;" alt="{\displaystyle f_{1}=\sum _{n=1}^{\infty }{\frac {p_{n}-1}{P_{n}}}={\frac {2-1}{1}}+{\frac {3-1}{2}}+{\frac {5-1}{2\cdot 3}}+{\frac {7-1}{2\cdot 3\cdot 5}}+\cdots ,}"></span></dd></dl> <p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6f79dcba35ecde0d43fbb7c914165586166ce8c2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:2.477ex; height:2.009ex;" alt="{\displaystyle p_{n}}"></span> is the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a601995d55609f2d9f5e233e36fbe9ea26011b3b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.395ex; height:1.676ex;" alt="{\displaystyle n}"></span>th prime, and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5949c8b1de44005a1af3a11188361f2a830842d1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.711ex; height:2.509ex;" alt="{\displaystyle P_{n}}"></span> is the product of all primes less than <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6f79dcba35ecde0d43fbb7c914165586166ce8c2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:2.477ex; height:2.009ex;" alt="{\displaystyle p_{n}}"></span>. The more digits of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f_{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f_{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/50dfd257a51e037112c917f8a9e47c9c053466df" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.193ex; height:2.509ex;" alt="{\displaystyle f_{1}}"></span> that we know, the more primes equation (<b><a href="#math_1">1</a></b>) will generate. For example, we can use 25 terms in the series, using the 25 primes less than 100, to calculate the following more precise approximation: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f_{1}\simeq 2.920050977316134712092562917112019.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>≃<!-- ≃ --></mo> <mn>2.920050977316134712092562917112019.</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f_{1}\simeq 2.920050977316134712092562917112019.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a4384e8a8b853e9ee9581d77765bc84dcb6dfc01" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:46.109ex; height:2.509ex;" alt="{\displaystyle f_{1}\simeq 2.920050977316134712092562917112019.}"></span></dd></dl> <p>This has enough digits for equation (<b><a href="#math_1">1</a></b>) to yield again the 25 primes less than 100. </p><p>As with Mills' formula and Wright's formula above, in order to generate a longer list of primes, we need to start by knowing more digits of the initial constant, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f_{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>f</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f_{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/50dfd257a51e037112c917f8a9e47c9c053466df" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.193ex; height:2.509ex;" alt="{\displaystyle f_{1}}"></span>, which in this case requires a longer list of primes in its calculation. </p> <div class="mw-heading mw-heading2"><h2 id="Plouffe's_formulas"><span id="Plouffe.27s_formulas"></span>Plouffe's formulas</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Formula_for_primes&action=edit&section=6" title="Edit section: Plouffe's formulas"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In 2018 <a href="/wiki/Simon_Plouffe" title="Simon Plouffe">Simon Plouffe</a> <a href="/wiki/Conjecture" title="Conjecture">conjectured</a> a set of formulas for primes. Similarly to the formula of Mills, they are of the form </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\{a_{0}^{r^{n}}\right\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>{</mo> <msubsup> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <msup> <mi>r</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mrow> </msubsup> <mo>}</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\{a_{0}^{r^{n}}\right\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/facf46b2a000c177cacadd285f00e28256b8a6e8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:5.879ex; height:3.343ex;" alt="{\displaystyle \left\{a_{0}^{r^{n}}\right\}}"></span></dd></dl> <p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \{\ \}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">{</mo> <mtext> </mtext> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \{\ \}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2b7b6957c4e5e1fa4a067fdcba5296e08bfb0497" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.906ex; height:2.843ex;" alt="{\displaystyle \{\ \}}"></span> is the function rounding to the nearest integer. For example, with <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle a_{0}\approx 43.80468771580293481}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>≈<!-- ≈ --></mo> <mn>43.80468771580293481</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle a_{0}\approx 43.80468771580293481}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4ce37b6d586043b4a6db92e315d680270595aba3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:28.116ex; height:2.509ex;" alt="{\displaystyle a_{0}\approx 43.80468771580293481}"></span> and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r=5/4}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>r</mi> <mo>=</mo> <mn>5</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>4</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle r=5/4}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/85d34f78f37dc6cc96647e822dd5eee908721b3f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.634ex; height:2.843ex;" alt="{\displaystyle r=5/4}"></span>, this gives 113, 367, 1607, 10177, 102217... (sequence <span class="nowrap external"><a href="//oeis.org/A323176" class="extiw" title="oeis:A323176">A323176</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>). Using <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle a_{0}=10^{500}+961+\varepsilon }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>=</mo> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>500</mn> </mrow> </msup> <mo>+</mo> <mn>961</mn> <mo>+</mo> <mi>ε<!-- ε --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle a_{0}=10^{500}+961+\varepsilon }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5801e8b8ec12287070a697543a0e0bf65d36820b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:20.657ex; height:3.009ex;" alt="{\displaystyle a_{0}=10^{500}+961+\varepsilon }"></span> and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r=1.01}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>r</mi> <mo>=</mo> <mn>1.01</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle r=1.01}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/67469fe72a76ef2fc2cc70cd18abdaa49299ae96" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:8.281ex; height:2.176ex;" alt="{\displaystyle r=1.01}"></span> with <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varepsilon }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>ε<!-- ε --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varepsilon }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a30c89172e5b88edbd45d3e2772c7f5e562e5173" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.083ex; height:1.676ex;" alt="{\displaystyle \varepsilon }"></span> a certain number between 0 and one half, Plouffe found that he could generate a sequence of 50 <a href="/wiki/Probable_primes" class="mw-redirect" title="Probable primes">probable primes</a> (with high probability of being prime). Presumably there exists an ε such that this formula will give an infinite sequence of actual prime numbers. The number of digits starts at 501 and increases by about 1% each time.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Prime_formulas_and_polynomial_functions">Prime formulas and polynomial functions</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Formula_for_primes&action=edit&section=7" title="Edit section: Prime formulas and polynomial functions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>It is known that no non-<a href="/wiki/Constant_polynomial" class="mw-redirect" title="Constant polynomial">constant polynomial</a> function <i>P</i>(<i>n</i>) with integer coefficients exists that evaluates to a prime number for all integers <i>n</i>. The proof is as follows: suppose that such a polynomial existed. Then <i>P</i>(1) would evaluate to a prime <i>p</i>, so <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P(1)\equiv 0{\pmod {p}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>≡<!-- ≡ --></mo> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <mspace width="1em" /> <mo stretchy="false">(</mo> <mi>mod</mi> <mspace width="0.333em" /> <mi>p</mi> <mo stretchy="false">)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P(1)\equiv 0{\pmod {p}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/08c968dafdafdaff4c66a3bd27882fca8539c9aa" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.832ex; height:2.843ex;" alt="{\displaystyle P(1)\equiv 0{\pmod {p}}}"></span>. But for any integer <i>k</i>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P(1+kp)\equiv 0{\pmod {p}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mo stretchy="false">(</mo> <mn>1</mn> <mo>+</mo> <mi>k</mi> <mi>p</mi> <mo stretchy="false">)</mo> <mo>≡<!-- ≡ --></mo> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <mspace width="1em" /> <mo stretchy="false">(</mo> <mi>mod</mi> <mspace width="0.333em" /> <mi>p</mi> <mo stretchy="false">)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P(1+kp)\equiv 0{\pmod {p}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3f270e8f7d3ec558dbee01bb8a9635147b104033" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:25.053ex; height:2.843ex;" alt="{\displaystyle P(1+kp)\equiv 0{\pmod {p}}}"></span> also, so <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P(1+kp)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mo stretchy="false">(</mo> <mn>1</mn> <mo>+</mo> <mi>k</mi> <mi>p</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P(1+kp)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1f7fddc824615076d9106df221f8328156e33fc0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.938ex; height:2.843ex;" alt="{\displaystyle P(1+kp)}"></span> cannot also be prime (as it would be divisible by <i>p</i>) unless it were <i>p</i> itself. But the only way <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P(1+kp)=P(1)=p}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mo stretchy="false">(</mo> <mn>1</mn> <mo>+</mo> <mi>k</mi> <mi>p</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>P</mi> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>=</mo> <mi>p</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P(1+kp)=P(1)=p}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1f7e3d1993fa0ad907ae9f095ea1ef2d9e1ddde9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:22.022ex; height:2.843ex;" alt="{\displaystyle P(1+kp)=P(1)=p}"></span> for all <i>k</i> is if the polynomial function is constant. The same reasoning shows an even stronger result: no non-constant polynomial function <i>P</i>(<i>n</i>) exists that evaluates to a prime number for <a href="/wiki/Almost_all" title="Almost all">almost all</a> integers <i>n</i>. </p><p><a href="/wiki/Leonhard_Euler" title="Leonhard Euler">Euler</a> first noticed (in 1772) that the <a href="/wiki/Quadratic_polynomial" class="mw-redirect" title="Quadratic polynomial">quadratic polynomial</a> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P(n)=n^{2}+n+41}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <msup> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>+</mo> <mi>n</mi> <mo>+</mo> <mn>41</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P(n)=n^{2}+n+41}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/91340957e8616e6cdb438a0bede7e4ba804e4922" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.897ex; height:3.176ex;" alt="{\displaystyle P(n)=n^{2}+n+41}"></span></dd></dl> <p>is prime for the 40 integers <i>n</i> = 0, 1, 2, ..., 39, with corresponding primes 41, 43, 47, 53, 61, 71, ..., 1601. The differences between the terms are 2, 4, 6, 8, 10... For <i>n</i> = 40, it produces a <a href="/wiki/Square_number" title="Square number">square number</a>, 1681, which is equal to 41 × 41, the smallest <a href="/wiki/Composite_number" title="Composite number">composite number</a> for this formula for <i>n</i> ≥ 0. If 41 divides <i>n</i>, it divides <i>P</i>(<i>n</i>) too. Furthermore, since <i>P</i>(<i>n</i>) can be written as <i>n</i>(<i>n</i> + 1) + 41, if 41 divides <i>n</i> + 1 instead, it also divides <i>P</i>(<i>n</i>). The phenomenon is related to the <a href="/wiki/Ulam_spiral" title="Ulam spiral">Ulam spiral</a>, which is also implicitly quadratic, and the <a href="/wiki/Class_number_(number_theory)" class="mw-redirect" title="Class number (number theory)">class number</a>; this polynomial is related to the <a href="/wiki/Heegner_number" title="Heegner number">Heegner number</a> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 163=4\cdot 41-1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>163</mn> <mo>=</mo> <mn>4</mn> <mo>⋅<!-- ⋅ --></mo> <mn>41</mn> <mo>−<!-- − --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 163=4\cdot 41-1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3fd1ba1572249d4aad69cb401ebe22f0b56f8f05" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:15.755ex; height:2.343ex;" alt="{\displaystyle 163=4\cdot 41-1}"></span>. There are analogous polynomials for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p=2,3,5,11{\text{ and }}17}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo>=</mo> <mn>2</mn> <mo>,</mo> <mn>3</mn> <mo>,</mo> <mn>5</mn> <mo>,</mo> <mn>11</mn> <mrow class="MJX-TeXAtom-ORD"> <mtext> and </mtext> </mrow> <mn>17</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p=2,3,5,11{\text{ and }}17}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ea9c90cc1f90b74b61e65a477bc0829141b8d3c5" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:20.505ex; height:2.509ex;" alt="{\displaystyle p=2,3,5,11{\text{ and }}17}"></span> (the <a href="/wiki/Lucky_numbers_of_Euler" title="Lucky numbers of Euler">lucky numbers of Euler</a>), corresponding to other Heegner numbers. </p><p>Given a positive integer <i>S</i>, there may be infinitely many <i>c</i> such that the expression <i>n</i><sup>2</sup> + <i>n</i> + <i>c</i> is always coprime to <i>S</i>. The integer <i>c</i> may be negative, in which case there is a delay before primes are produced. </p><p>It is known, based on <a href="/wiki/Dirichlet%27s_theorem_on_arithmetic_progressions" title="Dirichlet's theorem on arithmetic progressions">Dirichlet's theorem on arithmetic progressions</a>, that linear polynomial functions <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle L(n)=an+b}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>L</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>a</mi> <mi>n</mi> <mo>+</mo> <mi>b</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle L(n)=an+b}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/748dfb4ebcd10f65b4dc507f1fb18bd864d3a6a3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:14.348ex; height:2.843ex;" alt="{\displaystyle L(n)=an+b}"></span> produce infinitely many primes as long as <i>a</i> and <i>b</i> are <a href="/wiki/Relatively_prime" class="mw-redirect" title="Relatively prime">relatively prime</a> (though no such function will assume prime values for all values of <i>n</i>). Moreover, the <a href="/wiki/Green%E2%80%93Tao_theorem" title="Green–Tao theorem">Green–Tao theorem</a> says that for any <i>k</i> there exists a pair of <i>a</i> and <i>b</i>, with the property that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle L(n)=an+b}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>L</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>a</mi> <mi>n</mi> <mo>+</mo> <mi>b</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle L(n)=an+b}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/748dfb4ebcd10f65b4dc507f1fb18bd864d3a6a3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:14.348ex; height:2.843ex;" alt="{\displaystyle L(n)=an+b}"></span> is prime for any <i>n</i> from 0 through <i>k</i> − 1. However, as of 2020,<sup class="plainlinks noexcerpt noprint asof-tag update" style="display:none;"><a class="external text" href="https://en.wikipedia.org/w/index.php?title=Formula_for_primes&action=edit">[update]</a></sup> the best known result of such type is for <i>k</i> = 27: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 224584605939537911+18135696597948930n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>224584605939537911</mn> <mo>+</mo> <mn>18135696597948930</mn> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 224584605939537911+18135696597948930n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/036b5eaa0aa6ef274f040510931c14aca1853e86" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:44.921ex; height:2.343ex;" alt="{\displaystyle 224584605939537911+18135696597948930n}"></span></dd></dl> <p>is prime for all <i>n</i> from 0 through 26.<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup> It is not even known whether there exists a <a href="/wiki/Univariate_polynomial" class="mw-redirect" title="Univariate polynomial">univariate polynomial</a> of degree at least 2, that assumes an infinite number of values that are prime; see <a href="/wiki/Bunyakovsky_conjecture" title="Bunyakovsky conjecture">Bunyakovsky conjecture</a>. </p> <div class="mw-heading mw-heading2"><h2 id="Possible_formula_using_a_recurrence_relation">Possible formula using a recurrence relation</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Formula_for_primes&action=edit&section=8" title="Edit section: Possible formula using a recurrence relation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Another prime generator is defined by the <a href="/wiki/Recurrence_relation" title="Recurrence relation">recurrence relation</a> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle a_{n}=a_{n-1}+\gcd(n,a_{n-1}),\quad a_{1}=7,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>=</mo> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msub> <mo>+</mo> <mo movablelimits="true" form="prefix">gcd</mo> <mo stretchy="false">(</mo> <mi>n</mi> <mo>,</mo> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msub> <mo stretchy="false">)</mo> <mo>,</mo> <mspace width="1em" /> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>=</mo> <mn>7</mn> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle a_{n}=a_{n-1}+\gcd(n,a_{n-1}),\quad a_{1}=7,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/66759e0059e47fbf180afbf588070455901c2684" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:35.758ex; height:2.843ex;" alt="{\displaystyle a_{n}=a_{n-1}+\gcd(n,a_{n-1}),\quad a_{1}=7,}"></span></dd></dl> <p>where gcd(<i>x</i>, <i>y</i>) denotes the <a href="/wiki/Greatest_common_divisor" title="Greatest common divisor">greatest common divisor</a> of <i>x</i> and <i>y</i>. The sequence of differences <i>a</i><sub><i>n</i>+1</sub> − <i>a<sub>n</sub></i> starts with 1, 1, 1, 5, 3, 1, 1, 1, 1, 11, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 47, 3, 1, 5, 3, ... (sequence <span class="nowrap external"><a href="//oeis.org/A132199" class="extiw" title="oeis:A132199">A132199</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>). <a href="#CITEREFRowland2008">Rowland (2008)</a> proved that this sequence contains only ones and prime numbers. However, it does not contain all the prime numbers, since the terms gcd(<i>n</i> + 1, <i>a<sub>n</sub></i>) are always <a href="/wiki/Parity_(mathematics)" title="Parity (mathematics)">odd</a> and so never equal to 2. 587 is the smallest prime (other than 2) not appearing in the first 10,000 outcomes that are different from 1. Nevertheless, in the same paper it was conjectured to contain all odd primes, even though it is rather inefficient.<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup> </p><p>Note that there is a trivial program that enumerates all and only the prime numbers, as well as <a href="/wiki/Generating_primes" class="mw-redirect" title="Generating primes">more efficient ones</a>, so such recurrence relations are more a matter of curiosity than of any practical use. </p> <div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Formula_for_primes&action=edit&section=9" title="Edit section: See also"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Prime_number_theorem" title="Prime number theorem">Prime number theorem</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Formula_for_primes&action=edit&section=10" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist"> <div class="mw-references-wrap mw-references-columns"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite id="CITEREFMackinnon1987" class="citation cs2">Mackinnon, Nick (June 1987), "Prime number formulae", <i><a href="/wiki/The_Mathematical_Gazette" title="The Mathematical Gazette">The Mathematical Gazette</a></i>, <b>71</b> (456): 113–114, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F3616496">10.2307/3616496</a>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/3616496">3616496</a>, <a href="/wiki/S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:171537609">171537609</a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=The+Mathematical+Gazette&rft.atitle=Prime+number+formulae&rft.volume=71&rft.issue=456&rft.pages=113-114&rft.date=1987-06&rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A171537609%23id-name%3DS2CID&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F3616496%23id-name%3DJSTOR&rft_id=info%3Adoi%2F10.2307%2F3616496&rft.aulast=Mackinnon&rft.aufirst=Nick&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span>.</span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWillans1964" class="citation cs2">Willans, C. P. (December 1964), "On formulae for the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a601995d55609f2d9f5e233e36fbe9ea26011b3b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.395ex; height:1.676ex;" alt="{\displaystyle n}"></span>th prime number", <i><a href="/wiki/The_Mathematical_Gazette" title="The Mathematical Gazette">The Mathematical Gazette</a></i>, <b>48</b> (366): 413–415, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F3611701">10.2307/3611701</a>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/3611701">3611701</a>, <a href="/wiki/S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:126149459">126149459</a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=The+Mathematical+Gazette&rft.atitle=On+formulae+for+the+MATH+RENDER+ERRORth+prime+number&rft.volume=48&rft.issue=366&rft.pages=413-415&rft.date=1964-12&rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A126149459%23id-name%3DS2CID&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F3611701%23id-name%3DJSTOR&rft_id=info%3Adoi%2F10.2307%2F3611701&rft.aulast=Willans&rft.aufirst=C.+P.&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span>.</span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFNeillSinger1965" class="citation cs2">Neill, T. B. M.; Singer, M. (October 1965), "To the Editor, <i>The Mathematical Gazette</i>", <i><a href="/wiki/The_Mathematical_Gazette" title="The Mathematical Gazette">The Mathematical Gazette</a></i>, <b>49</b> (369): 303–303, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F3612863">10.2307/3612863</a>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/3612863">3612863</a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=The+Mathematical+Gazette&rft.atitle=To+the+Editor%2C+The+Mathematical+Gazette&rft.volume=49&rft.issue=369&rft.pages=303-303&rft.date=1965-10&rft_id=info%3Adoi%2F10.2307%2F3612863&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F3612863%23id-name%3DJSTOR&rft.aulast=Neill&rft.aufirst=T.+B.+M.&rft.au=Singer%2C+M.&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span></span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGoodsteinWormell1967" class="citation cs2">Goodstein, R. L.; Wormell, C. P. (February 1967), "Formulae For Primes", <i><a href="/wiki/The_Mathematical_Gazette" title="The Mathematical Gazette">The Mathematical Gazette</a></i>, <b>51</b> (375): 35–38, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F3613607">10.2307/3613607</a>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/3613607">3613607</a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=The+Mathematical+Gazette&rft.atitle=Formulae+For+Primes&rft.volume=51&rft.issue=375&rft.pages=35-38&rft.date=1967-02&rft_id=info%3Adoi%2F10.2307%2F3613607&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F3613607%23id-name%3DJSTOR&rft.aulast=Goodstein&rft.aufirst=R.+L.&rft.au=Wormell%2C+C.+P.&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span></span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWilf1982" class="citation cs2"><a href="/wiki/Herbert_Wilf" title="Herbert Wilf">Wilf, Herbert S.</a> (1982), "What is an answer?", <i><a href="/wiki/The_American_Mathematical_Monthly" title="The American Mathematical Monthly">The American Mathematical Monthly</a></i>, <b>89</b> (5): 289–292, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F2321713">10.2307/2321713</a>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2321713">2321713</a>, <a href="/wiki/MR_(identifier)" class="mw-redirect" title="MR (identifier)">MR</a> <a rel="nofollow" class="external text" href="https://mathscinet.ams.org/mathscinet-getitem?mr=0653502">0653502</a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=The+American+Mathematical+Monthly&rft.atitle=What+is+an+answer%3F&rft.volume=89&rft.issue=5&rft.pages=289-292&rft.date=1982&rft_id=https%3A%2F%2Fmathscinet.ams.org%2Fmathscinet-getitem%3Fmr%3D653502%23id-name%3DMR&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2321713%23id-name%3DJSTOR&rft_id=info%3Adoi%2F10.2307%2F2321713&rft.aulast=Wilf&rft.aufirst=Herbert+S.&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span></span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFDudley1983" class="citation cs2"><a href="/wiki/Underwood_Dudley" title="Underwood Dudley">Dudley, Underwood</a> (1983), "Formulas for primes", <i><a href="/wiki/Mathematics_Magazine" title="Mathematics Magazine">Mathematics Magazine</a></i>, <b>56</b> (1): 17–22, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F2690261">10.2307/2690261</a>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2690261">2690261</a>, <a href="/wiki/MR_(identifier)" class="mw-redirect" title="MR (identifier)">MR</a> <a rel="nofollow" class="external text" href="https://mathscinet.ams.org/mathscinet-getitem?mr=0692169">0692169</a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Mathematics+Magazine&rft.atitle=Formulas+for+primes&rft.volume=56&rft.issue=1&rft.pages=17-22&rft.date=1983&rft_id=https%3A%2F%2Fmathscinet.ams.org%2Fmathscinet-getitem%3Fmr%3D692169%23id-name%3DMR&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2690261%23id-name%3DJSTOR&rft_id=info%3Adoi%2F10.2307%2F2690261&rft.aulast=Dudley&rft.aufirst=Underwood&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFJonesSatoWadaWiens1976" class="citation cs2">Jones, James P.; Sato, Daihachiro; Wada, Hideo; <a href="/wiki/Douglas_Wiens" title="Douglas Wiens">Wiens, Douglas</a> (1976), <a rel="nofollow" class="external text" href="https://web.archive.org/web/20120224013618/http://mathdl.maa.org/mathDL/?pa=content&sa=viewDocument&nodeId=2967&pf=1">"Diophantine representation of the set of prime numbers"</a>, <i><a href="/wiki/American_Mathematical_Monthly" class="mw-redirect" title="American Mathematical Monthly">American Mathematical Monthly</a></i>, <b>83</b> (6), Mathematical Association of America: 449–464, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F2318339">10.2307/2318339</a>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2318339">2318339</a>, archived from <a rel="nofollow" class="external text" href="http://mathdl.maa.org/mathDL/?pa=content&sa=viewDocument&nodeId=2967&pf=1">the original</a> on 2012-02-24</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=American+Mathematical+Monthly&rft.atitle=Diophantine+representation+of+the+set+of+prime+numbers&rft.volume=83&rft.issue=6&rft.pages=449-464&rft.date=1976&rft_id=info%3Adoi%2F10.2307%2F2318339&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2318339%23id-name%3DJSTOR&rft.aulast=Jones&rft.aufirst=James+P.&rft.au=Sato%2C+Daihachiro&rft.au=Wada%2C+Hideo&rft.au=Wiens%2C+Douglas&rft_id=http%3A%2F%2Fmathdl.maa.org%2FmathDL%2F%3Fpa%3Dcontent%26sa%3DviewDocument%26nodeId%3D2967%26pf%3D1&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span>.</span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMatiyasevich1999" class="citation cs2"><a href="/wiki/Yuri_Matiyasevich" title="Yuri Matiyasevich">Matiyasevich, Yuri V.</a> (1999), <a rel="nofollow" class="external text" href="https://books.google.com/books?id=oLKlk5o6WroC&pg=PA13">"Formulas for Prime Numbers"</a>, in <a href="/wiki/Sergei_Tabachnikov" title="Sergei Tabachnikov">Tabachnikov, Serge</a> (ed.), <i>Kvant Selecta: Algebra and Analysis</i>, vol. II, <a href="/wiki/American_Mathematical_Society" title="American Mathematical Society">American Mathematical Society</a>, pp. 13–24, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-8218-1915-9" title="Special:BookSources/978-0-8218-1915-9"><bdi>978-0-8218-1915-9</bdi></a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=Formulas+for+Prime+Numbers&rft.btitle=Kvant+Selecta%3A+Algebra+and+Analysis&rft.pages=13-24&rft.pub=American+Mathematical+Society&rft.date=1999&rft.isbn=978-0-8218-1915-9&rft.aulast=Matiyasevich&rft.aufirst=Yuri+V.&rft_id=https%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3DoLKlk5o6WroC%26pg%3DPA13&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span>.</span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFJones1982" class="citation cs2">Jones, James P. (1982), "Universal diophantine equation", <i>Journal of Symbolic Logic</i>, <b>47</b> (3): 549–571, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F2273588">10.2307/2273588</a>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2273588">2273588</a>, <a href="/wiki/S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:11148823">11148823</a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Journal+of+Symbolic+Logic&rft.atitle=Universal+diophantine+equation&rft.volume=47&rft.issue=3&rft.pages=549-571&rft.date=1982&rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A11148823%23id-name%3DS2CID&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2273588%23id-name%3DJSTOR&rft_id=info%3Adoi%2F10.2307%2F2273588&rft.aulast=Jones&rft.aufirst=James+P.&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span>.</span> </li> <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMills1947" class="citation cs2">Mills, W. H. (1947), <a rel="nofollow" class="external text" href="https://www.ams.org/journals/bull/1947-53-06/S0002-9904-1947-08849-2/S0002-9904-1947-08849-2.pdf">"A prime-representing function"</a> <span class="cs1-format">(PDF)</span>, <i><a href="/wiki/Bulletin_of_the_American_Mathematical_Society" title="Bulletin of the American Mathematical Society">Bulletin of the American Mathematical Society</a></i>, <b>53</b> (6): 604, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1090%2FS0002-9904-1947-08849-2">10.1090/S0002-9904-1947-08849-2</a></span></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Bulletin+of+the+American+Mathematical+Society&rft.atitle=A+prime-representing+function&rft.volume=53&rft.issue=6&rft.pages=604&rft.date=1947&rft_id=info%3Adoi%2F10.1090%2FS0002-9904-1947-08849-2&rft.aulast=Mills&rft.aufirst=W.+H.&rft_id=https%3A%2F%2Fwww.ams.org%2Fjournals%2Fbull%2F1947-53-06%2FS0002-9904-1947-08849-2%2FS0002-9904-1947-08849-2.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span>.</span> </li> <li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFCaldwellCheng2005" class="citation cs2">Caldwell, Chris K.; Cheng, Yuanyou (2005), <a rel="nofollow" class="external text" href="https://cs.uwaterloo.ca/journals/JIS/VOL8/Caldwell/caldwell78.html">"Determining Mills' Constant and a Note on Honaker's Problem"</a>, <i>Journal of Integer Sequences</i>, <b>8</b>, Article 05.4.1.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Journal+of+Integer+Sequences&rft.atitle=Determining+Mills%27+Constant+and+a+Note+on+Honaker%27s+Problem&rft.volume=8&rft.pages=Article+05.4.1.&rft.date=2005&rft.aulast=Caldwell&rft.aufirst=Chris+K.&rft.au=Cheng%2C+Yuanyou&rft_id=https%3A%2F%2Fcs.uwaterloo.ca%2Fjournals%2FJIS%2FVOL8%2FCaldwell%2Fcaldwell78.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span></span> </li> <li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFTóth2017" class="citation cs2">Tóth, László (2017), <a rel="nofollow" class="external text" href="https://cs.uwaterloo.ca/journals/JIS/VOL20/Toth2/toth32.pdf">"A Variation on Mills-Like Prime-Representing Functions"</a> <span class="cs1-format">(PDF)</span>, <i>Journal of Integer Sequences</i>, <b>20</b> (17.9.8), <a href="/wiki/ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://arxiv.org/abs/1801.08014">1801.08014</a></span></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Journal+of+Integer+Sequences&rft.atitle=A+Variation+on+Mills-Like+Prime-Representing+Functions&rft.volume=20&rft.issue=17.9.8&rft.date=2017&rft_id=info%3Aarxiv%2F1801.08014&rft.aulast=T%C3%B3th&rft.aufirst=L%C3%A1szl%C3%B3&rft_id=https%3A%2F%2Fcs.uwaterloo.ca%2Fjournals%2FJIS%2FVOL20%2FToth2%2Ftoth32.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span>.</span> </li> <li id="cite_note-Elsholtz-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-Elsholtz_13-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFElsholtz2020" class="citation cs2">Elsholtz, Christian (2020), "Unconditional Prime-Representing Functions, Following Mills", <i>American Mathematical Monthly</i>, <b>127</b> (7), Washington, DC: <a href="/wiki/Mathematical_Association_of_America" title="Mathematical Association of America">Mathematical Association of America</a>: 639–642, <a href="/wiki/ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://arxiv.org/abs/2004.01285">2004.01285</a></span>, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1080%2F00029890.2020.1751560">10.1080/00029890.2020.1751560</a>, <a href="/wiki/S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:214795216">214795216</a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=American+Mathematical+Monthly&rft.atitle=Unconditional+Prime-Representing+Functions%2C+Following+Mills&rft.volume=127&rft.issue=7&rft.pages=639-642&rft.date=2020&rft_id=info%3Aarxiv%2F2004.01285&rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A214795216%23id-name%3DS2CID&rft_id=info%3Adoi%2F10.1080%2F00029890.2020.1751560&rft.aulast=Elsholtz&rft.aufirst=Christian&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span></span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFE._M._Wright1951" class="citation cs2">E. M. Wright (1951), "A prime-representing function", <i><a href="/wiki/American_Mathematical_Monthly" class="mw-redirect" title="American Mathematical Monthly">American Mathematical Monthly</a></i>, <b>58</b> (9): 616–618, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F2306356">10.2307/2306356</a>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2306356">2306356</a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=American+Mathematical+Monthly&rft.atitle=A+prime-representing+function&rft.volume=58&rft.issue=9&rft.pages=616-618&rft.date=1951&rft_id=info%3Adoi%2F10.2307%2F2306356&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2306356%23id-name%3DJSTOR&rft.au=E.+M.+Wright&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span></span> </li> <li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBaillie2017" class="citation arxiv cs2">Baillie, Robert (5 June 2017), "Wright's Fourth Prime", <a href="/wiki/ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://arxiv.org/abs/1705.09741v3">1705.09741v3</a></span> [<a rel="nofollow" class="external text" href="https://arxiv.org/archive/math.NT">math.NT</a>]</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=preprint&rft.jtitle=arXiv&rft.atitle=Wright%27s+Fourth+Prime&rft.date=2017-06-05&rft_id=info%3Aarxiv%2F1705.09741v3&rft.aulast=Baillie&rft.aufirst=Robert&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span></span> </li> <li id="cite_note-FridmanEtAl-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-FridmanEtAl_16-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFFridmanGarbulskyGlecerGrime2019" class="citation cs2">Fridman, Dylan; Garbulsky, Juli; Glecer, Bruno; Grime, James; Tron Florentin, Massi (2019), "A Prime-Representing Constant", <i>American Mathematical Monthly</i>, <b>126</b> (1), Washington, DC: <a href="/wiki/Mathematical_Association_of_America" title="Mathematical Association of America">Mathematical Association of America</a>: 70–73, <a href="/wiki/ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://arxiv.org/abs/2010.15882">2010.15882</a></span>, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1080%2F00029890.2019.1530554">10.1080/00029890.2019.1530554</a>, <a href="/wiki/S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:127727922">127727922</a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=American+Mathematical+Monthly&rft.atitle=A+Prime-Representing+Constant&rft.volume=126&rft.issue=1&rft.pages=70-73&rft.date=2019&rft_id=info%3Aarxiv%2F2010.15882&rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A127727922%23id-name%3DS2CID&rft_id=info%3Adoi%2F10.1080%2F00029890.2019.1530554&rft.aulast=Fridman&rft.aufirst=Dylan&rft.au=Garbulsky%2C+Juli&rft.au=Glecer%2C+Bruno&rft.au=Grime%2C+James&rft.au=Tron+Florentin%2C+Massi&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span></span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFSteckles2019" class="citation cs2">Steckles, Katie (January 26, 2019), <a rel="nofollow" class="external text" href="https://www.newscientist.com/article/mg24132143-200-mathematicians-record-beating-formula-can-generate-50-prime-numbers/">"Mathematician's record-beating formula can generate 50 prime numbers"</a>, <i>New Scientist</i></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=New+Scientist&rft.atitle=Mathematician%27s+record-beating+formula+can+generate+50+prime+numbers&rft.date=2019-01-26&rft.aulast=Steckles&rft.aufirst=Katie&rft_id=https%3A%2F%2Fwww.newscientist.com%2Farticle%2Fmg24132143-200-mathematicians-record-beating-formula-can-generate-50-prime-numbers%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span></span> </li> <li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFSimon_Plouffe2019" class="citation arxiv cs2">Simon Plouffe (2019), "A set of formulas for primes", <a href="/wiki/ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://arxiv.org/abs/1901.01849">1901.01849</a></span> [<a rel="nofollow" class="external text" href="https://arxiv.org/archive/math.NT">math.NT</a>]</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=preprint&rft.jtitle=arXiv&rft.atitle=A+set+of+formulas+for+primes&rft.date=2019&rft_id=info%3Aarxiv%2F1901.01849&rft.au=Simon+Plouffe&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span> As of January 2019, the number he gives in the appendix for the 50th number generated is actually the 48th.</span> </li> <li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://www.primegrid.com/download/AP27-81292139.pdf">PrimeGrid's AP27 Search, Official announcement</a>, from <a href="/wiki/PrimeGrid" title="PrimeGrid">PrimeGrid</a>. The AP27 is listed in <a rel="nofollow" class="external text" href="http://primerecords.dk/aprecords.htm">"Jens Kruse Andersen's Primes in Arithmetic Progression Records page"</a>.</span> </li> <li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRowland2008" class="citation cs2">Rowland, Eric S. (2008), <a rel="nofollow" class="external text" href="http://www.cs.uwaterloo.ca/journals/JIS/VOL11/Rowland/rowland21.html">"A Natural Prime-Generating Recurrence"</a>, <i>Journal of Integer Sequences</i>, <b>11</b> (2): 08.2.8, <a href="/wiki/ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://arxiv.org/abs/0710.3217">0710.3217</a></span>, <a href="/wiki/Bibcode_(identifier)" class="mw-redirect" title="Bibcode (identifier)">Bibcode</a>:<a rel="nofollow" class="external text" href="https://ui.adsabs.harvard.edu/abs/2008JIntS..11...28R">2008JIntS..11...28R</a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Journal+of+Integer+Sequences&rft.atitle=A+Natural+Prime-Generating+Recurrence&rft.volume=11&rft.issue=2&rft.pages=08.2.8&rft.date=2008&rft_id=info%3Aarxiv%2F0710.3217&rft_id=info%3Abibcode%2F2008JIntS..11...28R&rft.aulast=Rowland&rft.aufirst=Eric+S.&rft_id=http%3A%2F%2Fwww.cs.uwaterloo.ca%2Fjournals%2FJIS%2FVOL11%2FRowland%2Frowland21.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span>.</span> </li> </ol></div></div> <div class="mw-heading mw-heading2"><h2 id="Further_reading">Further reading</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Formula_for_primes&action=edit&section=11" title="Edit section: Further reading"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRegimbal1975" class="citation cs2">Regimbal, Stephen (1975), "An explicit Formula for the k-th prime number", <i>Mathematics Magazine</i>, <b>48</b> (4), Mathematical Association of America: 230–232, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F2690354">10.2307/2690354</a>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2690354">2690354</a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Mathematics+Magazine&rft.atitle=An+explicit+Formula+for+the+k-th+prime+number&rft.volume=48&rft.issue=4&rft.pages=230-232&rft.date=1975&rft_id=info%3Adoi%2F10.2307%2F2690354&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2690354%23id-name%3DJSTOR&rft.aulast=Regimbal&rft.aufirst=Stephen&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFormula+for+primes" class="Z3988"></span>.</li> <li>A Venugopalan. <i>Formula for primes, twinprimes, number of primes and number of twinprimes</i>. Proceedings of the Indian Academy of Sciences—Mathematical Sciences, Vol. 92, No 1, September 1983, <a rel="nofollow" class="external text" href="https://www.ias.ac.in/article/fulltext/pmsc/092/01/0049-0052">pp. 49–52</a> <a rel="nofollow" class="external text" href="https://www.ias.ac.in/article/fulltext/pmsc/093/01/0066-0066">errata</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Formula_for_primes&action=edit&section=12" title="Edit section: External links"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><cite id="Reference-Mathworld-Prime_Formulas"><a href="/wiki/Eric_W._Weisstein" title="Eric W. Weisstein">Weisstein, Eric W.</a>, "<a rel="nofollow" class="external text" href="https://mathworld.wolfram.com/PrimeFormulas.html">Prime Formulas</a>" ("<a rel="nofollow" class="external text" href="http://mathworld.wolfram.com/Prime-GeneratingPolynomial.html">Prime-Generating Polynomial</a>") at <i><a href="/wiki/MathWorld" title="MathWorld">MathWorld</a></i>.</cite></li></ul> <div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}</style><style data-mw-deduplicate="TemplateStyles:r1236075235">.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}</style></div><div role="navigation" class="navbox" aria-labelledby="Prime_number_classes" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><style data-mw-deduplicate="TemplateStyles:r1239400231">.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}</style><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:Prime_number_classes" title="Template:Prime number classes"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Prime_number_classes" title="Template talk:Prime number classes"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Prime_number_classes" title="Special:EditPage/Template:Prime number classes"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="Prime_number_classes" style="font-size:114%;margin:0 4em"><a href="/wiki/Prime_number" title="Prime number">Prime number</a> classes</div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">By formula</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Fermat_number" title="Fermat number">Fermat (<span class="texhtml texhtml-big" style="font-size:110%;">2<sup>2<sup><i>n</i></sup></sup> + 1</span>)</a></li> <li><a href="/wiki/Mersenne_prime" title="Mersenne prime">Mersenne (<span class="texhtml texhtml-big" style="font-size:110%;">2<sup><i>p</i></sup> − 1</span>)</a></li> <li><a href="/wiki/Double_Mersenne_number" title="Double Mersenne number">Double Mersenne (<span class="texhtml texhtml-big" style="font-size:110%;">2<sup>2<sup><i>p</i></sup>−1</sup> − 1</span>)</a></li> <li><a href="/wiki/Wagstaff_prime" title="Wagstaff prime">Wagstaff <span class="texhtml texhtml-big" style="font-size:110%;">(2<sup><i>p</i></sup> + 1)/3</span></a></li> <li><a href="/wiki/Proth_prime" title="Proth prime">Proth (<span class="texhtml texhtml-big" style="font-size:110%;"><i>k</i>·2<sup><i>n</i></sup> + 1</span>)</a></li> <li><a href="/wiki/Factorial_prime" title="Factorial prime">Factorial (<span class="texhtml texhtml-big" style="font-size:110%;"><i>n</i>! ± 1</span>)</a></li> <li><a href="/wiki/Primorial_prime" title="Primorial prime">Primorial (<span class="texhtml texhtml-big" style="font-size:110%;"><i>p<sub>n</sub></i># ± 1</span>)</a></li> <li><a href="/wiki/Euclid_number" title="Euclid number">Euclid (<span class="texhtml texhtml-big" style="font-size:110%;"><i>p<sub>n</sub></i># + 1</span>)</a></li> <li><a href="/wiki/Pythagorean_prime" title="Pythagorean prime">Pythagorean (<span class="texhtml texhtml-big" style="font-size:110%;">4<i>n</i> + 1</span>)</a></li> <li><a href="/wiki/Pierpont_prime" title="Pierpont prime">Pierpont (<span class="texhtml texhtml-big" style="font-size:110%;">2<sup><i>m</i></sup>·3<sup><i>n</i></sup> + 1</span>)</a></li> <li><a href="/wiki/Quartan_prime" title="Quartan prime">Quartan (<span class="texhtml texhtml-big" style="font-size:110%;"><i>x</i><sup>4</sup> + <i>y</i><sup>4</sup></span>)</a></li> <li><a href="/wiki/Solinas_prime" title="Solinas prime">Solinas (<span class="texhtml texhtml-big" style="font-size:110%;">2<sup><i>m</i></sup> ± 2<sup><i>n</i></sup> ± 1</span>)</a></li> <li><a href="/wiki/Cullen_number" title="Cullen number">Cullen (<span class="texhtml texhtml-big" style="font-size:110%;"><i>n</i>·2<sup><i>n</i></sup> + 1</span>)</a></li> <li><a href="/wiki/Woodall_number" title="Woodall number">Woodall (<span class="texhtml texhtml-big" style="font-size:110%;"><i>n</i>·2<sup><i>n</i></sup> − 1</span>)</a></li> <li><a href="/wiki/Cuban_prime" title="Cuban prime">Cuban (<span class="texhtml texhtml-big" style="font-size:110%;"><i>x</i><sup>3</sup> − <i>y</i><sup>3</sup>)/(<i>x</i> − <i>y</i></span>)</a></li> <li><a href="/wiki/Leyland_number" title="Leyland number">Leyland (<span class="texhtml texhtml-big" style="font-size:110%;"><i>x<sup>y</sup></i> + <i>y<sup>x</sup></i></span>)</a></li> <li><a href="/wiki/Thabit_number" title="Thabit number">Thabit (<span class="texhtml texhtml-big" style="font-size:110%;">3·2<sup><i>n</i></sup> − 1</span>)</a></li> <li><a href="/wiki/Williams_number" title="Williams number">Williams (<span class="texhtml texhtml-big" style="font-size:110%;">(<i>b</i>−1)·<i>b</i><sup><i>n</i></sup> − 1</span>)</a></li> <li><a href="/wiki/Mills%27_constant" title="Mills' constant">Mills (<span class="texhtml texhtml-big" style="font-size:110%;"><span style="font-size:1em">⌊</span><i>A</i><sup>3<sup><i>n</i></sup></sup><span style="font-size:1em">⌋</span></span>)</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">By integer sequence</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Fibonacci_prime" title="Fibonacci prime">Fibonacci</a></li> <li><a href="/wiki/Lucas_prime" class="mw-redirect" title="Lucas prime">Lucas</a></li> <li><a href="/wiki/Pell_prime" class="mw-redirect" title="Pell prime">Pell</a></li> <li><a href="/wiki/Newman%E2%80%93Shanks%E2%80%93Williams_prime" title="Newman–Shanks–Williams prime">Newman–Shanks–Williams</a></li> <li><a href="/wiki/Perrin_prime" class="mw-redirect" title="Perrin prime">Perrin</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">By property</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Wieferich_prime" title="Wieferich prime">Wieferich</a> (<a href="/wiki/Wieferich_pair" title="Wieferich pair">pair</a>)</li> <li><a href="/wiki/Wall%E2%80%93Sun%E2%80%93Sun_prime" title="Wall–Sun–Sun prime">Wall–Sun–Sun</a></li> <li><a href="/wiki/Wolstenholme_prime" title="Wolstenholme prime">Wolstenholme</a></li> <li><a href="/wiki/Wilson_prime" title="Wilson prime">Wilson</a></li> <li><a href="/wiki/Lucky_number" title="Lucky number">Lucky</a></li> <li><a href="/wiki/Fortunate_number" title="Fortunate number">Fortunate</a></li> <li><a href="/wiki/Ramanujan_prime" title="Ramanujan prime">Ramanujan</a></li> <li><a href="/wiki/Pillai_prime" title="Pillai prime">Pillai</a></li> <li><a href="/wiki/Regular_prime" title="Regular prime">Regular</a></li> <li><a href="/wiki/Strong_prime" title="Strong prime">Strong</a></li> <li><a href="/wiki/Stern_prime" title="Stern prime">Stern</a></li> <li><a href="/wiki/Supersingular_prime_(algebraic_number_theory)" title="Supersingular prime (algebraic number theory)">Supersingular (elliptic curve)</a></li> <li><a href="/wiki/Supersingular_prime_(moonshine_theory)" title="Supersingular prime (moonshine theory)">Supersingular (moonshine theory)</a></li> <li><a href="/wiki/Good_prime" title="Good prime">Good</a></li> <li><a href="/wiki/Super-prime" title="Super-prime">Super</a></li> <li><a href="/wiki/Higgs_prime" title="Higgs prime">Higgs</a></li> <li><a href="/wiki/Highly_cototient_number" title="Highly cototient number">Highly cototient</a></li> <li><a href="/wiki/Reciprocals_of_primes#Unique_primes" title="Reciprocals of primes">Unique</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Radix" title="Radix">Base</a>-dependent</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Palindromic_prime" title="Palindromic prime">Palindromic</a></li> <li><a href="/wiki/Emirp" title="Emirp">Emirp</a></li> <li><a href="/wiki/Repunit" title="Repunit">Repunit <span class="texhtml texhtml-big" style="font-size:110%;">(10<sup><i>n</i></sup> − 1)/9</span></a></li> <li><a href="/wiki/Permutable_prime" title="Permutable prime">Permutable</a></li> <li><a href="/wiki/Circular_prime" title="Circular prime">Circular</a></li> <li><a href="/wiki/Truncatable_prime" title="Truncatable prime">Truncatable</a></li> <li><a href="/wiki/Minimal_prime_(recreational_mathematics)" title="Minimal prime (recreational mathematics)">Minimal</a></li> <li><a href="/wiki/Delicate_prime" title="Delicate prime">Delicate</a></li> <li><a href="/wiki/Primeval_number" title="Primeval number">Primeval</a></li> <li><a href="/wiki/Full_reptend_prime" title="Full reptend prime">Full reptend</a></li> <li><a href="/wiki/Unique_prime_number" class="mw-redirect" title="Unique prime number">Unique</a></li> <li><a href="/wiki/Happy_number#Happy_primes" title="Happy number">Happy</a></li> <li><a href="/wiki/Self_number" title="Self number">Self</a></li> <li><a href="/wiki/Smarandache%E2%80%93Wellin_prime" class="mw-redirect" title="Smarandache–Wellin prime">Smarandache–Wellin</a></li> <li><a href="/wiki/Strobogrammatic_prime" class="mw-redirect" title="Strobogrammatic prime">Strobogrammatic</a></li> <li><a href="/wiki/Dihedral_prime" title="Dihedral prime">Dihedral</a></li> <li><a href="/wiki/Tetradic_number" title="Tetradic number">Tetradic</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Patterns</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th id="k-tuples" scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Prime_k-tuple" title="Prime k-tuple"><i>k</i>-tuples</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Twin_prime" title="Twin prime">Twin (<span class="texhtml texhtml-big" style="font-size:110%;"><i>p</i>, <i>p</i> + 2</span>)</a></li> <li><a href="/wiki/Prime_triplet" title="Prime triplet">Triplet (<span class="texhtml texhtml-big" style="font-size:110%;"><i>p</i>, <i>p</i> + 2 or <i>p</i> + 4, <i>p</i> + 6</span>)</a></li> <li><a href="/wiki/Prime_quadruplet" title="Prime quadruplet">Quadruplet (<span class="texhtml texhtml-big" style="font-size:110%;"><i>p</i>, <i>p</i> + 2, <i>p</i> + 6, <i>p</i> + 8</span>)</a></li> <li><a href="/wiki/Cousin_prime" title="Cousin prime">Cousin (<span class="texhtml texhtml-big" style="font-size:110%;"><i>p</i>, <i>p</i> + 4</span>)</a></li> <li><a href="/wiki/Sexy_prime" title="Sexy prime">Sexy (<span class="texhtml texhtml-big" style="font-size:110%;"><i>p</i>, <i>p</i> + 6</span>)</a></li> <li><a href="/wiki/Primes_in_arithmetic_progression" title="Primes in arithmetic progression">Arithmetic progression (<span class="texhtml texhtml-big" style="font-size:110%;"><i>p</i> + <i>a·n</i>, <i>n</i> = 0, 1, 2, 3, ...</span>)</a></li> <li><a href="/wiki/Balanced_prime" title="Balanced prime">Balanced (<span class="texhtml texhtml-big" style="font-size:110%;">consecutive <i>p</i> − <i>n</i>, <i>p</i>, <i>p</i> + <i>n</i></span>)</a></li></ul> </div></td></tr></tbody></table><div> <ul><li><a href="/wiki/Bi-twin_chain" title="Bi-twin chain">Bi-twin chain (<span class="texhtml texhtml-big" style="font-size:110%;"><i>n</i> ± 1, 2<i>n</i> ± 1, 4<i>n</i> ± 1, …</span>)</a></li> <li><a href="/wiki/Chen_prime" title="Chen prime">Chen</a></li> <li><a href="/wiki/Safe_and_Sophie_Germain_primes" title="Safe and Sophie Germain primes">Sophie Germain/Safe (<span class="texhtml texhtml-big" style="font-size:110%;"><i>p</i>, 2<i>p</i> + 1</span>)</a></li> <li><a href="/wiki/Cunningham_chain" title="Cunningham chain">Cunningham (<span class="texhtml texhtml-big" style="font-size:110%;"><i>p</i>, 2<i>p</i> ± 1, 4<i>p</i> ± 3, 8<i>p</i> ± 7, ...</span>)</a></li></ul></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">By size</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <li><a href="/wiki/Megaprime" title="Megaprime">Mega (1,000,000+ digits)</a></li> <li><a href="/wiki/Largest_known_prime_number" title="Largest known prime number">Largest known</a> <ul><li><a href="/wiki/List_of_largest_known_primes_and_probable_primes" title="List of largest known primes and probable primes">list</a></li></ul></li> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Complex_number" title="Complex number">Complex numbers</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Eisenstein_prime" class="mw-redirect" title="Eisenstein prime">Eisenstein prime</a></li> <li><a href="/wiki/Gaussian_integer#Gaussian_primes" title="Gaussian integer">Gaussian prime</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Composite_number" title="Composite number">Composite numbers</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Pseudoprime" title="Pseudoprime">Pseudoprime</a> <ul><li><a href="/wiki/Catalan_pseudoprime" title="Catalan pseudoprime">Catalan</a></li> <li><a href="/wiki/Elliptic_pseudoprime" title="Elliptic pseudoprime">Elliptic</a></li> <li><a href="/wiki/Euler_pseudoprime" title="Euler pseudoprime">Euler</a></li> <li><a href="/wiki/Euler%E2%80%93Jacobi_pseudoprime" title="Euler–Jacobi pseudoprime">Euler–Jacobi</a></li> <li><a href="/wiki/Fermat_pseudoprime" title="Fermat pseudoprime">Fermat</a></li> <li><a href="/wiki/Frobenius_pseudoprime" title="Frobenius pseudoprime">Frobenius</a></li> <li><a href="/wiki/Lucas_pseudoprime" title="Lucas pseudoprime">Lucas</a></li> <li><a href="/wiki/Perrin_pseudoprime" class="mw-redirect" title="Perrin pseudoprime">Perrin</a></li> <li><a href="/wiki/Somer%E2%80%93Lucas_pseudoprime" title="Somer–Lucas pseudoprime">Somer–Lucas</a></li> <li><a href="/wiki/Strong_pseudoprime" title="Strong pseudoprime">Strong</a></li></ul></li> <li><a href="/wiki/Carmichael_number" title="Carmichael number">Carmichael number</a></li> <li><a href="/wiki/Almost_prime" title="Almost prime">Almost prime</a></li> <li><a href="/wiki/Semiprime" title="Semiprime">Semiprime</a></li> <li><a href="/wiki/Sphenic_number" title="Sphenic number">Sphenic number</a></li> <li><a href="/wiki/Interprime" title="Interprime">Interprime</a></li> <li><a href="/wiki/Pernicious_number" title="Pernicious number">Pernicious</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Related topics</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Probable_prime" title="Probable prime">Probable prime</a></li> <li><a href="/wiki/Industrial-grade_prime" title="Industrial-grade prime">Industrial-grade prime</a></li> <li><a href="/wiki/Illegal_prime" class="mw-redirect" title="Illegal prime">Illegal prime</a></li> <li><a class="mw-selflink selflink">Formula for primes</a></li> <li><a href="/wiki/Prime_gap" title="Prime gap">Prime gap</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">First 60 primes</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/2" title="2">2</a></li> <li><a href="/wiki/3" title="3">3</a></li> <li><a href="/wiki/5" title="5">5</a></li> <li><a href="/wiki/7" title="7">7</a></li> <li><a href="/wiki/11_(number)" title="11 (number)">11</a></li> <li><a href="/wiki/13_(number)" title="13 (number)">13</a></li> <li><a href="/wiki/17_(number)" title="17 (number)">17</a></li> <li><a href="/wiki/19_(number)" title="19 (number)">19</a></li> <li><a href="/wiki/23_(number)" title="23 (number)">23</a></li> <li><a href="/wiki/29_(number)" title="29 (number)">29</a></li> <li><a href="/wiki/31_(number)" title="31 (number)">31</a></li> <li><a href="/wiki/37_(number)" title="37 (number)">37</a></li> <li><a href="/wiki/41_(number)" title="41 (number)">41</a></li> <li><a href="/wiki/43_(number)" title="43 (number)">43</a></li> <li><a href="/wiki/47_(number)" title="47 (number)">47</a></li> <li><a href="/wiki/53_(number)" title="53 (number)">53</a></li> <li><a href="/wiki/59_(number)" title="59 (number)">59</a></li> <li><a href="/wiki/61_(number)" title="61 (number)">61</a></li> <li><a href="/wiki/67_(number)" title="67 (number)">67</a></li> <li><a href="/wiki/71_(number)" title="71 (number)">71</a></li> <li><a href="/wiki/73_(number)" title="73 (number)">73</a></li> <li><a href="/wiki/79_(number)" title="79 (number)">79</a></li> <li><a href="/wiki/83_(number)" title="83 (number)">83</a></li> <li><a href="/wiki/89_(number)" title="89 (number)">89</a></li> <li><a href="/wiki/97_(number)" title="97 (number)">97</a></li> <li><a href="/wiki/101_(number)" title="101 (number)">101</a></li> <li><a href="/wiki/103_(number)" title="103 (number)">103</a></li> <li><a href="/wiki/107_(number)" title="107 (number)">107</a></li> <li><a href="/wiki/109_(number)" title="109 (number)">109</a></li> <li><a href="/wiki/113_(number)" title="113 (number)">113</a></li> <li><a href="/wiki/127_(number)" title="127 (number)">127</a></li> <li><a href="/wiki/131_(number)" title="131 (number)">131</a></li> <li><a href="/wiki/137_(number)" title="137 (number)">137</a></li> <li><a href="/wiki/139_(number)" title="139 (number)">139</a></li> <li><a href="/wiki/149_(number)" title="149 (number)">149</a></li> <li><a href="/wiki/151_(number)" title="151 (number)">151</a></li> <li><a href="/wiki/157_(number)" title="157 (number)">157</a></li> <li><a href="/wiki/163_(number)" title="163 (number)">163</a></li> <li><a href="/wiki/167_(number)" title="167 (number)">167</a></li> <li><a href="/wiki/173_(number)" title="173 (number)">173</a></li> <li><a href="/wiki/179_(number)" title="179 (number)">179</a></li> <li><a href="/wiki/181_(number)" title="181 (number)">181</a></li> <li><a href="/wiki/191_(number)" title="191 (number)">191</a></li> <li><a href="/wiki/193_(number)" title="193 (number)">193</a></li> <li><a href="/wiki/197_(number)" title="197 (number)">197</a></li> <li><a href="/wiki/199_(number)" title="199 (number)">199</a></li> <li><a href="/wiki/211_(number)" title="211 (number)">211</a></li> <li><a href="/wiki/223_(number)" title="223 (number)">223</a></li> <li><a href="/wiki/227_(number)" title="227 (number)">227</a></li> <li><a href="/wiki/229_(number)" title="229 (number)">229</a></li> <li><a href="/wiki/233_(number)" title="233 (number)">233</a></li> <li><a href="/wiki/239_(number)" title="239 (number)">239</a></li> <li><a href="/wiki/241_(number)" title="241 (number)">241</a></li> <li><a href="/wiki/251_(number)" title="251 (number)">251</a></li> <li><a href="/wiki/257_(number)" title="257 (number)">257</a></li> <li><a href="/wiki/263_(number)" title="263 (number)">263</a></li> <li><a href="/wiki/269_(number)" title="269 (number)">269</a></li> <li><a href="/wiki/271_(number)" title="271 (number)">271</a></li> <li><a href="/wiki/277_(number)" title="277 (number)">277</a></li> <li><a href="/wiki/281_(number)" title="281 (number)">281</a></li></ul> </div></td></tr><tr><td class="navbox-abovebelow hlist" colspan="2"><div><a href="/wiki/List_of_prime_numbers" title="List of prime numbers">List of prime numbers</a></div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐6b7f745dd4‐bb444 Cached time: 20241125133903 Cache expiry: 37261 Reduced expiry: true Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.556 seconds Real time usage: 0.787 seconds Preprocessor visited node count: 4113/1000000 Post‐expand include size: 92451/2097152 bytes Template argument size: 5185/2097152 bytes Highest expansion depth: 15/100 Expensive parser function count: 2/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 85418/5000000 bytes Lua time usage: 0.294/10.000 seconds Lua memory usage: 6538930/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 499.378 1 -total 42.36% 211.527 1 Template:Reflist 35.63% 177.941 18 Template:Citation 26.20% 130.855 2 Template:Navbox 25.33% 126.512 1 Template:Prime_number_classes 14.65% 73.183 1 Template:Short_description 9.80% 48.934 2 Template:Pagetype 6.85% 34.186 2 Template:Harvtxt 5.85% 29.232 30 Template:Math 3.54% 17.674 34 Template:Main_other --> <!-- Saved in parser cache with key enwiki:pcache:idhash:509009-0!canonical and timestamp 20241125133903 and revision id 1251704784. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Formula_for_primes&oldid=1251704784">https://en.wikipedia.org/w/index.php?title=Formula_for_primes&oldid=1251704784</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Category</a>: <ul><li><a href="/wiki/Category:Prime_numbers" title="Category:Prime numbers">Prime numbers</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_is_different_from_Wikidata" title="Category:Short description is different from Wikidata">Short description is different from Wikidata</a></li><li><a href="/wiki/Category:Articles_containing_potentially_dated_statements_from_2020" title="Category:Articles containing potentially dated statements from 2020">Articles containing potentially dated statements from 2020</a></li><li><a href="/wiki/Category:All_articles_containing_potentially_dated_statements" title="Category:All articles containing potentially dated statements">All articles containing potentially dated statements</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 17 October 2024, at 16:18<span class="anonymous-show"> (UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Formula_for_primes&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-694cf4987f-snwg7","wgBackendResponseTime":129,"wgPageParseReport":{"limitreport":{"cputime":"0.556","walltime":"0.787","ppvisitednodes":{"value":4113,"limit":1000000},"postexpandincludesize":{"value":92451,"limit":2097152},"templateargumentsize":{"value":5185,"limit":2097152},"expansiondepth":{"value":15,"limit":100},"expensivefunctioncount":{"value":2,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":85418,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 499.378 1 -total"," 42.36% 211.527 1 Template:Reflist"," 35.63% 177.941 18 Template:Citation"," 26.20% 130.855 2 Template:Navbox"," 25.33% 126.512 1 Template:Prime_number_classes"," 14.65% 73.183 1 Template:Short_description"," 9.80% 48.934 2 Template:Pagetype"," 6.85% 34.186 2 Template:Harvtxt"," 5.85% 29.232 30 Template:Math"," 3.54% 17.674 34 Template:Main_other"]},"scribunto":{"limitreport-timeusage":{"value":"0.294","limit":"10.000"},"limitreport-memusage":{"value":6538930,"limit":52428800},"limitreport-logs":"anchor_id_list = table#1 {\n [\"CITEREFBaillie2017\"] = 1,\n [\"CITEREFCaldwellCheng2005\"] = 1,\n [\"CITEREFDudley1983\"] = 1,\n [\"CITEREFE._M._Wright1951\"] = 1,\n [\"CITEREFElsholtz2020\"] = 1,\n [\"CITEREFFridmanGarbulskyGlecerGrime2019\"] = 1,\n [\"CITEREFGoodsteinWormell1967\"] = 1,\n [\"CITEREFJones1982\"] = 1,\n [\"CITEREFJonesSatoWadaWiens1976\"] = 1,\n [\"CITEREFMackinnon1987\"] = 1,\n [\"CITEREFMatiyasevich1999\"] = 1,\n [\"CITEREFMills1947\"] = 1,\n [\"CITEREFNeillSinger1965\"] = 1,\n [\"CITEREFRegimbal1975\"] = 1,\n [\"CITEREFRowland2008\"] = 1,\n [\"CITEREFSimon_Plouffe2019\"] = 1,\n [\"CITEREFSteckles2019\"] = 1,\n [\"CITEREFTóth2017\"] = 1,\n [\"CITEREFWilf1982\"] = 1,\n [\"CITEREFWillans1964\"] = 1,\n}\ntemplate_list = table#1 {\n [\"As of\"] = 1,\n [\"Citation\"] = 18,\n [\"Cite arXiv\"] = 2,\n [\"EquationNote\"] = 3,\n [\"EquationRef\"] = 1,\n [\"Harvs\"] = 1,\n [\"Harvtxt\"] = 2,\n [\"MathWorld2\"] = 1,\n [\"NumBlk\"] = 1,\n [\"OEIS\"] = 5,\n [\"Prime number classes\"] = 1,\n [\"Reflist\"] = 1,\n [\"Short description\"] = 1,\n}\narticle_whitelist = table#1 {\n}\n"},"cachereport":{"origin":"mw-web.codfw.main-6b7f745dd4-bb444","timestamp":"20241125133903","ttl":37261,"transientcontent":true}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Formula for primes","url":"https:\/\/en.wikipedia.org\/wiki\/Formula_for_primes","sameAs":"http:\/\/www.wikidata.org\/entity\/Q1136501","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q1136501","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2004-03-06T22:39:32Z","dateModified":"2024-10-17T16:18:30Z","headline":"formula whose values are exactly the prime numbers"}</script> </body> </html>