CINXE.COM
Lucas pseudoprime - 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>Lucas pseudoprime - 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":"705109ca-82d7-4c0d-966d-96af02feef41","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Lucas_pseudoprime","wgTitle":"Lucas pseudoprime","wgCurRevisionId":1186908652,"wgRevisionId":1186908652,"wgArticleId":1055370,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with short description","Short description matches Wikidata","Fibonacci numbers","Pseudoprimes"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Lucas_pseudoprime","wgRelevantArticleId":1055370,"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":30000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q3343106","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.cite.styles":"ready","ext.math.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","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","mmv.bootstrap","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.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="Lucas pseudoprime - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Lucas_pseudoprime"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Lucas_pseudoprime&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/Lucas_pseudoprime"> <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-Lucas_pseudoprime rootpage-Lucas_pseudoprime 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=Lucas+pseudoprime" 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=Lucas+pseudoprime" 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=Lucas+pseudoprime" 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=Lucas+pseudoprime" 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-Baillie-Wagstaff-Lucas_pseudoprimes" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Baillie-Wagstaff-Lucas_pseudoprimes"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Baillie-Wagstaff-Lucas pseudoprimes</span> </div> </a> <ul id="toc-Baillie-Wagstaff-Lucas_pseudoprimes-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Lucas_probable_primes_and_pseudoprimes" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Lucas_probable_primes_and_pseudoprimes"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Lucas probable primes and pseudoprimes</span> </div> </a> <ul id="toc-Lucas_probable_primes_and_pseudoprimes-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Strong_Lucas_pseudoprimes" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Strong_Lucas_pseudoprimes"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Strong Lucas pseudoprimes</span> </div> </a> <ul id="toc-Strong_Lucas_pseudoprimes-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Implementing_a_Lucas_probable_prime_test" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Implementing_a_Lucas_probable_prime_test"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Implementing a Lucas probable prime test</span> </div> </a> <button aria-controls="toc-Implementing_a_Lucas_probable_prime_test-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Implementing a Lucas probable prime test subsection</span> </button> <ul id="toc-Implementing_a_Lucas_probable_prime_test-sublist" class="vector-toc-list"> <li id="toc-Checking_additional_congruence_conditions" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Checking_additional_congruence_conditions"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>Checking additional congruence conditions</span> </div> </a> <ul id="toc-Checking_additional_congruence_conditions-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Comparison_with_the_Miller–Rabin_primality_test" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Comparison_with_the_Miller–Rabin_primality_test"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Comparison with the Miller–Rabin primality test</span> </div> </a> <ul id="toc-Comparison_with_the_Miller–Rabin_primality_test-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Fibonacci_pseudoprimes" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Fibonacci_pseudoprimes"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Fibonacci pseudoprimes</span> </div> </a> <ul id="toc-Fibonacci_pseudoprimes-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Pell_pseudoprimes" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Pell_pseudoprimes"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>Pell pseudoprimes</span> </div> </a> <ul id="toc-Pell_pseudoprimes-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">8</span> <span>References</span> </div> </a> <ul id="toc-References-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">9</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">Lucas pseudoprime</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 3 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-3" 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">3 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/N%C3%BAmero_pseudoprimo_de_Lucas" title="Número pseudoprimo de Lucas – Spanish" lang="es" hreflang="es" data-title="Número pseudoprimo de Lucas" 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-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E3%83%AA%E3%83%A5%E3%82%AB%E6%93%AC%E7%B4%A0%E6%95%B0" title="リュカ擬素数 – Japanese" lang="ja" hreflang="ja" data-title="リュカ擬素数" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%9F%D1%81%D0%B5%D0%B2%D0%B4%D0%BE%D0%BF%D1%80%D0%BE%D1%81%D1%82%D0%BE%D0%B5_%D1%87%D0%B8%D1%81%D0%BB%D0%BE_%D0%9B%D1%8E%D0%BA%D0%B0" title="Псевдопростое число Люка – Russian" lang="ru" hreflang="ru" data-title="Псевдопростое число Люка" data-language-autonym="Русский" data-language-local-name="Russian" 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/Q3343106#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/Lucas_pseudoprime" 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:Lucas_pseudoprime" 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/Lucas_pseudoprime"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Lucas_pseudoprime&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=Lucas_pseudoprime&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/Lucas_pseudoprime"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Lucas_pseudoprime&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=Lucas_pseudoprime&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/Lucas_pseudoprime" 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/Lucas_pseudoprime" 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=Lucas_pseudoprime&oldid=1186908652" 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=Lucas_pseudoprime&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=Lucas_pseudoprime&id=1186908652&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%2FLucas_pseudoprime"><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%2FLucas_pseudoprime"><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=Lucas_pseudoprime&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=Lucas_pseudoprime&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/Q3343106" 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">Probabilistic test for the primality of an integer</div> <p><b>Lucas pseudoprimes</b> and <b>Fibonacci pseudoprimes</b> are <a href="/wiki/Composite_number" title="Composite number">composite</a> integers that pass certain tests which all <a href="/wiki/Prime_number" title="Prime number">primes</a> and very few composite numbers pass: in this case, criteria relative to some <a href="/wiki/Lucas_sequence" title="Lucas sequence">Lucas sequence</a>. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Baillie-Wagstaff-Lucas_pseudoprimes">Baillie-Wagstaff-Lucas pseudoprimes</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Lucas_pseudoprime&action=edit&section=1" title="Edit section: Baillie-Wagstaff-Lucas pseudoprimes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Baillie and Wagstaff define Lucas pseudoprimes as follows:<sup id="cite_ref-lpsp_1-0" class="reference"><a href="#cite_note-lpsp-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> Given integers <i>P</i> and <i>Q</i>, where <i>P</i> > 0 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 D=P^{2}-4Q}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>D</mi> <mo>=</mo> <msup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>4</mn> <mi>Q</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle D=P^{2}-4Q}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ab28c050150ad67de72802cc6e9decdac0aec5bf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:13.74ex; height:3.009ex;" alt="{\displaystyle D=P^{2}-4Q}"></span>, let <i>U<sub>k</sub></i>(<i>P</i>, <i>Q</i>) and <i>V<sub>k</sub></i>(<i>P</i>, <i>Q</i>) be the corresponding <a href="/wiki/Lucas_sequence" title="Lucas sequence">Lucas sequences</a>. </p><p>Let <i>n</i> be a positive integer and let <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({\tfrac {D}{n}}\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>D</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left({\tfrac {D}{n}}\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/adb8d4c384baa22342ac7fc1692febaba8ff11f0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:4.972ex; height:4.843ex;" alt="{\displaystyle \left({\tfrac {D}{n}}\right)}"></span> be the <a href="/wiki/Jacobi_symbol" title="Jacobi symbol">Jacobi symbol</a>. We define </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 \delta (n)=n-\left({\tfrac {D}{n}}\right).}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>δ<!-- δ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>n</mi> <mo>−<!-- − --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>D</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \delta (n)=n-\left({\tfrac {D}{n}}\right).}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3d887acec14ed06cf23326acf9942039416d405e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:17.592ex; height:4.843ex;" alt="{\displaystyle \delta (n)=n-\left({\tfrac {D}{n}}\right).}"></span></dd></dl> <p>If <i>n</i> is a <a href="/wiki/Prime_number" title="Prime number">prime</a> that does not divide <i>Q</i>, then the following congruence condition holds: </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 U_{\delta (n)}\equiv 0{\pmod {n}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>δ<!-- δ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> </mrow> </msub> <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>n</mi> <mo stretchy="false">)</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle U_{\delta (n)}\equiv 0{\pmod {n}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/54ae013a9e2a1a7240d16c58bc50e85700b417cb" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:20.813ex; height:3.176ex;" alt="{\displaystyle U_{\delta (n)}\equiv 0{\pmod {n}}.}"></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>If this congruence does <i>not</i> hold, then <i>n</i> is <i>not</i> prime. If <i>n</i> is <i>composite</i>, then this congruence <i>usually</i> does not hold.<sup id="cite_ref-lpsp_1-1" class="reference"><a href="#cite_note-lpsp-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> These are the key facts that make Lucas sequences useful in <a href="/wiki/Primality_test" title="Primality test">primality testing</a>. </p><p>The congruence (<b><a href="#math_1">1</a></b>) represents one of two congruences defining a <a href="/wiki/Frobenius_pseudoprime" title="Frobenius pseudoprime">Frobenius pseudoprime</a>. Hence, every Frobenius pseudoprime is also a Baillie-Wagstaff-Lucas pseudoprime, but the converse does not always hold. </p><p>Some good references are chapter 8 of the book by Bressoud and Wagon (with <a href="/wiki/Mathematica" class="mw-redirect" title="Mathematica">Mathematica</a> code),<sup id="cite_ref-Bressoud_2-0" class="reference"><a href="#cite_note-Bressoud-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> pages 142–152 of the book by Crandall and Pomerance,<sup id="cite_ref-CrandallPomerance_3-0" class="reference"><a href="#cite_note-CrandallPomerance-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> and pages 53–74 of the book by Ribenboim.<sup id="cite_ref-Ribenboim_4-0" class="reference"><a href="#cite_note-Ribenboim-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Lucas_probable_primes_and_pseudoprimes">Lucas probable primes and pseudoprimes</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Lucas_pseudoprime&action=edit&section=2" title="Edit section: Lucas probable primes and pseudoprimes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A <b>Lucas probable prime</b> for a given (<i>P, Q</i>) pair is <i>any</i> positive integer <i>n</i> for which equation (<b><a href="#math_1">1</a></b>) above is true (see,<sup id="cite_ref-lpsp_1-2" class="reference"><a href="#cite_note-lpsp-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> page 1398). </p><p>A <b>Lucas pseudoprime</b> for a given (<i>P, Q</i>) pair is a positive <i>composite</i> integer <i>n</i> for which equation (<b><a href="#math_1">1</a></b>) is true (see,<sup id="cite_ref-lpsp_1-3" class="reference"><a href="#cite_note-lpsp-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> page 1391). </p><p>A Lucas probable prime test is most useful if <i>D</i> is chosen such that the Jacobi symbol <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({\tfrac {D}{n}}\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>D</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left({\tfrac {D}{n}}\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/adb8d4c384baa22342ac7fc1692febaba8ff11f0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:4.972ex; height:4.843ex;" alt="{\displaystyle \left({\tfrac {D}{n}}\right)}"></span> is −1 (see pages 1401–1409 of,<sup id="cite_ref-lpsp_1-4" class="reference"><a href="#cite_note-lpsp-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> page 1024 of, <sup id="cite_ref-PSW_5-0" class="reference"><a href="#cite_note-PSW-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> or pages 266–269 of <sup id="cite_ref-Bressoud_2-1" class="reference"><a href="#cite_note-Bressoud-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> ). This is especially important when combining a Lucas test with a <a href="/wiki/Strong_pseudoprime" title="Strong pseudoprime">strong pseudoprime</a> test, such as the <a href="/wiki/Baillie%E2%80%93PSW_primality_test" title="Baillie–PSW primality test">Baillie–PSW primality test</a>. Typically implementations will use a parameter selection method that ensures this condition (e.g. the Selfridge method recommended in <sup id="cite_ref-lpsp_1-5" class="reference"><a href="#cite_note-lpsp-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> and described below). </p><p>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 \left({\tfrac {D}{n}}\right)=-1,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>D</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mo>−<!-- − --></mo> <mn>1</mn> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left({\tfrac {D}{n}}\right)=-1,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/43af79cc497ac0f95b43ec2e5d596bad7eba1147" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:11.688ex; height:4.843ex;" alt="{\displaystyle \left({\tfrac {D}{n}}\right)=-1,}"></span> then equation (<b><a href="#math_1">1</a></b>) becomes </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 U_{n+1}\equiv 0{\pmod {n}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> <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>n</mi> <mo stretchy="false">)</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle U_{n+1}\equiv 0{\pmod {n}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/68737f7d59ad7238a7b949510ae7f71b76704cbf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:20.893ex; height:2.843ex;" alt="{\displaystyle U_{n+1}\equiv 0{\pmod {n}}.}"></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_2" class="reference nourlexpansion" style="font-weight:bold;">2</span>)</b></td></tr></tbody></table> <p>If congruence (<b><a href="#math_2">2</a></b>) is false, this constitutes a proof that <i>n</i> is composite. </p><p>If congruence (<b><a href="#math_2">2</a></b>) is true, then <i>n</i> is a Lucas probable prime. In this case, either <i>n</i> is prime or it is a Lucas pseudoprime. If congruence (<b><a href="#math_2">2</a></b>) is true, then <i>n</i> is <i>likely</i> to be prime (this justifies the term <b>probable</b> prime), but this does not <i>prove</i> that <i>n</i> is prime. As is the case with any other probabilistic primality test, if we perform additional Lucas tests with different <i>D</i>, <i>P</i> and <i>Q</i>, then unless one of the tests proves that <i>n</i> is composite, we gain more confidence that <i>n</i> is prime. </p><p>Examples: If <i>P</i> = 3, <i>Q</i> = −1, and <i>D</i> = 13, the sequence of <i>U'</i>s is <span class="nowrap external"><a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>: <a href="//oeis.org/A006190" class="extiw" title="oeis:A006190">A006190</a></span>: <i>U<sub>0</sub></i> = 0, <i>U<sub>1</sub></i> = 1, <i>U<sub>2</sub></i> = 3, <i>U<sub>3</sub></i> = 10, etc. </p><p>First, let <i>n</i> = 19. The Jacobi symbol <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({\tfrac {13}{19}}\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>13</mn> <mn>19</mn> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left({\tfrac {13}{19}}\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0124806b00084de8be29b4eed12f79a0db460472" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:5.256ex; height:4.843ex;" alt="{\displaystyle \left({\tfrac {13}{19}}\right)}"></span> is −1, so δ(<i>n</i>) = 20, <i>U<sub>20</sub></i> = 6616217487 = 19·348221973 and we have </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 U_{20}=6616217487\equiv 0{\pmod {19}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>20</mn> </mrow> </msub> <mo>=</mo> <mn>6616217487</mn> <mo>≡<!-- ≡ --></mo> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <mspace width="1em" /> <mo stretchy="false">(</mo> <mi>mod</mi> <mspace width="0.333em" /> <mn>19</mn> <mo stretchy="false">)</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle U_{20}=6616217487\equiv 0{\pmod {19}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5618eaabc177f261ee353f168d8a4ea25654b69e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:35.103ex; height:2.843ex;" alt="{\displaystyle U_{20}=6616217487\equiv 0{\pmod {19}}.}"></span></dd></dl> <p>Therefore, 19 is a Lucas probable prime for this (<i>P, Q</i>) pair. In this case 19 is prime, so it is <i>not</i> a Lucas pseudoprime. </p><p>For the next example, let <i>n</i> = 119. We have <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({\tfrac {13}{119}}\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>13</mn> <mn>119</mn> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left({\tfrac {13}{119}}\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e2dfca361ac063280127f48b64455051405f1cbe" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:6.078ex; height:4.843ex;" alt="{\displaystyle \left({\tfrac {13}{119}}\right)}"></span> = −1, and we can compute </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 U_{120}\equiv 0{\pmod {119}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>120</mn> </mrow> </msub> <mo>≡<!-- ≡ --></mo> <mn>0</mn> <mrow class="MJX-TeXAtom-ORD"> <mspace width="1em" /> <mo stretchy="false">(</mo> <mi>mod</mi> <mspace width="0.333em" /> <mn>119</mn> <mo stretchy="false">)</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle U_{120}\equiv 0{\pmod {119}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f80cf585f925bc244e24628cf325fdeb708f0a1f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:22.365ex; height:2.843ex;" alt="{\displaystyle U_{120}\equiv 0{\pmod {119}}.}"></span></dd></dl> <p>However, 119 = 7·17 is not prime, so 119 is a Lucas <i>pseudoprime</i> for this (<i>P, Q</i>) pair. In fact, 119 is the smallest pseudoprime for <i>P</i> = 3, <i>Q</i> = −1. </p><p>We will see <a class="mw-selflink-fragment" href="#Implementing_a_Lucas_probable_prime_test">below</a> that, in order to check equation (<b><a href="#math_2">2</a></b>) for a given <i>n</i>, we do <i>not</i> need to compute all of the first <i>n</i> + 1 terms in the <i>U</i> sequence. </p><p>Let <i>Q</i> = −1, the smallest Lucas pseudoprime to <i>P</i> = 1, 2, 3, ... are </p> <dl><dd>323, 35, 119, 9, 9, 143, 25, 33, 9, 15, 123, 35, 9, 9, 15, 129, 51, 9, 33, 15, 21, 9, 9, 49, 15, 39, 9, 35, 49, 15, 9, 9, 33, 51, 15, 9, 35, 85, 39, 9, 9, 21, 25, 51, 9, 143, 33, 119, 9, 9, 51, 33, 95, 9, 15, 301, 25, 9, 9, 15, 49, 155, 9, 399, 15, 33, 9, 9, 49, 15, 119, 9, ...</dd></dl> <div class="mw-heading mw-heading2"><h2 id="Strong_Lucas_pseudoprimes">Strong Lucas pseudoprimes</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Lucas_pseudoprime&action=edit&section=3" title="Edit section: Strong Lucas pseudoprimes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Now, factor <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 \delta (n)=n-\left({\tfrac {D}{n}}\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>δ<!-- δ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>n</mi> <mo>−<!-- − --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>D</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \delta (n)=n-\left({\tfrac {D}{n}}\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/59ee3f5663dc5a4023820d5ec7c38395c2385c61" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:16.559ex; height:4.843ex;" alt="{\displaystyle \delta (n)=n-\left({\tfrac {D}{n}}\right)}"></span> into the form <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\cdot 2^{s}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>d</mi> <mo>⋅<!-- ⋅ --></mo> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>s</mi> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle d\cdot 2^{s}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/53804771c4e37c177796d60e19f5943f5b96513e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.061ex; height:2.343ex;" alt="{\displaystyle d\cdot 2^{s}}"></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 d}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>d</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle d}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e85ff03cbe0c7341af6b982e47e9f90d235c66ab" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.216ex; height:2.176ex;" alt="{\displaystyle d}"></span> is odd. </p><p>A <b>strong Lucas pseudoprime</b> for a given (<i>P, Q</i>) pair is an odd composite number <i>n</i> with GCD(<i>n, D</i>) = 1, satisfying one of the conditions </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 U_{d}\equiv 0{\pmod {n}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>d</mi> </mrow> </msub> <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>n</mi> <mo stretchy="false">)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle U_{d}\equiv 0{\pmod {n}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7f2e76738d311edb4bf44570051dc395ab172070" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.019ex; height:2.843ex;" alt="{\displaystyle U_{d}\equiv 0{\pmod {n}}}"></span></dd></dl> <p>or </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 V_{d\cdot 2^{r}}\equiv 0{\pmod {n}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>d</mi> <mo>⋅<!-- ⋅ --></mo> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>r</mi> </mrow> </msup> </mrow> </msub> <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>n</mi> <mo stretchy="false">)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V_{d\cdot 2^{r}}\equiv 0{\pmod {n}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3dff5f3e352c8c00bae29c268faa0a58b55b20dd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.833ex; height:2.843ex;" alt="{\displaystyle V_{d\cdot 2^{r}}\equiv 0{\pmod {n}}}"></span></dd></dl> <p>for some 0 ≤ <i>r</i> < <i>s</i>; see page 1396 of.<sup id="cite_ref-lpsp_1-6" class="reference"><a href="#cite_note-lpsp-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> A strong Lucas pseudoprime is also a Lucas pseudoprime (for the same (<i>P, Q</i>) pair), but the converse is not necessarily true. Therefore, the <b>strong</b> test is a more stringent primality test than equation (<b><a href="#math_1">1</a></b>). </p><p>There are infinitely many strong Lucas pseudoprimes, and therefore, infinitely many Lucas pseudoprimes. Theorem 7 in <sup id="cite_ref-lpsp_1-7" class="reference"><a href="#cite_note-lpsp-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> states: Let <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b4dc73bf40314945ff376bd363916a738548d40a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.745ex; height:2.176ex;" alt="{\displaystyle P}"></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 Q}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Q</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8752c7023b4b3286800fe3238271bbca681219ed" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.838ex; height:2.509ex;" alt="{\displaystyle Q}"></span> be relatively prime positive integers for which <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}-4Q}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>4</mn> <mi>Q</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P^{2}-4Q}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b783e7431aa471d9f26cad4f9130f32c383050eb" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:8.717ex; height:3.009ex;" alt="{\displaystyle P^{2}-4Q}"></span> is positive but not a square. Then there is a positive 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 c}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>c</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle c}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/86a67b81c2de995bd608d5b2df50cd8cd7d92455" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.007ex; height:1.676ex;" alt="{\displaystyle c}"></span> (depending on <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b4dc73bf40314945ff376bd363916a738548d40a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.745ex; height:2.176ex;" alt="{\displaystyle P}"></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 Q}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Q</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8752c7023b4b3286800fe3238271bbca681219ed" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.838ex; height:2.509ex;" alt="{\displaystyle Q}"></span>) such that the number of strong Lucas pseudoprimes not exceeding <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 x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}"></span> is greater 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 c\cdot \log x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>c</mi> <mo>⋅<!-- ⋅ --></mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle c\cdot \log x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4b3318124611b19067157b58aa267ed7035615e5" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:7.374ex; height:2.509ex;" alt="{\displaystyle c\cdot \log x}"></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 x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}"></span> sufficiently large. </p><p>We can set <i>Q</i> = −1, 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 U_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle U_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/67b641ce10cb5e865397c4efe647cbffed98a024" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.806ex; height:2.509ex;" alt="{\displaystyle U_{n}}"></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 V_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3ebc5a637019ce3415183f06995aeeca93547767" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.574ex; height:2.509ex;" alt="{\displaystyle V_{n}}"></span> are <i>P</i>-Fibonacci sequence and <i>P</i>-Lucas sequence, the pseudoprimes can be called <b>strong Lucas pseudoprime in base <i>P</i></b>, for example, the least strong Lucas pseudoprime with <i>P</i> = 1, 2, 3, ... are 4181, 169, 119, ... </p><p>An <b>extra strong Lucas pseudoprime</b> <sup id="cite_ref-FrobeniusPSP_6-0" class="reference"><a href="#cite_note-FrobeniusPSP-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> is a strong Lucas pseudoprime for a set of parameters (<i>P</i>, <i>Q</i>) where <i>Q</i> = 1, satisfying one of the conditions </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 U_{d}\equiv 0{\pmod {n}}{\text{ and }}V_{d}\equiv \pm 2{\pmod {n}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>d</mi> </mrow> </msub> <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>n</mi> <mo stretchy="false">)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mtext> and </mtext> </mrow> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>d</mi> </mrow> </msub> <mo>≡<!-- ≡ --></mo> <mo>±<!-- ± --></mo> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mspace width="1em" /> <mo stretchy="false">(</mo> <mi>mod</mi> <mspace width="0.333em" /> <mi>n</mi> <mo stretchy="false">)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle U_{d}\equiv 0{\pmod {n}}{\text{ and }}V_{d}\equiv \pm 2{\pmod {n}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/33466fbe4c22bfc4ca8eeaf2a5376dd48afb53b8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:42.523ex; height:2.843ex;" alt="{\displaystyle U_{d}\equiv 0{\pmod {n}}{\text{ and }}V_{d}\equiv \pm 2{\pmod {n}}}"></span></dd></dl> <p>or </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 V_{d\cdot 2^{r}}\equiv 0{\pmod {n}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>d</mi> <mo>⋅<!-- ⋅ --></mo> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>r</mi> </mrow> </msup> </mrow> </msub> <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>n</mi> <mo stretchy="false">)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V_{d\cdot 2^{r}}\equiv 0{\pmod {n}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3dff5f3e352c8c00bae29c268faa0a58b55b20dd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.833ex; height:2.843ex;" alt="{\displaystyle V_{d\cdot 2^{r}}\equiv 0{\pmod {n}}}"></span></dd></dl> <p>for some <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 0\leq r<s-1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>0</mn> <mo>≤<!-- ≤ --></mo> <mi>r</mi> <mo><</mo> <mi>s</mi> <mo>−<!-- − --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0\leq r<s-1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b4486aa4652f79faad348215348c305702d73911" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:13.501ex; height:2.343ex;" alt="{\displaystyle 0\leq r<s-1}"></span>. An extra strong Lucas pseudoprime is also a strong Lucas pseudoprime for the same <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,Q)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>P</mi> <mo>,</mo> <mi>Q</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (P,Q)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f7854fbffaf21cef2fd7219d7b2413ea3961fdf4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.427ex; height:2.843ex;" alt="{\displaystyle (P,Q)}"></span> pair. </p> <div class="mw-heading mw-heading2"><h2 id="Implementing_a_Lucas_probable_prime_test">Implementing a Lucas probable prime test</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Lucas_pseudoprime&action=edit&section=4" title="Edit section: Implementing a Lucas probable prime test"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Before embarking on a probable prime test, one usually verifies that <i>n</i>, the number to be tested for primality, is odd, is not a perfect square, and is not divisible by any small prime less than some convenient limit. Perfect squares are easy to detect using <a href="/wiki/Newton%27s_method" title="Newton's method">Newton's method</a> for square roots. </p><p>We choose a Lucas sequence where the Jacobi symbol <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({\tfrac {D}{n}}\right)=-1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>D</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mo>−<!-- − --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left({\tfrac {D}{n}}\right)=-1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6c0cd9e988f839530bccab25126e9f3e7a2389d4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:11.041ex; height:4.843ex;" alt="{\displaystyle \left({\tfrac {D}{n}}\right)=-1}"></span>, so that δ(<i>n</i>) = <i>n</i> + 1. </p><p>Given <i>n</i>, one technique for choosing <i>D</i> is to use trial and error to find the first <i>D</i> in the sequence 5, −7, 9, −11, ... such 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 \left({\tfrac {D}{n}}\right)=-1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>D</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mo>−<!-- − --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left({\tfrac {D}{n}}\right)=-1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6c0cd9e988f839530bccab25126e9f3e7a2389d4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:11.041ex; height:4.843ex;" alt="{\displaystyle \left({\tfrac {D}{n}}\right)=-1}"></span>. Note 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 \left({\tfrac {k}{n}}\right)\left({\tfrac {-k}{n}}\right)=-1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>k</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mrow> <mo>−<!-- − --></mo> <mi>k</mi> </mrow> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mo>−<!-- − --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left({\tfrac {k}{n}}\right)\left({\tfrac {-k}{n}}\right)=-1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f2023860b81cfd08e2226c000d594120cf6e486a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:16.801ex; height:4.843ex;" alt="{\displaystyle \left({\tfrac {k}{n}}\right)\left({\tfrac {-k}{n}}\right)=-1}"></span>. (If <i>D</i> and <i>n</i> have a prime factor in common, 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({\tfrac {D}{n}}\right)=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>D</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left({\tfrac {D}{n}}\right)=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/721f393ab85d159076cc027207102d09aa5d55b0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:9.233ex; height:4.843ex;" alt="{\displaystyle \left({\tfrac {D}{n}}\right)=0}"></span>). With this sequence of <i>D</i> values, the average number of <i>D</i> values that must be tried before we encounter one whose Jacobi symbol is −1 is about 1.79; see,<sup id="cite_ref-lpsp_1-8" class="reference"><a href="#cite_note-lpsp-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> p. 1416. Once we have <i>D</i>, we set <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b9696db6b3b4bfa480c0e65afdce676adee20d95" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.006ex; height:2.176ex;" alt="{\displaystyle P=1}"></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 Q=(1-D)/4}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Q</mi> <mo>=</mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mi>D</mi> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>4</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q=(1-D)/4}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7f9af3aeabe50f8c35373f629838885eb55e43a3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:14.998ex; height:2.843ex;" alt="{\displaystyle Q=(1-D)/4}"></span>. It is a good idea to check that <i>n</i> has no prime factors in common with <i>P</i> or <i>Q</i>. This method of choosing <i>D</i>, <i>P</i>, and <i>Q</i> was suggested by <a href="/wiki/John_Selfridge" title="John Selfridge">John Selfridge</a>. </p><p>(This search will never succeed if <i>n</i> is square, and conversely if it does succeed, that is proof that <i>n</i> is not square. Thus, some time can be saved by delaying testing <i>n</i> for squareness until after the first few search steps have all failed.) </p><p>Given <i>D</i>, <i>P</i>, and <i>Q</i>, there are recurrence relations that enable us to quickly compute <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 U_{n+1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle U_{n+1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ae783ccf00292b5772f704602489d7bda4d34c93" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:4.906ex; height:2.509ex;" alt="{\displaystyle U_{n+1}}"></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 V_{n+1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V_{n+1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f1b305168031902752850d581ec22f2f51ea987f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:4.674ex; height:2.509ex;" alt="{\displaystyle V_{n+1}}"></span> in <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 O(\log _{2}n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>O</mi> <mo stretchy="false">(</mo> <msub> <mi>log</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle O(\log _{2}n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0e824c97b7cd8f640405ea270754b75f3283e1ea" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.39ex; height:2.843ex;" alt="{\displaystyle O(\log _{2}n)}"></span> steps; see <a href="/wiki/Lucas_sequence#Other_relations" title="Lucas sequence">Lucas sequence § Other relations</a>. To start off, </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 U_{1}=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle U_{1}=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/01169a5c106e6c69705d7422d5f256eb04f769e1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.903ex; height:2.509ex;" alt="{\displaystyle U_{1}=1}"></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 V_{1}=P=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>=</mo> <mi>P</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V_{1}=P=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6df003cff99194ec2dc5af264c412dee8270e626" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:11.514ex; height:2.509ex;" alt="{\displaystyle V_{1}=P=1}"></span></dd></dl> <p>First, we can double the subscript from <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>k</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle k}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c3c9a2c7b599b37105512c5d570edc034056dd40" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}"></span> to <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 2k}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>2</mn> <mi>k</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 2k}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ab358eb7defb4d2b0fc1f9e8a4e2d189fe600eb6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.374ex; height:2.176ex;" alt="{\displaystyle 2k}"></span> in one step using the recurrence relations </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 U_{2k}=U_{k}\cdot V_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> <mi>k</mi> </mrow> </msub> <mo>=</mo> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle U_{2k}=U_{k}\cdot V_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/44a83c57b951f9dd4de1d8292ffee3a5c20ca6de" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:13.396ex; height:2.509ex;" alt="{\displaystyle U_{2k}=U_{k}\cdot V_{k}}"></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 V_{2k}=V_{k}^{2}-2Q^{k}={\frac {V_{k}^{2}+DU_{k}^{2}}{2}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> <mi>k</mi> </mrow> </msub> <mo>=</mo> <msubsup> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>−<!-- − --></mo> <mn>2</mn> <msup> <mi>Q</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msubsup> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>+</mo> <mi>D</mi> <msubsup> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> </mrow> <mn>2</mn> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V_{2k}=V_{k}^{2}-2Q^{k}={\frac {V_{k}^{2}+DU_{k}^{2}}{2}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b359224405349c09c4d0a030efb2e63a3dd16ef6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:30.831ex; height:6.009ex;" alt="{\displaystyle V_{2k}=V_{k}^{2}-2Q^{k}={\frac {V_{k}^{2}+DU_{k}^{2}}{2}}}"></span>.</dd></dl> <p>Next, we can increase the subscript by 1 using the recurrences </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 U_{2k+1}=(P\cdot U_{2k}+V_{2k})/2}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> <mi>k</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> <mo>=</mo> <mo stretchy="false">(</mo> <mi>P</mi> <mo>⋅<!-- ⋅ --></mo> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> <mi>k</mi> </mrow> </msub> <mo>+</mo> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>2</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle U_{2k+1}=(P\cdot U_{2k}+V_{2k})/2}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3302f6a1d455d8ecbdf5df278cbabbd79f4265f0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:25.86ex; height:2.843ex;" alt="{\displaystyle U_{2k+1}=(P\cdot U_{2k}+V_{2k})/2}"></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 V_{2k+1}=(D\cdot U_{2k}+P\cdot V_{2k})/2}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> <mi>k</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> <mo>=</mo> <mo stretchy="false">(</mo> <mi>D</mi> <mo>⋅<!-- ⋅ --></mo> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> <mi>k</mi> </mrow> </msub> <mo>+</mo> <mi>P</mi> <mo>⋅<!-- ⋅ --></mo> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>2</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V_{2k+1}=(D\cdot U_{2k}+P\cdot V_{2k})/2}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ce9c314a2c38ebaa3d928cae8de1184a55f59bc7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:29.232ex; height:2.843ex;" alt="{\displaystyle V_{2k+1}=(D\cdot U_{2k}+P\cdot V_{2k})/2}"></span>.</dd></dl> <p>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 P\cdot U_{2k}+V_{2k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mo>⋅<!-- ⋅ --></mo> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> <mi>k</mi> </mrow> </msub> <mo>+</mo> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P\cdot U_{2k}+V_{2k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f8cee34d686fb3c645344b6f712f97b8c1b2b480" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:13.029ex; height:2.509ex;" alt="{\displaystyle P\cdot U_{2k}+V_{2k}}"></span> is odd, replace it 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 P\cdot U_{2k}+V_{2k}+n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mo>⋅<!-- ⋅ --></mo> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> <mi>k</mi> </mrow> </msub> <mo>+</mo> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> <mi>k</mi> </mrow> </msub> <mo>+</mo> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P\cdot U_{2k}+V_{2k}+n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b390bbeb6bccdef25b2e34f93dd549bb8e005ed2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:17.264ex; height:2.509ex;" alt="{\displaystyle P\cdot U_{2k}+V_{2k}+n}"></span>; this is even so it can now be divided by 2. The numerator 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 V_{2k+1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> <mi>k</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V_{2k+1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/79c273944ed83f46ab69839333723dfe5002e335" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.366ex; height:2.509ex;" alt="{\displaystyle V_{2k+1}}"></span> is handled in the same way. (Adding <i>n</i> does not change the result <a href="/wiki/Modular_arithmetic" title="Modular arithmetic">modulo</a> <i>n</i>.) Observe that, for each term that we compute in the <i>U</i> sequence, we compute the corresponding term in the <i>V</i> sequence. As we proceed, we also compute the same, corresponding powers of <i>Q</i>. </p><p>At each stage, we reduce <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 U}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>U</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle U}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/458a728f53b9a0274f059cd695e067c430956025" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.783ex; height:2.176ex;" alt="{\displaystyle U}"></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 V}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>V</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/af0f6064540e84211d0ffe4dac72098adfa52845" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.787ex; height:2.176ex;" alt="{\displaystyle V}"></span>, and the power 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 Q}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Q</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8752c7023b4b3286800fe3238271bbca681219ed" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.838ex; height:2.509ex;" alt="{\displaystyle Q}"></span>, mod <i>n</i>. </p><p>We use the bits of the binary expansion of <i>n</i> to determine <i>which</i> terms in the <i>U</i> sequence to compute. For example, if <i>n</i>+1 = 44 (= 101100 in binary), then, taking the bits one at a time from left to right, we obtain the sequence of indices to compute: 1<sub>2</sub> = 1, 10<sub>2</sub> = 2, 100<sub>2</sub> = 4, 101<sub>2</sub> = 5, 1010<sub>2</sub> = 10, 1011<sub>2</sub> = 11, 10110<sub>2</sub> = 22, 101100<sub>2</sub> = 44. Therefore, we compute <i>U</i><sub>1</sub>, <i>U</i><sub>2</sub>, <i>U</i><sub>4</sub>, <i>U</i><sub>5</sub>, <i>U</i><sub>10</sub>, <i>U</i><sub>11</sub>, <i>U</i><sub>22</sub>, and <i>U</i><sub>44</sub>. We also compute the same-numbered terms in the <i>V</i> sequence, along with <i>Q</i><sup>1</sup>, <i>Q</i><sup>2</sup>, <i>Q</i><sup>4</sup>, <i>Q</i><sup>5</sup>, <i>Q</i><sup>10</sup>, <i>Q</i><sup>11</sup>, <i>Q</i><sup>22</sup>, and <i>Q</i><sup>44</sup>. </p><p>By the end of the calculation, we will have computed <i>U<sub>n+1</sub></i>, <i>V<sub>n+1</sub></i>, and <i>Q<sup>n+1</sup></i>, (mod <i>n</i>). We then check congruence (<b><a href="#math_2">2</a></b>) using our known value of <i>U<sub>n+1</sub></i>. </p><p>When <i>D</i>, <i>P</i>, and <i>Q</i> are chosen as described above, the first 10 Lucas pseudoprimes are (see page 1401 of <sup id="cite_ref-lpsp_1-9" class="reference"><a href="#cite_note-lpsp-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>): 323, 377, 1159, 1829, 3827, 5459, 5777, 9071, 9179, and 10877 (sequence <span class="nowrap external"><a href="//oeis.org/A217120" class="extiw" title="oeis:A217120">A217120</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>) </p><p>The <b>strong</b> versions of the Lucas test can be implemented in a similar way. </p><p>When <i>D</i>, <i>P</i>, and <i>Q</i> are chosen as described above, the first 10 <i>strong</i> Lucas pseudoprimes are: 5459, 5777, 10877, 16109, 18971, 22499, 24569, 25199, 40309, and 58519 (sequence <span class="nowrap external"><a href="//oeis.org/A217255" class="extiw" title="oeis:A217255">A217255</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>) </p><p>To calculate a list of <i>extra strong</i> Lucas pseudoprimes, set <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 Q=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Q</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6c23b2242b7a1ab108544a6403e76b803f1d0501" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.099ex; height:2.509ex;" alt="{\displaystyle Q=1}"></span>. Then try <i>P</i> = 3, 4, 5, 6, ..., until a 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 D=P^{2}-4Q}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>D</mi> <mo>=</mo> <msup> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>4</mn> <mi>Q</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle D=P^{2}-4Q}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ab28c050150ad67de72802cc6e9decdac0aec5bf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:13.74ex; height:3.009ex;" alt="{\displaystyle D=P^{2}-4Q}"></span> is found so that the Jacobi symbol <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({\tfrac {D}{n}}\right)=-1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>D</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mo>−<!-- − --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left({\tfrac {D}{n}}\right)=-1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6c0cd9e988f839530bccab25126e9f3e7a2389d4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:11.041ex; height:4.843ex;" alt="{\displaystyle \left({\tfrac {D}{n}}\right)=-1}"></span>. With this method for selecting <i>D</i>, <i>P</i>, and <i>Q</i>, the first 10 <i>extra strong</i> Lucas pseudoprimes are 989, 3239, 5777, 10877, 27971, 29681, 30739, 31631, 39059, and 72389 (sequence <span class="nowrap external"><a href="//oeis.org/A217719" class="extiw" title="oeis:A217719">A217719</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>) </p> <div class="mw-heading mw-heading3"><h3 id="Checking_additional_congruence_conditions">Checking additional congruence conditions</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Lucas_pseudoprime&action=edit&section=5" title="Edit section: Checking additional congruence conditions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>If we have checked that congruence (<b><a href="#math_2">2</a></b>) is true, there are additional congruence conditions we can check that have almost no additional computational cost. If <i>n</i> happens to be composite, these additional conditions may help discover that fact. </p><p>If <i>n</i> is an odd 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 \left({\tfrac {D}{n}}\right)=-1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>D</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mo>−<!-- − --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left({\tfrac {D}{n}}\right)=-1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6c0cd9e988f839530bccab25126e9f3e7a2389d4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:11.041ex; height:4.843ex;" alt="{\displaystyle \left({\tfrac {D}{n}}\right)=-1}"></span>, then we have the following (see equation 2 on page 1392 of <sup id="cite_ref-lpsp_1-10" class="reference"><a href="#cite_note-lpsp-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>): </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 V_{n+1}\equiv 2Q{\pmod {n}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> <mo>≡<!-- ≡ --></mo> <mn>2</mn> <mi>Q</mi> <mrow class="MJX-TeXAtom-ORD"> <mspace width="1em" /> <mo stretchy="false">(</mo> <mi>mod</mi> <mspace width="0.333em" /> <mi>n</mi> <mo stretchy="false">)</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V_{n+1}\equiv 2Q{\pmod {n}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/614e042439b800080dd47e8a3bf7fe5b2406ce37" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:22.499ex; height:2.843ex;" alt="{\displaystyle V_{n+1}\equiv 2Q{\pmod {n}}.}"></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_3" class="reference nourlexpansion" style="font-weight:bold;">3</span>)</b></td></tr></tbody></table> <p>Although this congruence condition is not, by definition, part of the Lucas probable prime test, it is almost free to check this condition because, as noted above, the value of <i>V<sub>n+1</sub></i> was computed in the process of computing <i>U<sub>n+1</sub></i>. </p><p>If either congruence (<b><a href="#math_2">2</a></b>) or (<b><a href="#math_3">3</a></b>) is false, this constitutes a proof that <i>n</i> is not prime. If <i>both</i> of these congruences are true, then it is even more likely that <i>n</i> is prime than if we had checked only congruence (<b><a href="#math_2">2</a></b>). </p><p>If Selfridge's method (above) for choosing <i>D</i>, <i>P</i>, and <i>Q</i> happened to set <i>Q</i> = −1, then we can adjust <i>P</i> and <i>Q</i> so that <i>D</i> 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({\tfrac {D}{n}}\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>D</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left({\tfrac {D}{n}}\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/adb8d4c384baa22342ac7fc1692febaba8ff11f0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:4.972ex; height:4.843ex;" alt="{\displaystyle \left({\tfrac {D}{n}}\right)}"></span> remain unchanged and <i>P</i> = <i>Q</i> = 5 (see <a href="/wiki/Lucas_sequence#Algebraic_relations" title="Lucas sequence">Lucas sequence-Algebraic relations</a>). If we use this enhanced method for choosing <i>P</i> and <i>Q</i>, then 913 = 11·83 is the <i>only</i> composite less than 10<sup>8</sup> for which congruence (<b><a href="#math_3">3</a></b>) is true (see page 1409 and Table 6 of;<sup id="cite_ref-lpsp_1-11" class="reference"><a href="#cite_note-lpsp-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>). More extensive calculations show that, with this method of choosing <i>D</i>, <i>P</i>, and <i>Q</i>, there are only five odd, composite numbers less than 10<sup>15</sup> for which congruence (<b><a href="#math_3">3</a></b>) is true.<sup id="cite_ref-bpsw2_7-0" class="reference"><a href="#cite_note-bpsw2-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> </p><p>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 Q\neq \pm 1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Q</mi> <mo>≠<!-- ≠ --></mo> <mo>±<!-- ± --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q\neq \pm 1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4179a56883cddb4b902b380b0f856d813a4fcb28" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.907ex; height:2.676ex;" alt="{\displaystyle Q\neq \pm 1}"></span>, then a further congruence condition that involves very little additional computation can be implemented. </p><p>Recall 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 Q^{n+1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>Q</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q^{n+1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7bda796ee7ab62c85d97203a8b7c306b0ac992e7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.157ex; height:3.009ex;" alt="{\displaystyle Q^{n+1}}"></span> is computed during the calculation 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 U_{n+1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle U_{n+1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ae783ccf00292b5772f704602489d7bda4d34c93" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:4.906ex; height:2.509ex;" alt="{\displaystyle U_{n+1}}"></span>, and we can easily save the previously computed power 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 Q}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Q</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8752c7023b4b3286800fe3238271bbca681219ed" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.838ex; height:2.509ex;" alt="{\displaystyle Q}"></span>, namely, <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 Q^{(n+1)/2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>Q</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <mi>n</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>2</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q^{(n+1)/2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/679c41477dfa5a45f12ba3cbae11a24d428240b6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:8.081ex; height:3.176ex;" alt="{\displaystyle Q^{(n+1)/2}}"></span>. </p><p>If <i>n</i> is prime, then, by <a href="/wiki/Euler%27s_criterion" title="Euler's criterion">Euler's criterion</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 Q^{(n-1)/2}\equiv \left({\tfrac {Q}{n}}\right){\pmod {n}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>Q</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <mi>n</mi> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>2</mn> </mrow> </msup> <mo>≡<!-- ≡ --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>Q</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mspace width="1em" /> <mo stretchy="false">(</mo> <mi>mod</mi> <mspace width="0.333em" /> <mi>n</mi> <mo stretchy="false">)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q^{(n-1)/2}\equiv \left({\tfrac {Q}{n}}\right){\pmod {n}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4d45734677891fbb96caf7700a410f4a03c55815" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:27.556ex; height:4.843ex;" alt="{\displaystyle Q^{(n-1)/2}\equiv \left({\tfrac {Q}{n}}\right){\pmod {n}}}"></span> .</dd></dl> <p>(Here, <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({\tfrac {Q}{n}}\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>Q</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left({\tfrac {Q}{n}}\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8e19e2fc3dc80a49dfeedb26e303eb75bcb26403" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:4.912ex; height:4.843ex;" alt="{\displaystyle \left({\tfrac {Q}{n}}\right)}"></span> is the <a href="/wiki/Legendre_symbol" title="Legendre symbol">Legendre symbol</a>; if <i>n</i> is prime, this is the same as the Jacobi symbol). </p><p>Therefore, if <i>n</i> is prime, we must have, </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 Q^{(n+1)/2}\equiv Q\cdot Q^{(n-1)/2}\equiv Q\cdot \left({\tfrac {Q}{n}}\right){\pmod {n}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>Q</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <mi>n</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>2</mn> </mrow> </msup> <mo>≡<!-- ≡ --></mo> <mi>Q</mi> <mo>⋅<!-- ⋅ --></mo> <msup> <mi>Q</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <mi>n</mi> <mo>−<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>2</mn> </mrow> </msup> <mo>≡<!-- ≡ --></mo> <mi>Q</mi> <mo>⋅<!-- ⋅ --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>Q</mi> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mspace width="1em" /> <mo stretchy="false">(</mo> <mi>mod</mi> <mspace width="0.333em" /> <mi>n</mi> <mo stretchy="false">)</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q^{(n+1)/2}\equiv Q\cdot Q^{(n-1)/2}\equiv Q\cdot \left({\tfrac {Q}{n}}\right){\pmod {n}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d11c19e0297439a695b1980241e531679672be94" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:46.417ex; height:4.843ex;" alt="{\displaystyle Q^{(n+1)/2}\equiv Q\cdot Q^{(n-1)/2}\equiv Q\cdot \left({\tfrac {Q}{n}}\right){\pmod {n}}.}"></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_4" class="reference nourlexpansion" style="font-weight:bold;">4</span>)</b></td></tr></tbody></table> <p>The Jacobi symbol on the right side is easy to compute, so this congruence is easy to check. If this congruence does not hold, then <i>n</i> cannot be prime. Provided GCD(<i>n, Q</i>) = 1 then testing for congruence (<b><a href="#math_4">4</a></b>) is equivalent to augmenting our Lucas test with a "base Q" <a href="/wiki/Solovay%E2%80%93Strassen_primality_test" title="Solovay–Strassen primality test">Solovay–Strassen primality test</a>. </p><p>Additional congruence conditions that must be satisfied if <i>n</i> is prime are described in Section 6 of.<sup id="cite_ref-lpsp_1-12" class="reference"><a href="#cite_note-lpsp-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> If <i>any</i> of these conditions fails to hold, then we have proved that <i>n</i> is not prime. </p> <div class="mw-heading mw-heading2"><h2 id="Comparison_with_the_Miller–Rabin_primality_test"><span id="Comparison_with_the_Miller.E2.80.93Rabin_primality_test"></span>Comparison with the Miller–Rabin primality test</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Lucas_pseudoprime&action=edit&section=6" title="Edit section: Comparison with the Miller–Rabin primality test"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><i>k</i> applications of the <a href="/wiki/Miller%E2%80%93Rabin_primality_test" title="Miller–Rabin primality test">Miller–Rabin primality test</a> declare a composite <i>n</i> to be probably prime with a probability at most (1/4)<sup><i>k</i></sup>. </p><p>There is a similar probability estimate for the strong Lucas probable prime test.<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> </p><p>Aside from two trivial exceptions (see below), the fraction of (<i>P</i>,<i>Q</i>) pairs (modulo <i>n</i>) that declare a composite <i>n</i> to be probably prime is at most (4/15). </p><p>Therefore, <i>k</i> applications of the strong Lucas test would declare a composite <i>n</i> to be probably prime with a probability at most (4/15)<sup>k</sup>. </p><p>There are two trivial exceptions. One is <i>n</i> = 9. The other is when <i>n</i> = <i>p</i>(<i>p</i>+2) is the product of two <a href="/wiki/Twin_prime" title="Twin prime">twin primes</a>. Such an <i>n</i> is easy to factor, because in this case, <i>n</i>+1 = (<i>p</i>+1)<sup>2</sup> is a perfect square. One can quickly detect perfect squares using <a href="/wiki/Newton%27s_method" title="Newton's method">Newton's method</a> for square roots. </p><p>By combining a Lucas pseudoprime test with a <a href="/wiki/Fermat_primality_test" title="Fermat primality test">Fermat primality test</a>, say, to base 2, one can obtain very powerful probabilistic tests for primality, such as the <a href="/wiki/Baillie%E2%80%93PSW_primality_test" title="Baillie–PSW primality test">Baillie–PSW primality test</a>. </p> <div class="mw-heading mw-heading2"><h2 id="Fibonacci_pseudoprimes">Fibonacci pseudoprimes</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Lucas_pseudoprime&action=edit&section=7" title="Edit section: Fibonacci pseudoprimes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>When <i>P</i> = 1 and <i>Q</i> = −1, the <i>U<sub>n</sub></i>(<i>P</i>,<i>Q</i>) sequence represents the Fibonacci numbers. </p><p>A <b>Fibonacci pseudoprime</b> is often<sup id="cite_ref-Bressoud_2-2" class="reference"><a href="#cite_note-Bressoud-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 264,">: 264,  </span></sup><sup id="cite_ref-CrandallPomerance_3-1" class="reference"><a href="#cite_note-CrandallPomerance-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 142,">: 142,  </span></sup><sup id="cite_ref-Ribenboim_4-1" class="reference"><a href="#cite_note-Ribenboim-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 127">: 127 </span></sup> defined as a composite number <i>n</i> not divisible by 5 for which congruence (<b><a href="#math_1">1</a></b>) holds with <i>P</i> = 1 and <i>Q</i> = −1. By this definition, the Fibonacci pseudoprimes form a sequence: </p> <dl><dd>323, 377, 1891, 3827, 4181, 5777, 6601, 6721, 8149, 10877, ... (sequence <span class="nowrap external"><a href="//oeis.org/A081264" class="extiw" title="oeis:A081264">A081264</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).</dd></dl> <p>The references of Anderson and Jacobsen below use this definition. </p><p>If <i>n</i> is congruent to 2 or 3 modulo 5, then Bressoud,<sup id="cite_ref-Bressoud_2-3" class="reference"><a href="#cite_note-Bressoud-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 272–273">: 272–273 </span></sup> and Crandall and Pomerance<sup id="cite_ref-CrandallPomerance_3-2" class="reference"><a href="#cite_note-CrandallPomerance-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 143, 168">: 143, 168 </span></sup> point out that it is rare for a Fibonacci pseudoprime to also be a <a href="/wiki/Fermat_pseudoprime" title="Fermat pseudoprime">Fermat pseudoprime</a> base 2. However, when <i>n</i> is congruent to 1 or 4 modulo 5, the opposite is true, with over 12% of Fibonacci pseudoprimes under 10<sup>11</sup> also being base-2 Fermat pseudoprimes. </p><p>If <i>n</i> is prime and GCD(<i>n</i>, <i>Q</i>) = 1, then we also have<sup id="cite_ref-lpsp_1-13" class="reference"><a href="#cite_note-lpsp-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 1392">: 1392 </span></sup> </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 V_{n}(P,Q)\equiv P{\pmod {n}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>V</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>P</mi> <mo>,</mo> <mi>Q</mi> <mo stretchy="false">)</mo> <mo>≡<!-- ≡ --></mo> <mi>P</mi> <mrow class="MJX-TeXAtom-ORD"> <mspace width="1em" /> <mo stretchy="false">(</mo> <mi>mod</mi> <mspace width="0.333em" /> <mi>n</mi> <mo stretchy="false">)</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle V_{n}(P,Q)\equiv P{\pmod {n}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/44322e25db12c95fad0214eb2a44d422a5fab049" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:25.57ex; height:2.843ex;" alt="{\displaystyle V_{n}(P,Q)\equiv P{\pmod {n}}.}"></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_5" class="reference nourlexpansion" style="font-weight:bold;">5</span>)</b></td></tr></tbody></table> <p>This leads to an alternative definition of Fibonacci pseudoprime:<sup id="cite_ref-FibonacciPSP_9-0" class="reference"><a href="#cite_note-FibonacciPSP-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup><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> </p> <dl><dd>a <b>Fibonacci pseudoprime</b> is a composite number <i>n</i> for which congruence (<b><a href="#math_5">5</a></b>) holds with <i>P</i> = 1 and <i>Q</i> = −1.</dd></dl> <p>This definition leads the Fibonacci pseudoprimes form a sequence: </p> <dl><dd>705, 2465, 2737, 3745, 4181, 5777, 6721, 10877, 13201, 15251, ... (sequence <span class="nowrap external"><a href="//oeis.org/A005845" class="extiw" title="oeis:A005845">A005845</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>),</dd></dl> <p>which are also referred to as <i>Bruckman-Lucas</i> pseudoprimes.<sup id="cite_ref-Ribenboim_4-2" class="reference"><a href="#cite_note-Ribenboim-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 129">: 129 </span></sup> Hoggatt and Bicknell studied properties of these pseudoprimes in 1974.<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> Singmaster computed these pseudoprimes up to 100000.<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> Jacobsen lists all 111443 of these pseudoprimes less than 10<sup>13</sup>.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> </p><p>It has been shown that there are no even Fibonacci pseudoprimes as defined by equation (5).<sup id="cite_ref-Bruckman_14-0" class="reference"><a href="#cite_note-Bruckman-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup><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> However, even Fibonacci pseudoprimes do exist (sequence <span class="nowrap external"><a href="//oeis.org/A141137" class="extiw" title="oeis:A141137">A141137</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>) under the first definition given by (<b><a href="#math_1">1</a></b>). </p><p>A <b>strong Fibonacci pseudoprime</b> is a composite number <i>n</i> for which congruence (<b><a href="#math_5">5</a></b>) holds for <i>Q</i> = −1 and all <i>P</i>.<sup id="cite_ref-Muller_16-0" class="reference"><a href="#cite_note-Muller-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup> It follows<sup id="cite_ref-Muller_16-1" class="reference"><a href="#cite_note-Muller-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 460">: 460 </span></sup> that an odd composite integer <i>n</i> is a strong Fibonacci pseudoprime if and only if: </p> <ol><li><i>n</i> is a <a href="/wiki/Carmichael_number" title="Carmichael number">Carmichael number</a></li> <li>2(<i>p</i> + 1) | (<i>n</i> − 1) or 2(<i>p</i> + 1) | (<i>n</i> − <i>p</i>) for every prime <i>p</i> dividing <i>n</i>.</li></ol> <p>The smallest example of a strong Fibonacci pseudoprime is 443372888629441 = 17·31·41·43·89·97·167·331. </p> <div class="mw-heading mw-heading2"><h2 id="Pell_pseudoprimes">Pell pseudoprimes</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Lucas_pseudoprime&action=edit&section=8" title="Edit section: Pell pseudoprimes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A <b>Pell pseudoprime</b> may be defined as a composite number <i>n</i> for which equation (<b><a href="#math_1">1</a></b>) above is true with <i>P</i> = 2 and <i>Q</i> = −1; the sequence <i>U<sub>n</sub></i> then being the <a href="/wiki/Pell_sequence" class="mw-redirect" title="Pell sequence">Pell sequence</a>. The first pseudoprimes are then 35, 169, 385, 779, 899, 961, 1121, 1189, 2419, ... </p><p>This differs from the definition in <span class="nowrap external"><a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>: <a href="//oeis.org/A099011" class="extiw" title="oeis:A099011">A099011</a></span> which may be written as: </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 {\text{ }}U_{n}\equiv \left({\tfrac {2}{n}}\right){\pmod {n}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtext> </mtext> </mrow> <msub> <mi>U</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>≡<!-- ≡ --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>2</mn> <mi>n</mi> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mspace width="1em" /> <mo stretchy="false">(</mo> <mi>mod</mi> <mspace width="0.333em" /> <mi>n</mi> <mo stretchy="false">)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\text{ }}U_{n}\equiv \left({\tfrac {2}{n}}\right){\pmod {n}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1dc1e24ea3bad7a49a305633bf5fd4b2712c6778" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:21.903ex; height:3.343ex;" alt="{\displaystyle {\text{ }}U_{n}\equiv \left({\tfrac {2}{n}}\right){\pmod {n}}}"></span></dd></dl> <p>with (<i>P</i>, <i>Q</i>) = (2, −1) again defining <i>U<sub>n</sub></i> as the <a href="/wiki/Pell_sequence" class="mw-redirect" title="Pell sequence">Pell sequence</a>. The first pseudoprimes are then 169, 385, 741, 961, 1121, 2001, 3827, 4879, 5719, 6215 ... </p><p>A third definition uses equation (5) with (<i>P</i>, <i>Q</i>) = (2, −1), leading to the pseudoprimes 169, 385, 961, 1105, 1121, 3827, 4901, 6265, 6441, 6601, 7107, 7801, 8119, ... </p> <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=Lucas_pseudoprime&action=edit&section=9" 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-lpsp-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-lpsp_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-lpsp_1-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-lpsp_1-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-lpsp_1-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-lpsp_1-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-lpsp_1-5"><sup><i><b>f</b></i></sup></a> <a href="#cite_ref-lpsp_1-6"><sup><i><b>g</b></i></sup></a> <a href="#cite_ref-lpsp_1-7"><sup><i><b>h</b></i></sup></a> <a href="#cite_ref-lpsp_1-8"><sup><i><b>i</b></i></sup></a> <a href="#cite_ref-lpsp_1-9"><sup><i><b>j</b></i></sup></a> <a href="#cite_ref-lpsp_1-10"><sup><i><b>k</b></i></sup></a> <a href="#cite_ref-lpsp_1-11"><sup><i><b>l</b></i></sup></a> <a href="#cite_ref-lpsp_1-12"><sup><i><b>m</b></i></sup></a> <a href="#cite_ref-lpsp_1-13"><sup><i><b>n</b></i></sup></a></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="CITEREFRobert_BaillieSamuel_S._Wagstaff,_Jr.1980" class="citation journal cs1">Robert Baillie; <a href="/wiki/Samuel_S._Wagstaff,_Jr." class="mw-redirect" title="Samuel S. Wagstaff, Jr.">Samuel S. Wagstaff, Jr.</a> (October 1980). <a rel="nofollow" class="external text" href="http://mpqs.free.fr/LucasPseudoprimes.pdf">"Lucas Pseudoprimes"</a> <span class="cs1-format">(PDF)</span>. <i>Mathematics of Computation</i>. <b>35</b> (152): 1391–1417. <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%2FS0025-5718-1980-0583518-6">10.1090/S0025-5718-1980-0583518-6</a></span>. <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/2006406">2006406</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=0583518">0583518</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Mathematics+of+Computation&rft.atitle=Lucas+Pseudoprimes&rft.volume=35&rft.issue=152&rft.pages=1391-1417&rft.date=1980-10&rft_id=https%3A%2F%2Fmathscinet.ams.org%2Fmathscinet-getitem%3Fmr%3D583518%23id-name%3DMR&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2006406%23id-name%3DJSTOR&rft_id=info%3Adoi%2F10.1090%2FS0025-5718-1980-0583518-6&rft.au=Robert+Baillie&rft.au=Samuel+S.+Wagstaff%2C+Jr.&rft_id=http%3A%2F%2Fmpqs.free.fr%2FLucasPseudoprimes.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span> </li> <li id="cite_note-Bressoud-2"><span class="mw-cite-backlink">^ <a href="#cite_ref-Bressoud_2-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Bressoud_2-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Bressoud_2-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Bressoud_2-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFDavid_BressoudStan_Wagon2000" class="citation book cs1"><a href="/wiki/David_Bressoud" title="David Bressoud">David Bressoud</a>; <a href="/wiki/Stan_Wagon" title="Stan Wagon">Stan Wagon</a> (2000). <span class="id-lock-registration" title="Free registration required"><a rel="nofollow" class="external text" href="https://archive.org/details/courseincomputat0000bres"><i>A Course in Computational Number Theory</i></a></span>. New York: Key College Publishing in cooperation with Springer. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-1-930190-10-8" title="Special:BookSources/978-1-930190-10-8"><bdi>978-1-930190-10-8</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=A+Course+in+Computational+Number+Theory&rft.place=New+York&rft.pub=Key+College+Publishing+in+cooperation+with+Springer&rft.date=2000&rft.isbn=978-1-930190-10-8&rft.au=David+Bressoud&rft.au=Stan+Wagon&rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Fcourseincomputat0000bres&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span> </li> <li id="cite_note-CrandallPomerance-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-CrandallPomerance_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-CrandallPomerance_3-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-CrandallPomerance_3-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRichard_E._CrandallCarl_Pomerance2005" class="citation book cs1"><a href="/wiki/Richard_Crandall" title="Richard Crandall">Richard E. Crandall</a>; <a href="/wiki/Carl_Pomerance" title="Carl Pomerance">Carl Pomerance</a> (2005). <i>Prime numbers: A computational perspective</i> (2nd ed.). <a href="/wiki/Springer-Verlag" class="mw-redirect" title="Springer-Verlag">Springer-Verlag</a>. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/0-387-25282-7" title="Special:BookSources/0-387-25282-7"><bdi>0-387-25282-7</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Prime+numbers%3A+A+computational+perspective&rft.edition=2nd&rft.pub=Springer-Verlag&rft.date=2005&rft.isbn=0-387-25282-7&rft.au=Richard+E.+Crandall&rft.au=Carl+Pomerance&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span> </li> <li id="cite_note-Ribenboim-4"><span class="mw-cite-backlink">^ <a href="#cite_ref-Ribenboim_4-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Ribenboim_4-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Ribenboim_4-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFPaulo_Ribenboim1996" class="citation book cs1"><a href="/wiki/Paulo_Ribenboim" title="Paulo Ribenboim">Paulo Ribenboim</a> (1996). <i>The New Book of Prime Number Records</i>. <a href="/wiki/Springer-Verlag" class="mw-redirect" title="Springer-Verlag">Springer-Verlag</a>. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/0-387-94457-5" title="Special:BookSources/0-387-94457-5"><bdi>0-387-94457-5</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=The+New+Book+of+Prime+Number+Records&rft.pub=Springer-Verlag&rft.date=1996&rft.isbn=0-387-94457-5&rft.au=Paulo+Ribenboim&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span> </li> <li id="cite_note-PSW-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-PSW_5-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFCarl_PomeranceJohn_L._SelfridgeSamuel_S._Wagstaff,_Jr.1980" class="citation journal cs1"><a href="/wiki/Carl_Pomerance" title="Carl Pomerance">Carl Pomerance</a>; <a href="/wiki/John_L._Selfridge" class="mw-redirect" title="John L. Selfridge">John L. Selfridge</a>; <a href="/wiki/Samuel_S._Wagstaff,_Jr." class="mw-redirect" title="Samuel S. Wagstaff, Jr.">Samuel S. Wagstaff, Jr.</a> (July 1980). <a rel="nofollow" class="external text" href="//math.dartmouth.edu/~carlp/PDF/paper25.pdf">"The pseudoprimes to 25·10<sup>9</sup>"</a> <span class="cs1-format">(PDF)</span>. <i>Mathematics of Computation</i>. <b>35</b> (151): 1003–1026. <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%2FS0025-5718-1980-0572872-7">10.1090/S0025-5718-1980-0572872-7</a></span>. <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/2006210">2006210</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Mathematics+of+Computation&rft.atitle=The+pseudoprimes+to+25%C2%B710%3Csup%3E9%3C%2Fsup%3E&rft.volume=35&rft.issue=151&rft.pages=1003-1026&rft.date=1980-07&rft_id=info%3Adoi%2F10.1090%2FS0025-5718-1980-0572872-7&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2006210%23id-name%3DJSTOR&rft.au=Carl+Pomerance&rft.au=John+L.+Selfridge&rft.au=Samuel+S.+Wagstaff%2C+Jr.&rft_id=%2F%2Fmath.dartmouth.edu%2F~carlp%2FPDF%2Fpaper25.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span> </li> <li id="cite_note-FrobeniusPSP-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-FrobeniusPSP_6-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFJon_Grantham2001" class="citation journal cs1">Jon Grantham (2001). <a rel="nofollow" class="external text" href="https://doi.org/10.1090%2FS0025-5718-00-01197-2">"Frobenius Pseudoprimes"</a>. <i>Mathematics of Computation</i>. <b>70</b> (234): 873–891. <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/1903.06820">1903.06820</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/2001MaCom..70..873G">2001MaCom..70..873G</a>. <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%2FS0025-5718-00-01197-2">10.1090/S0025-5718-00-01197-2</a></span>. <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=1680879">1680879</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Mathematics+of+Computation&rft.atitle=Frobenius+Pseudoprimes&rft.volume=70&rft.issue=234&rft.pages=873-891&rft.date=2001&rft_id=info%3Aarxiv%2F1903.06820&rft_id=https%3A%2F%2Fmathscinet.ams.org%2Fmathscinet-getitem%3Fmr%3D1680879%23id-name%3DMR&rft_id=info%3Adoi%2F10.1090%2FS0025-5718-00-01197-2&rft_id=info%3Abibcode%2F2001MaCom..70..873G&rft.au=Jon+Grantham&rft_id=https%3A%2F%2Fdoi.org%2F10.1090%252FS0025-5718-00-01197-2&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span> </li> <li id="cite_note-bpsw2-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-bpsw2_7-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRobert_BaillieAndrew_FioriSamuel_S._Wagstaff,_Jr.2021" class="citation journal cs1">Robert Baillie; Andrew Fiori; <a href="/wiki/Samuel_S._Wagstaff,_Jr." class="mw-redirect" title="Samuel S. Wagstaff, Jr.">Samuel S. Wagstaff, Jr.</a> (July 2021). "Strengthening the Baillie-PSW Primality Test". <i>Mathematics of Computation</i>. <b>90</b> (330): 1931–1955. <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/2006.14425">2006.14425</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.1090%2Fmcom%2F3616">10.1090/mcom/3616</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:220055722">220055722</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Mathematics+of+Computation&rft.atitle=Strengthening+the+Baillie-PSW+Primality+Test&rft.volume=90&rft.issue=330&rft.pages=1931-1955&rft.date=2021-07&rft_id=info%3Aarxiv%2F2006.14425&rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A220055722%23id-name%3DS2CID&rft_id=info%3Adoi%2F10.1090%2Fmcom%2F3616&rft.au=Robert+Baillie&rft.au=Andrew+Fiori&rft.au=Samuel+S.+Wagstaff%2C+Jr.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" 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="CITEREFF._Arnault1997" class="citation journal cs1">F. Arnault (April 1997). "The Rabin-Monier Theorem for Lucas Pseudoprimes". <i>Mathematics of Computation</i>. <b>66</b> (218): 869–881. <a href="/wiki/CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a> <span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.192.4789">10.1.1.192.4789</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.1090%2Fs0025-5718-97-00836-3">10.1090/s0025-5718-97-00836-3</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Mathematics+of+Computation&rft.atitle=The+Rabin-Monier+Theorem+for+Lucas+Pseudoprimes&rft.volume=66&rft.issue=218&rft.pages=869-881&rft.date=1997-04&rft_id=https%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fsummary%3Fdoi%3D10.1.1.192.4789%23id-name%3DCiteSeerX&rft_id=info%3Adoi%2F10.1090%2Fs0025-5718-97-00836-3&rft.au=F.+Arnault&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span> </li> <li id="cite_note-FibonacciPSP-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-FibonacciPSP_9-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFAdina_Di_PortoPiero_Filipponi1989" class="citation journal cs1">Adina Di Porto; Piero Filipponi (1989). <a rel="nofollow" class="external text" href="https://www.fq.math.ca/Issues/27-3.pdf">"More on the Fibonacci Pseudoprimes"</a> <span class="cs1-format">(PDF)</span>. <i>Fibonacci Quarterly</i>. <b>27</b> (3): 232–242.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Fibonacci+Quarterly&rft.atitle=More+on+the+Fibonacci+Pseudoprimes&rft.volume=27&rft.issue=3&rft.pages=232-242&rft.date=1989&rft.au=Adina+Di+Porto&rft.au=Piero+Filipponi&rft_id=https%3A%2F%2Fwww.fq.math.ca%2FIssues%2F27-3.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" 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="CITEREFDi_Porto,_AdinaFilipponi,_PieroMontolivo,_Emilio1990" class="citation journal cs1">Di Porto, Adina; Filipponi, Piero; Montolivo, Emilio (1990). "On the generalized Fibonacci pseudoprimes". <i>Fibonacci Quarterly</i>. <b>28</b>: 347–354. <a href="/wiki/CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a> <span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.388.4993">10.1.1.388.4993</a></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Fibonacci+Quarterly&rft.atitle=On+the+generalized+Fibonacci+pseudoprimes&rft.volume=28&rft.pages=347-354&rft.date=1990&rft_id=https%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fsummary%3Fdoi%3D10.1.1.388.4993%23id-name%3DCiteSeerX&rft.au=Di+Porto%2C+Adina&rft.au=Filipponi%2C+Piero&rft.au=Montolivo%2C+Emilio&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" 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="CITEREFV._E._Hoggatt,_Jr.Marjorie_Bicknell1974" class="citation journal cs1"><a href="/wiki/Verner_Emil_Hoggatt_Jr." title="Verner Emil Hoggatt Jr.">V. E. Hoggatt, Jr.</a>; Marjorie Bicknell (September 1974). "Some Congruences of the Fibonacci Numbers Modulo a Prime p". <i>Mathematics Magazine</i>. <b>47</b> (4): 210–214. <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%2F2689212">10.2307/2689212</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/2689212">2689212</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=Some+Congruences+of+the+Fibonacci+Numbers+Modulo+a+Prime+p&rft.volume=47&rft.issue=4&rft.pages=210-214&rft.date=1974-09&rft_id=info%3Adoi%2F10.2307%2F2689212&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2689212%23id-name%3DJSTOR&rft.au=V.+E.+Hoggatt%2C+Jr.&rft.au=Marjorie+Bicknell&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" 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="CITEREFDavid_Singmaster1983" class="citation journal cs1">David Singmaster (1983). "Some Lucas Pseudoprimes". <i>Abstracts Amer. Math. Soc</i>. <b>4</b> (83T–10–146): 197.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Abstracts+Amer.+Math.+Soc.&rft.atitle=Some+Lucas+Pseudoprimes&rft.volume=4&rft.issue=83T%E2%80%9310%E2%80%93146&rft.pages=197&rft.date=1983&rft.au=David+Singmaster&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span> </li> <li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://ntheory.org/pseudoprimes.html">"Pseudoprime Statistics and Tables"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">5 May</span> 2019</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Pseudoprime+Statistics+and+Tables&rft_id=http%3A%2F%2Fntheory.org%2Fpseudoprimes.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span> </li> <li id="cite_note-Bruckman-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-Bruckman_14-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFP._S._Bruckman1994" class="citation journal cs1">P. S. Bruckman (1994). "Lucas Pseudoprimes are odd". <i>Fibonacci Quarterly</i>. <b>32</b>: 155–157.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Fibonacci+Quarterly&rft.atitle=Lucas+Pseudoprimes+are+odd&rft.volume=32&rft.pages=155-157&rft.date=1994&rft.au=P.+S.+Bruckman&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" 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="CITEREFDi_Porto,_Adina1993" class="citation journal cs1">Di Porto, Adina (1993). "Nonexistence of Even Fibonacci Pseudoprimes of the First Kind". <i>Fibonacci Quarterly</i>. <b>31</b>: 173–177. <a href="/wiki/CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a> <span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.376.2601">10.1.1.376.2601</a></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Fibonacci+Quarterly&rft.atitle=Nonexistence+of+Even+Fibonacci+Pseudoprimes+of+the+First+Kind&rft.volume=31&rft.pages=173-177&rft.date=1993&rft_id=https%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fsummary%3Fdoi%3D10.1.1.376.2601%23id-name%3DCiteSeerX&rft.au=Di+Porto%2C+Adina&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span> </li> <li id="cite_note-Muller-16"><span class="mw-cite-backlink">^ <a href="#cite_ref-Muller_16-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Muller_16-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMüller,_Winfried_B.Oswald,_Alan1993" class="citation conference cs1">Müller, Winfried B.; Oswald, Alan (1993). "Generalized Fibonacci Pseudoprimes and Probable Primes". In G.E. Bergum; et al. (eds.). <i>Applications of Fibonacci Numbers</i>. Vol. 5. Kluwer. pp. 459–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.1007%2F978-94-011-2058-6_45">10.1007/978-94-011-2058-6_45</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=conference&rft.atitle=Generalized+Fibonacci+Pseudoprimes+and+Probable+Primes&rft.btitle=Applications+of+Fibonacci+Numbers&rft.pages=459-464&rft.pub=Kluwer&rft.date=1993&rft_id=info%3Adoi%2F10.1007%2F978-94-011-2058-6_45&rft.au=M%C3%BCller%2C+Winfried+B.&rft.au=Oswald%2C+Alan&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span> </li> </ol></div></div> <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=Lucas_pseudoprime&action=edit&section=10" title="Edit section: External links"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li>Anderson, Peter G. <a rel="nofollow" class="external text" href="http://www.cs.rit.edu/usr/local/pub/pga/fpp_and_entry_pts">Fibonacci Pseudoprimes, their factors, and their entry points.</a></li> <li>Anderson, Peter G. <a rel="nofollow" class="external text" href="http://www.cs.rit.edu/usr/local/pub/pga/fibonacci_pp">Fibonacci Pseudoprimes under 2,217,967,487 and their factors.</a></li> <li>Jacobsen, Dana <a rel="nofollow" class="external text" href="http://ntheory.org/pseudoprimes.html">Pseudoprime Statistics, Tables, and Data</a> (data for Lucas, Strong Lucas, AES Lucas, ES Lucas pseudoprimes below 10<sup>14</sup>; Fibonacci and Pell pseudoprimes below 10<sup>12</sup>)</li> <li><span class="citation mathworld" id="Reference-Mathworld-Fibonacci_Pseudoprime"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWeisstein" class="citation web cs1"><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/FibonacciPseudoprime.html">"Fibonacci Pseudoprime"</a>. <i><a href="/wiki/MathWorld" title="MathWorld">MathWorld</a></i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=MathWorld&rft.atitle=Fibonacci+Pseudoprime&rft.au=Weisstein%2C+Eric+W.&rft_id=https%3A%2F%2Fmathworld.wolfram.com%2FFibonacciPseudoprime.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span></li> <li><span class="citation mathworld" id="Reference-Mathworld-Lucas_Pseudoprime"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWeisstein" class="citation web cs1"><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/LucasPseudoprime.html">"Lucas Pseudoprime"</a>. <i><a href="/wiki/MathWorld" title="MathWorld">MathWorld</a></i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=MathWorld&rft.atitle=Lucas+Pseudoprime&rft.au=Weisstein%2C+Eric+W.&rft_id=https%3A%2F%2Fmathworld.wolfram.com%2FLucasPseudoprime.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span></li> <li><span class="citation mathworld" id="Reference-Mathworld-Strong_Lucas_Pseudoprime"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWeisstein" class="citation web cs1"><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/StrongLucasPseudoprime.html">"Strong Lucas Pseudoprime"</a>. <i><a href="/wiki/MathWorld" title="MathWorld">MathWorld</a></i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=MathWorld&rft.atitle=Strong+Lucas+Pseudoprime&rft.au=Weisstein%2C+Eric+W.&rft_id=https%3A%2F%2Fmathworld.wolfram.com%2FStrongLucasPseudoprime.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span></li> <li><span class="citation mathworld" id="Reference-Mathworld-Extra_Strong_Lucas_Pseudoprime"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWeisstein" class="citation web cs1"><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/ExtraStrongLucasPseudoprime.html">"Extra Strong Lucas Pseudoprime"</a>. <i><a href="/wiki/MathWorld" title="MathWorld">MathWorld</a></i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=MathWorld&rft.atitle=Extra+Strong+Lucas+Pseudoprime&rft.au=Weisstein%2C+Eric+W.&rft_id=https%3A%2F%2Fmathworld.wolfram.com%2FExtraStrongLucasPseudoprime.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALucas+pseudoprime" class="Z3988"></span></span></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="Classes_of_natural_numbers" style="padding:3px"><table class="nowraplinks mw-collapsible mw-collapsed 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:Classes_of_natural_numbers" title="Template:Classes of natural numbers"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Classes_of_natural_numbers" title="Template talk:Classes of natural numbers"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Classes_of_natural_numbers" title="Special:EditPage/Template:Classes of natural numbers"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="Classes_of_natural_numbers" style="font-size:114%;margin:0 4em">Classes of <a href="/wiki/Natural_number" title="Natural number">natural numbers</a></div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Powers_and_related_numbers" style="font-size:114%;margin:0 4em"><a href="/wiki/Exponentiation" title="Exponentiation">Powers</a> and related numbers</div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Achilles_number" title="Achilles number">Achilles</a></li> <li><a href="/wiki/Power_of_two" title="Power of two">Power of 2</a></li> <li><a href="/wiki/Power_of_three" title="Power of three">Power of 3</a></li> <li><a href="/wiki/Power_of_10" title="Power of 10">Power of 10</a></li> <li><a href="/wiki/Square_number" title="Square number">Square</a></li> <li><a href="/wiki/Cube_(algebra)" title="Cube (algebra)">Cube</a></li> <li><a href="/wiki/Fourth_power" title="Fourth power">Fourth power</a></li> <li><a href="/wiki/Fifth_power_(algebra)" title="Fifth power (algebra)">Fifth power</a></li> <li><a href="/wiki/Sixth_power" title="Sixth power">Sixth power</a></li> <li><a href="/wiki/Seventh_power" title="Seventh power">Seventh power</a></li> <li><a href="/wiki/Eighth_power" title="Eighth power">Eighth power</a></li> <li><a href="/wiki/Perfect_power" title="Perfect power">Perfect power</a></li> <li><a href="/wiki/Powerful_number" title="Powerful number">Powerful</a></li> <li><a href="/wiki/Prime_power" title="Prime power">Prime power</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Of_the_form_a_×_2b_±_1" style="font-size:114%;margin:0 4em">Of the form <i>a</i> × 2<sup><i>b</i></sup> ± 1</div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Cullen_number" title="Cullen number">Cullen</a></li> <li><a href="/wiki/Double_Mersenne_number" title="Double Mersenne number">Double Mersenne</a></li> <li><a href="/wiki/Fermat_number" title="Fermat number">Fermat</a></li> <li><a href="/wiki/Mersenne_prime" title="Mersenne prime">Mersenne</a></li> <li><a href="/wiki/Proth_number" class="mw-redirect" title="Proth number">Proth</a></li> <li><a href="/wiki/Thabit_number" title="Thabit number">Thabit</a></li> <li><a href="/wiki/Woodall_number" title="Woodall number">Woodall</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Other_polynomial_numbers" style="font-size:114%;margin:0 4em">Other polynomial numbers</div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Hilbert_number" title="Hilbert number">Hilbert</a></li> <li><a href="/wiki/Idoneal_number" title="Idoneal number">Idoneal</a></li> <li><a href="/wiki/Leyland_number" title="Leyland number">Leyland</a></li> <li><a href="/wiki/Loeschian_number" class="mw-redirect" title="Loeschian number">Loeschian</a></li> <li><a href="/wiki/Lucky_numbers_of_Euler" title="Lucky numbers of Euler">Lucky numbers of Euler</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Recursively_defined_numbers" style="font-size:114%;margin:0 4em"><a href="/wiki/Recursion" title="Recursion">Recursively</a> defined numbers</div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Fibonacci_sequence" title="Fibonacci sequence">Fibonacci</a></li> <li><a href="/wiki/Jacobsthal_number" title="Jacobsthal number">Jacobsthal</a></li> <li><a href="/wiki/Leonardo_number" title="Leonardo number">Leonardo</a></li> <li><a href="/wiki/Lucas_number" title="Lucas number">Lucas</a></li> <li><a href="/wiki/Supergolden_ratio#Narayana_sequence" title="Supergolden ratio">Narayana</a></li> <li><a href="/wiki/Padovan_sequence" title="Padovan sequence">Padovan</a></li> <li><a href="/wiki/Pell_number" title="Pell number">Pell</a></li> <li><a href="/wiki/Perrin_number" title="Perrin number">Perrin</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Possessing_a_specific_set_of_other_numbers" style="font-size:114%;margin:0 4em">Possessing a specific set of other numbers</div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Amenable_number" title="Amenable number">Amenable</a></li> <li><a href="/wiki/Congruent_number" title="Congruent number">Congruent</a></li> <li><a href="/wiki/Kn%C3%B6del_number" title="Knödel number">Knödel</a></li> <li><a href="/wiki/Riesel_number" title="Riesel number">Riesel</a></li> <li><a href="/wiki/Sierpi%C5%84ski_number" title="Sierpiński number">Sierpiński</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Expressible_via_specific_sums" style="font-size:114%;margin:0 4em">Expressible via specific sums</div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Nonhypotenuse_number" title="Nonhypotenuse number">Nonhypotenuse</a></li> <li><a href="/wiki/Polite_number" title="Polite number">Polite</a></li> <li><a href="/wiki/Practical_number" title="Practical number">Practical</a></li> <li><a href="/wiki/Primary_pseudoperfect_number" title="Primary pseudoperfect number">Primary pseudoperfect</a></li> <li><a href="/wiki/Ulam_number" title="Ulam number">Ulam</a></li> <li><a href="/wiki/Wolstenholme_number" title="Wolstenholme number">Wolstenholme</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Figurate_numbers" style="font-size:114%;margin:0 4em"><a href="/wiki/Figurate_number" title="Figurate number">Figurate numbers</a></div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Plane_(mathematics)" title="Plane (mathematics)">2-dimensional</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Centered_polygonal_number" title="Centered polygonal number">centered</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/Centered_triangular_number" title="Centered triangular number">Centered triangular</a></li> <li><a href="/wiki/Centered_square_number" title="Centered square number">Centered square</a></li> <li><a href="/wiki/Centered_pentagonal_number" title="Centered pentagonal number">Centered pentagonal</a></li> <li><a href="/wiki/Centered_hexagonal_number" title="Centered hexagonal number">Centered hexagonal</a></li> <li><a href="/wiki/Centered_heptagonal_number" title="Centered heptagonal number">Centered heptagonal</a></li> <li><a href="/wiki/Centered_octagonal_number" title="Centered octagonal number">Centered octagonal</a></li> <li><a href="/wiki/Centered_nonagonal_number" title="Centered nonagonal number">Centered nonagonal</a></li> <li><a href="/wiki/Centered_decagonal_number" title="Centered decagonal number">Centered decagonal</a></li> <li><a href="/wiki/Star_number" title="Star number">Star</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Polygonal_number" title="Polygonal number">non-centered</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Triangular_number" title="Triangular number">Triangular</a></li> <li><a href="/wiki/Square_number" title="Square number">Square</a></li> <li><a href="/wiki/Square_triangular_number" title="Square triangular number">Square triangular</a></li> <li><a href="/wiki/Pentagonal_number" title="Pentagonal number">Pentagonal</a></li> <li><a href="/wiki/Hexagonal_number" title="Hexagonal number">Hexagonal</a></li> <li><a href="/wiki/Heptagonal_number" title="Heptagonal number">Heptagonal</a></li> <li><a href="/wiki/Octagonal_number" title="Octagonal number">Octagonal</a></li> <li><a href="/wiki/Nonagonal_number" title="Nonagonal number">Nonagonal</a></li> <li><a href="/wiki/Decagonal_number" title="Decagonal number">Decagonal</a></li> <li><a href="/wiki/Dodecagonal_number" title="Dodecagonal number">Dodecagonal</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Three-dimensional_space" title="Three-dimensional space">3-dimensional</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Centered_polyhedral_number" title="Centered polyhedral number">centered</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/Centered_tetrahedral_number" title="Centered tetrahedral number">Centered tetrahedral</a></li> <li><a href="/wiki/Centered_cube_number" title="Centered cube number">Centered cube</a></li> <li><a href="/wiki/Centered_octahedral_number" title="Centered octahedral number">Centered octahedral</a></li> <li><a href="/wiki/Centered_dodecahedral_number" title="Centered dodecahedral number">Centered dodecahedral</a></li> <li><a href="/wiki/Centered_icosahedral_number" title="Centered icosahedral number">Centered icosahedral</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Polyhedral_number" class="mw-redirect" title="Polyhedral number">non-centered</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Tetrahedral_number" title="Tetrahedral number">Tetrahedral</a></li> <li><a href="/wiki/Cube_(algebra)" title="Cube (algebra)">Cubic</a></li> <li><a href="/wiki/Octahedral_number" title="Octahedral number">Octahedral</a></li> <li><a href="/wiki/Dodecahedral_number" title="Dodecahedral number">Dodecahedral</a></li> <li><a href="/wiki/Icosahedral_number" title="Icosahedral number">Icosahedral</a></li> <li><a href="/wiki/Stella_octangula_number" title="Stella octangula number">Stella octangula</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Pyramidal_number" title="Pyramidal number">pyramidal</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/Square_pyramidal_number" title="Square pyramidal number">Square pyramidal</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Four-dimensional_space" title="Four-dimensional space">4-dimensional</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%">non-centered</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Pentatope_number" title="Pentatope number">Pentatope</a></li> <li><a href="/wiki/Squared_triangular_number" title="Squared triangular number">Squared triangular</a></li> <li><a href="/wiki/Fourth_power" title="Fourth power">Tesseractic</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr></tbody></table><div></div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Combinatorial_numbers" style="font-size:114%;margin:0 4em">Combinatorial numbers</div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Bell_number" title="Bell number">Bell</a></li> <li><a href="/wiki/Cake_number" title="Cake number">Cake</a></li> <li><a href="/wiki/Catalan_number" title="Catalan number">Catalan</a></li> <li><a href="/wiki/Dedekind_number" title="Dedekind number">Dedekind</a></li> <li><a href="/wiki/Delannoy_number" title="Delannoy number">Delannoy</a></li> <li><a href="/wiki/Euler_number" class="mw-redirect" title="Euler number">Euler</a></li> <li><a href="/wiki/Eulerian_number" title="Eulerian number">Eulerian</a></li> <li><a href="/wiki/Fuss%E2%80%93Catalan_number" title="Fuss–Catalan number">Fuss–Catalan</a></li> <li><a href="/wiki/Lah_number" title="Lah number">Lah</a></li> <li><a href="/wiki/Lazy_caterer%27s_sequence" title="Lazy caterer's sequence">Lazy caterer's sequence</a></li> <li><a href="/wiki/Lobb_number" title="Lobb number">Lobb</a></li> <li><a href="/wiki/Motzkin_number" title="Motzkin number">Motzkin</a></li> <li><a href="/wiki/Narayana_number" title="Narayana number">Narayana</a></li> <li><a href="/wiki/Ordered_Bell_number" title="Ordered Bell number">Ordered Bell</a></li> <li><a href="/wiki/Schr%C3%B6der_number" title="Schröder number">Schröder</a></li> <li><a href="/wiki/Schr%C3%B6der%E2%80%93Hipparchus_number" title="Schröder–Hipparchus number">Schröder–Hipparchus</a></li> <li><a href="/wiki/Stirling_numbers_of_the_first_kind" title="Stirling numbers of the first kind">Stirling first</a></li> <li><a href="/wiki/Stirling_numbers_of_the_second_kind" title="Stirling numbers of the second kind">Stirling second</a></li> <li><a href="/wiki/Telephone_number_(mathematics)" title="Telephone number (mathematics)">Telephone number</a></li> <li><a href="/wiki/Wedderburn%E2%80%93Etherington_number" title="Wedderburn–Etherington number">Wedderburn–Etherington</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Primes" style="font-size:114%;margin:0 4em"><a href="/wiki/Prime_number" title="Prime number">Primes</a></div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Wieferich_prime#Wieferich_numbers" title="Wieferich prime">Wieferich</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 prime</a></li> <li><a href="/wiki/Wilson_prime#Wilson_numbers" title="Wilson prime">Wilson</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Pseudoprimes" style="font-size:114%;margin:0 4em"><a href="/wiki/Pseudoprime" title="Pseudoprime">Pseudoprimes</a></div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Carmichael_number" title="Carmichael number">Carmichael number</a></li> <li><a href="/wiki/Catalan_pseudoprime" title="Catalan pseudoprime">Catalan pseudoprime</a></li> <li><a href="/wiki/Elliptic_pseudoprime" title="Elliptic pseudoprime">Elliptic pseudoprime</a></li> <li><a href="/wiki/Euler_pseudoprime" title="Euler pseudoprime">Euler pseudoprime</a></li> <li><a href="/wiki/Euler%E2%80%93Jacobi_pseudoprime" title="Euler–Jacobi pseudoprime">Euler–Jacobi pseudoprime</a></li> <li><a href="/wiki/Fermat_pseudoprime" title="Fermat pseudoprime">Fermat pseudoprime</a></li> <li><a href="/wiki/Frobenius_pseudoprime" title="Frobenius pseudoprime">Frobenius pseudoprime</a></li> <li><a class="mw-selflink selflink">Lucas pseudoprime</a></li> <li><a href="/wiki/Lucas%E2%80%93Carmichael_number" title="Lucas–Carmichael number">Lucas–Carmichael number</a></li> <li><a href="/wiki/Perrin_number#Perrin_primality_test" title="Perrin number">Perrin pseudoprime</a></li> <li><a href="/wiki/Somer%E2%80%93Lucas_pseudoprime" title="Somer–Lucas pseudoprime">Somer–Lucas pseudoprime</a></li> <li><a href="/wiki/Strong_pseudoprime" title="Strong pseudoprime">Strong pseudoprime</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Arithmetic_functions_and_dynamics" style="font-size:114%;margin:0 4em"><a href="/wiki/Arithmetic_function" title="Arithmetic function">Arithmetic functions</a> and <a href="/wiki/Arithmetic_dynamics" title="Arithmetic dynamics">dynamics</a></div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Divisor_function" title="Divisor function">Divisor functions</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/Abundant_number" title="Abundant number">Abundant</a></li> <li><a href="/wiki/Almost_perfect_number" title="Almost perfect number">Almost perfect</a></li> <li><a href="/wiki/Arithmetic_number" title="Arithmetic number">Arithmetic</a></li> <li><a href="/wiki/Betrothed_numbers" title="Betrothed numbers">Betrothed</a></li> <li><a href="/wiki/Colossally_abundant_number" title="Colossally abundant number">Colossally abundant</a></li> <li><a href="/wiki/Deficient_number" title="Deficient number">Deficient</a></li> <li><a href="/wiki/Descartes_number" title="Descartes number">Descartes</a></li> <li><a href="/wiki/Hemiperfect_number" title="Hemiperfect number">Hemiperfect</a></li> <li><a href="/wiki/Highly_abundant_number" title="Highly abundant number">Highly abundant</a></li> <li><a href="/wiki/Highly_composite_number" title="Highly composite number">Highly composite</a></li> <li><a href="/wiki/Hyperperfect_number" title="Hyperperfect number">Hyperperfect</a></li> <li><a href="/wiki/Multiply_perfect_number" title="Multiply perfect number">Multiply perfect</a></li> <li><a href="/wiki/Perfect_number" title="Perfect number">Perfect</a></li> <li><a href="/wiki/Practical_number" title="Practical number">Practical</a></li> <li><a href="/wiki/Primitive_abundant_number" title="Primitive abundant number">Primitive abundant</a></li> <li><a href="/wiki/Quasiperfect_number" title="Quasiperfect number">Quasiperfect</a></li> <li><a href="/wiki/Refactorable_number" title="Refactorable number">Refactorable</a></li> <li><a href="/wiki/Semiperfect_number" title="Semiperfect number">Semiperfect</a></li> <li><a href="/wiki/Sublime_number" title="Sublime number">Sublime</a></li> <li><a href="/wiki/Superabundant_number" title="Superabundant number">Superabundant</a></li> <li><a href="/wiki/Superior_highly_composite_number" title="Superior highly composite number">Superior highly composite</a></li> <li><a href="/wiki/Superperfect_number" title="Superperfect number">Superperfect</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Prime_omega_function" title="Prime omega function">Prime omega functions</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Almost_prime" title="Almost prime">Almost prime</a></li> <li><a href="/wiki/Semiprime" title="Semiprime">Semiprime</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Euler%27s_totient_function" title="Euler's totient function">Euler's totient function</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/Highly_cototient_number" title="Highly cototient number">Highly cototient</a></li> <li><a href="/wiki/Highly_totient_number" title="Highly totient number">Highly totient</a></li> <li><a href="/wiki/Noncototient" title="Noncototient">Noncototient</a></li> <li><a href="/wiki/Nontotient" title="Nontotient">Nontotient</a></li> <li><a href="/wiki/Perfect_totient_number" title="Perfect totient number">Perfect totient</a></li> <li><a href="/wiki/Sparsely_totient_number" title="Sparsely totient number">Sparsely totient</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Aliquot_sequence" title="Aliquot sequence">Aliquot sequences</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Amicable_numbers" title="Amicable numbers">Amicable</a></li> <li><a href="/wiki/Perfect_number" title="Perfect number">Perfect</a></li> <li><a href="/wiki/Sociable_numbers" class="mw-redirect" title="Sociable numbers">Sociable</a></li> <li><a href="/wiki/Untouchable_number" title="Untouchable number">Untouchable</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Primorial" title="Primorial">Primorial</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/Euclid_number" title="Euclid number">Euclid</a></li> <li><a href="/wiki/Fortunate_number" title="Fortunate number">Fortunate</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Other_prime_factor_or_divisor_related_numbers" style="font-size:114%;margin:0 4em">Other <a href="/wiki/Prime_factor" class="mw-redirect" title="Prime factor">prime factor</a> or <a href="/wiki/Divisor" title="Divisor">divisor</a> related numbers</div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Blum_integer" title="Blum integer">Blum</a></li> <li><a href="/wiki/Cyclic_number_(group_theory)" title="Cyclic number (group theory)">Cyclic</a></li> <li><a href="/wiki/Erd%C5%91s%E2%80%93Nicolas_number" title="Erdős–Nicolas number">Erdős–Nicolas</a></li> <li><a href="/wiki/Erd%C5%91s%E2%80%93Woods_number" title="Erdős–Woods number">Erdős–Woods</a></li> <li><a href="/wiki/Friendly_number" title="Friendly number">Friendly</a></li> <li><a href="/wiki/Giuga_number" title="Giuga number">Giuga</a></li> <li><a href="/wiki/Harmonic_divisor_number" title="Harmonic divisor number">Harmonic divisor</a></li> <li><a href="/wiki/Jordan%E2%80%93P%C3%B3lya_number" title="Jordan–Pólya number">Jordan–Pólya</a></li> <li><a href="/wiki/Lucas%E2%80%93Carmichael_number" title="Lucas–Carmichael number">Lucas–Carmichael</a></li> <li><a href="/wiki/Pronic_number" title="Pronic number">Pronic</a></li> <li><a href="/wiki/Regular_number" title="Regular number">Regular</a></li> <li><a href="/wiki/Rough_number" title="Rough number">Rough</a></li> <li><a href="/wiki/Smooth_number" title="Smooth number">Smooth</a></li> <li><a href="/wiki/Sphenic_number" title="Sphenic number">Sphenic</a></li> <li><a href="/wiki/St%C3%B8rmer_number" title="Størmer number">Størmer</a></li> <li><a href="/wiki/Super-Poulet_number" title="Super-Poulet number">Super-Poulet</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Numeral_system-dependent_numbers" style="font-size:114%;margin:0 4em"><a href="/wiki/Numeral_system" title="Numeral system">Numeral system</a>-dependent numbers</div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Arithmetic_function" title="Arithmetic function">Arithmetic functions</a> <br />and <a href="/wiki/Arithmetic_dynamics" title="Arithmetic dynamics">dynamics</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/Persistence_of_a_number" title="Persistence of a number">Persistence</a> <ul><li><a href="/wiki/Additive_persistence" class="mw-redirect" title="Additive persistence">Additive</a></li> <li><a href="/wiki/Multiplicative_persistence" class="mw-redirect" title="Multiplicative persistence">Multiplicative</a></li></ul></li></ul> </div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Digit_sum" title="Digit sum">Digit sum</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Digit_sum" title="Digit sum">Digit sum</a></li> <li><a href="/wiki/Digital_root" title="Digital root">Digital root</a></li> <li><a href="/wiki/Self_number" title="Self number">Self</a></li> <li><a href="/wiki/Sum-product_number" title="Sum-product number">Sum-product</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Digit product</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/Multiplicative_digital_root" title="Multiplicative digital root">Multiplicative digital root</a></li> <li><a href="/wiki/Sum-product_number" title="Sum-product number">Sum-product</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Coding-related</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Meertens_number" title="Meertens number">Meertens</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other</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/Dudeney_number" title="Dudeney number">Dudeney</a></li> <li><a href="/wiki/Factorion" title="Factorion">Factorion</a></li> <li><a href="/wiki/Kaprekar_number" title="Kaprekar number">Kaprekar</a></li> <li><a href="/wiki/Kaprekar%27s_routine" title="Kaprekar's routine">Kaprekar's constant</a></li> <li><a href="/wiki/Keith_number" title="Keith number">Keith</a></li> <li><a href="/wiki/Lychrel_number" title="Lychrel number">Lychrel</a></li> <li><a href="/wiki/Narcissistic_number" title="Narcissistic number">Narcissistic</a></li> <li><a href="/wiki/Perfect_digit-to-digit_invariant" title="Perfect digit-to-digit invariant">Perfect digit-to-digit invariant</a></li> <li><a href="/wiki/Perfect_digital_invariant" title="Perfect digital invariant">Perfect digital invariant</a> <ul><li><a href="/wiki/Happy_number" title="Happy number">Happy</a></li></ul></li></ul> </div></td></tr></tbody></table><div> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/P-adic_numbers" class="mw-redirect" title="P-adic numbers">P-adic numbers</a>-related</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Automorphic_number" title="Automorphic number">Automorphic</a> <ul><li><a href="/wiki/Trimorphic_number" class="mw-redirect" title="Trimorphic number">Trimorphic</a></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Numerical_digit" title="Numerical digit">Digit</a>-composition related</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/Palindromic_number" title="Palindromic number">Palindromic</a></li> <li><a href="/wiki/Pandigital_number" title="Pandigital number">Pandigital</a></li> <li><a href="/wiki/Repdigit" title="Repdigit">Repdigit</a></li> <li><a href="/wiki/Repunit" title="Repunit">Repunit</a></li> <li><a href="/wiki/Self-descriptive_number" title="Self-descriptive number">Self-descriptive</a></li> <li><a href="/wiki/Smarandache%E2%80%93Wellin_number" title="Smarandache–Wellin number">Smarandache–Wellin</a></li> <li><a href="/wiki/Undulating_number" title="Undulating number">Undulating</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Digit-<a href="/wiki/Permutation" title="Permutation">permutation</a> related</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Cyclic_number" title="Cyclic number">Cyclic</a></li> <li><a href="/wiki/Digit-reassembly_number" title="Digit-reassembly number">Digit-reassembly</a></li> <li><a href="/wiki/Parasitic_number" title="Parasitic number">Parasitic</a></li> <li><a href="/wiki/Primeval_number" title="Primeval number">Primeval</a></li> <li><a href="/wiki/Transposable_integer" title="Transposable integer">Transposable</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Divisor-related</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/Equidigital_number" title="Equidigital number">Equidigital</a></li> <li><a href="/wiki/Extravagant_number" title="Extravagant number">Extravagant</a></li> <li><a href="/wiki/Frugal_number" title="Frugal number">Frugal</a></li> <li><a href="/wiki/Harshad_number" title="Harshad number">Harshad</a></li> <li><a href="/wiki/Polydivisible_number" title="Polydivisible number">Polydivisible</a></li> <li><a href="/wiki/Smith_number" title="Smith number">Smith</a></li> <li><a href="/wiki/Vampire_number" title="Vampire number">Vampire</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Friedman_number" title="Friedman number">Friedman</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Binary_numbers" style="font-size:114%;margin:0 4em"><a href="/wiki/Binary_number" title="Binary number">Binary numbers</a></div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Evil_number" title="Evil number">Evil</a></li> <li><a href="/wiki/Odious_number" title="Odious number">Odious</a></li> <li><a href="/wiki/Pernicious_number" title="Pernicious number">Pernicious</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Generated_via_a_sieve" style="font-size:114%;margin:0 4em">Generated via a <a href="/wiki/Sieve_theory" title="Sieve theory">sieve</a></div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Lucky_number" title="Lucky number">Lucky</a></li> <li><a href="/wiki/Generation_of_primes" title="Generation of primes">Prime</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Sorting_related" style="font-size:114%;margin:0 4em"><a href="/wiki/Sorting_algorithm" title="Sorting algorithm">Sorting</a> related</div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Pancake_sorting" title="Pancake sorting">Pancake number</a></li> <li><a href="/wiki/Sorting_number" title="Sorting number">Sorting number</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Natural_language_related" style="font-size:114%;margin:0 4em"><a href="/wiki/Natural_language" title="Natural language">Natural language</a> related</div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Aronson%27s_sequence" title="Aronson's sequence">Aronson's sequence</a></li> <li><a href="/wiki/Ban_number" title="Ban number">Ban</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Graphemics_related" style="font-size:114%;margin:0 4em"><a href="/wiki/Graphemics" title="Graphemics">Graphemics</a> related</div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Strobogrammatic_number" title="Strobogrammatic number">Strobogrammatic</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><td class="navbox-abovebelow hlist" colspan="2" style="font-weight:bold;"><div> <ul><li><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Symbol_portal_class.svg" class="mw-file-description" title="Portal"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/e/e2/Symbol_portal_class.svg/16px-Symbol_portal_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/e/e2/Symbol_portal_class.svg/23px-Symbol_portal_class.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/e/e2/Symbol_portal_class.svg/31px-Symbol_portal_class.svg.png 2x" data-file-width="180" data-file-height="185" /></a></span> <a href="/wiki/Portal:Mathematics" title="Portal:Mathematics">Mathematics portal</a></li></ul> </div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐f69cdc8f6‐b7zbx Cached time: 20241122140811 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.670 seconds Real time usage: 0.867 seconds Preprocessor visited node count: 4784/1000000 Post‐expand include size: 154734/2097152 bytes Template argument size: 2892/2097152 bytes Highest expansion depth: 16/100 Expensive parser function count: 1/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 82546/5000000 bytes Lua time usage: 0.343/10.000 seconds Lua memory usage: 5624692/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 606.445 1 -total 33.44% 202.823 1 Template:Reflist 23.56% 142.853 11 Template:Cite_journal 23.34% 141.552 1 Template:Classes_of_natural_numbers 22.73% 137.829 1 Template:Navbox_with_collapsible_groups 15.24% 92.402 1 Template:Short_description 10.51% 63.752 8 Template:Rp 9.36% 56.770 8 Template:R/superscript 8.73% 52.958 2 Template:Pagetype 7.33% 44.468 4 Template:MathWorld --> <!-- Saved in parser cache with key enwiki:pcache:idhash:1055370-0!canonical and timestamp 20241122140811 and revision id 1186908652. 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=Lucas_pseudoprime&oldid=1186908652">https://en.wikipedia.org/w/index.php?title=Lucas_pseudoprime&oldid=1186908652</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">Categories</a>: <ul><li><a href="/wiki/Category:Fibonacci_numbers" title="Category:Fibonacci numbers">Fibonacci numbers</a></li><li><a href="/wiki/Category:Pseudoprimes" title="Category:Pseudoprimes">Pseudoprimes</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_matches_Wikidata" title="Category:Short description matches Wikidata">Short description matches Wikidata</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 26 November 2023, at 07:05<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=Lucas_pseudoprime&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.canary-84779d6bf6-lxzkk","wgBackendResponseTime":118,"wgPageParseReport":{"limitreport":{"cputime":"0.670","walltime":"0.867","ppvisitednodes":{"value":4784,"limit":1000000},"postexpandincludesize":{"value":154734,"limit":2097152},"templateargumentsize":{"value":2892,"limit":2097152},"expansiondepth":{"value":16,"limit":100},"expensivefunctioncount":{"value":1,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":82546,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 606.445 1 -total"," 33.44% 202.823 1 Template:Reflist"," 23.56% 142.853 11 Template:Cite_journal"," 23.34% 141.552 1 Template:Classes_of_natural_numbers"," 22.73% 137.829 1 Template:Navbox_with_collapsible_groups"," 15.24% 92.402 1 Template:Short_description"," 10.51% 63.752 8 Template:Rp"," 9.36% 56.770 8 Template:R/superscript"," 8.73% 52.958 2 Template:Pagetype"," 7.33% 44.468 4 Template:MathWorld"]},"scribunto":{"limitreport-timeusage":{"value":"0.343","limit":"10.000"},"limitreport-memusage":{"value":5624692,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-f69cdc8f6-b7zbx","timestamp":"20241122140811","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Lucas pseudoprime","url":"https:\/\/en.wikipedia.org\/wiki\/Lucas_pseudoprime","sameAs":"http:\/\/www.wikidata.org\/entity\/Q3343106","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q3343106","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-10-10T19:34:33Z","dateModified":"2023-11-26T07:05:17Z","headline":"Probabilistic test for the primality of an integer"}</script> </body> </html>