CINXE.COM
Repeating decimal - 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>Repeating decimal - 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":"41034a7e-cf2e-4ec2-ad67-01d3a4c62dff","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Repeating_decimal","wgTitle":"Repeating decimal","wgCurRevisionId":1258671238,"wgRevisionId":1258671238,"wgArticleId":13612447,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with short description","Short description matches Wikidata","Articles needing additional references from July 2023","All articles needing additional references","Articles needing cleanup from July 2024","All pages needing cleanup","Cleanup tagged articles with a reason field from July 2024","Wikipedia pages needing cleanup from July 2024","Articles with multiple maintenance issues","Articles needing additional references from May 2022", "All articles with unsourced statements","Articles with unsourced statements from October 2023","Elementary arithmetic","Numeral systems"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Repeating_decimal","wgRelevantArticleId":13612447,"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":60000,"wgRelatedArticlesCompat":[],"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage", "wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q389208","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","ext.pygments":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.tablesorter.styles":"ready","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready", "wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","mediawiki.page.media","site","mediawiki.page.ready","jquery.tablesorter","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.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cjquery.tablesorter.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.5"> <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="Repeating decimal - 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/Repeating_decimal"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Repeating_decimal&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/Repeating_decimal"> <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-Repeating_decimal rootpage-Repeating_decimal 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=Repeating+decimal" 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=Repeating+decimal" 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=Repeating+decimal" 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=Repeating+decimal" 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-Background" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Background"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Background</span> </div> </a> <button aria-controls="toc-Background-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 Background subsection</span> </button> <ul id="toc-Background-sublist" class="vector-toc-list"> <li id="toc-Notation" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Notation"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.1</span> <span>Notation</span> </div> </a> <ul id="toc-Notation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Decimal_expansion_and_recurrence_sequence" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Decimal_expansion_and_recurrence_sequence"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.2</span> <span>Decimal expansion and recurrence sequence</span> </div> </a> <ul id="toc-Decimal_expansion_and_recurrence_sequence-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Every_rational_number_is_either_a_terminating_or_repeating_decimal" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Every_rational_number_is_either_a_terminating_or_repeating_decimal"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.3</span> <span>Every rational number is either a terminating or repeating decimal</span> </div> </a> <ul id="toc-Every_rational_number_is_either_a_terminating_or_repeating_decimal-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Every_repeating_or_terminating_decimal_is_a_rational_number" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Every_repeating_or_terminating_decimal_is_a_rational_number"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.4</span> <span>Every repeating or terminating decimal is a rational number</span> </div> </a> <ul id="toc-Every_repeating_or_terminating_decimal_is_a_rational_number-sublist" class="vector-toc-list"> <li id="toc-Formal_proof" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Formal_proof"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.4.1</span> <span>Formal proof</span> </div> </a> <ul id="toc-Formal_proof-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </li> <li id="toc-Table_of_values" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Table_of_values"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Table of values</span> </div> </a> <ul id="toc-Table_of_values-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Fractions_with_prime_denominators" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Fractions_with_prime_denominators"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Fractions with prime denominators</span> </div> </a> <button aria-controls="toc-Fractions_with_prime_denominators-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 Fractions with prime denominators subsection</span> </button> <ul id="toc-Fractions_with_prime_denominators-sublist" class="vector-toc-list"> <li id="toc-Cyclic_numbers" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Cyclic_numbers"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.1</span> <span>Cyclic numbers</span> </div> </a> <ul id="toc-Cyclic_numbers-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Other_reciprocals_of_primes" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Other_reciprocals_of_primes"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2</span> <span>Other reciprocals of primes</span> </div> </a> <ul id="toc-Other_reciprocals_of_primes-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Totient_rule" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Totient_rule"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.3</span> <span>Totient rule</span> </div> </a> <ul id="toc-Totient_rule-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Reciprocals_of_composite_integers_coprime_to_10" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Reciprocals_of_composite_integers_coprime_to_10"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Reciprocals of composite integers coprime to 10</span> </div> </a> <ul id="toc-Reciprocals_of_composite_integers_coprime_to_10-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Reciprocals_of_integers_not_coprime_to_10" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Reciprocals_of_integers_not_coprime_to_10"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Reciprocals of integers not coprime to 10</span> </div> </a> <ul id="toc-Reciprocals_of_integers_not_coprime_to_10-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Converting_repeating_decimals_to_fractions" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Converting_repeating_decimals_to_fractions"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Converting repeating decimals to fractions</span> </div> </a> <button aria-controls="toc-Converting_repeating_decimals_to_fractions-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 Converting repeating decimals to fractions subsection</span> </button> <ul id="toc-Converting_repeating_decimals_to_fractions-sublist" class="vector-toc-list"> <li id="toc-A_shortcut" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#A_shortcut"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1</span> <span>A shortcut</span> </div> </a> <ul id="toc-A_shortcut-sublist" class="vector-toc-list"> <li id="toc-In_compressed_form" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#In_compressed_form"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.1</span> <span>In compressed form</span> </div> </a> <ul id="toc-In_compressed_form-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </li> <li id="toc-Repeating_decimals_as_infinite_series" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Repeating_decimals_as_infinite_series"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>Repeating decimals as infinite series</span> </div> </a> <ul id="toc-Repeating_decimals_as_infinite_series-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Multiplication_and_cyclic_permutation" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Multiplication_and_cyclic_permutation"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>Multiplication and cyclic permutation</span> </div> </a> <ul id="toc-Multiplication_and_cyclic_permutation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Other_properties_of_repetend_lengths" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Other_properties_of_repetend_lengths"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>Other properties of repetend lengths</span> </div> </a> <ul id="toc-Other_properties_of_repetend_lengths-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Extension_to_other_bases" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Extension_to_other_bases"> <div class="vector-toc-text"> <span class="vector-toc-numb">10</span> <span>Extension to other bases</span> </div> </a> <button aria-controls="toc-Extension_to_other_bases-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 Extension to other bases subsection</span> </button> <ul id="toc-Extension_to_other_bases-sublist" class="vector-toc-list"> <li id="toc-Algorithm_for_positive_bases" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Algorithm_for_positive_bases"> <div class="vector-toc-text"> <span class="vector-toc-numb">10.1</span> <span>Algorithm for positive bases</span> </div> </a> <ul id="toc-Algorithm_for_positive_bases-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Applications_to_cryptography" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Applications_to_cryptography"> <div class="vector-toc-text"> <span class="vector-toc-numb">11</span> <span>Applications to cryptography</span> </div> </a> <ul id="toc-Applications_to_cryptography-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">12</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Notes" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Notes"> <div class="vector-toc-text"> <span class="vector-toc-numb">13</span> <span>Notes</span> </div> </a> <ul id="toc-Notes-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">14</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">Repeating decimal</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 33 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-33" 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">33 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-af mw-list-item"><a href="https://af.wikipedia.org/wiki/Repeterende_breuk" title="Repeterende breuk – Afrikaans" lang="af" hreflang="af" data-title="Repeterende breuk" data-language-autonym="Afrikaans" data-language-local-name="Afrikaans" class="interlanguage-link-target"><span>Afrikaans</span></a></li><li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%AA%D9%83%D8%B1%D8%A7%D8%B1_%D8%B9%D8%B4%D8%B1%D9%8A" title="تكرار عشري – Arabic" lang="ar" hreflang="ar" data-title="تكرار عشري" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Nombre_decimal_peri%C3%B2dic" title="Nombre decimal periòdic – Catalan" lang="ca" hreflang="ca" data-title="Nombre decimal periòdic" data-language-autonym="Català" data-language-local-name="Catalan" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Perioda_(matematika)" title="Perioda (matematika) – Czech" lang="cs" hreflang="cs" data-title="Perioda (matematika)" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Rationale_Zahl#Dezimalbruchentwicklung" title="Rationale Zahl – German" lang="de" hreflang="de" data-title="Rationale Zahl" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-el mw-list-item"><a href="https://el.wikipedia.org/wiki/%CE%A0%CE%B5%CF%81%CE%B9%CE%BF%CE%B4%CE%B9%CE%BA%CF%8C%CF%82_%CE%B1%CF%81%CE%B9%CE%B8%CE%BC%CF%8C%CF%82" title="Περιοδικός αριθμός – Greek" lang="el" hreflang="el" data-title="Περιοδικός αριθμός" data-language-autonym="Ελληνικά" data-language-local-name="Greek" class="interlanguage-link-target"><span>Ελληνικά</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/N%C3%BAmero_decimal_peri%C3%B3dico" title="Número decimal periódico – Spanish" lang="es" hreflang="es" data-title="Número decimal periódico" 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-eu mw-list-item"><a href="https://eu.wikipedia.org/wiki/Zenbaki_hamartar_periodiko" title="Zenbaki hamartar periodiko – Basque" lang="eu" hreflang="eu" data-title="Zenbaki hamartar periodiko" data-language-autonym="Euskara" data-language-local-name="Basque" class="interlanguage-link-target"><span>Euskara</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%AF%D9%87%E2%80%8C%D8%AF%D9%87%DB%8C_%D9%85%D8%AA%D9%86%D8%A7%D9%88%D8%A8" title="دهدهی متناوب – Persian" lang="fa" hreflang="fa" data-title="دهدهی متناوب" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/D%C3%A9veloppement_d%C3%A9cimal_p%C3%A9riodique" title="Développement décimal périodique – French" lang="fr" hreflang="fr" data-title="Développement décimal périodique" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikipedia.org/wiki/Decimal_peri%C3%B3dico" title="Decimal periódico – Galician" lang="gl" hreflang="gl" data-title="Decimal periódico" data-language-autonym="Galego" data-language-local-name="Galician" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EC%88%9C%ED%99%98%EC%86%8C%EC%88%98" title="순환소수 – Korean" lang="ko" hreflang="ko" data-title="순환소수" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Numero_decimale_periodico" title="Numero decimale periodico – Italian" lang="it" hreflang="it" data-title="Numero decimale periodico" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/%D7%A9%D7%91%D7%A8_%D7%9E%D7%97%D7%96%D7%95%D7%A8%D7%99" title="שבר מחזורי – Hebrew" lang="he" hreflang="he" data-title="שבר מחזורי" data-language-autonym="עברית" data-language-local-name="Hebrew" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-mt mw-list-item"><a href="https://mt.wikipedia.org/wiki/De%C4%8Bimali_ripetuti" title="Deċimali ripetuti – Maltese" lang="mt" hreflang="mt" data-title="Deċimali ripetuti" data-language-autonym="Malti" data-language-local-name="Maltese" class="interlanguage-link-target"><span>Malti</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Repeterende_breuk" title="Repeterende breuk – Dutch" lang="nl" hreflang="nl" data-title="Repeterende breuk" data-language-autonym="Nederlands" data-language-local-name="Dutch" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E5%BE%AA%E7%92%B0%E5%B0%8F%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-no mw-list-item"><a href="https://no.wikipedia.org/wiki/Periodisk_desimaltall" title="Periodisk desimaltall – Norwegian Bokmål" lang="nb" hreflang="nb" data-title="Periodisk desimaltall" data-language-autonym="Norsk bokmål" data-language-local-name="Norwegian Bokmål" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-pa mw-list-item"><a href="https://pa.wikipedia.org/wiki/%E0%A8%B5%E0%A8%BE%E0%A8%B0%E0%A8%B5%E0%A8%BE%E0%A8%B0%E0%A9%80_%E0%A8%87%E0%A8%B8%E0%A8%BC%E0%A8%BE%E0%A8%B0%E0%A9%80%E0%A8%86" title="ਵਾਰਵਾਰੀ ਇਸ਼ਾਰੀਆ – Punjabi" lang="pa" hreflang="pa" data-title="ਵਾਰਵਾਰੀ ਇਸ਼ਾਰੀਆ" data-language-autonym="ਪੰਜਾਬੀ" data-language-local-name="Punjabi" class="interlanguage-link-target"><span>ਪੰਜਾਬੀ</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/U%C5%82amek_dziesi%C4%99tny_niesko%C5%84czony" title="Ułamek dziesiętny nieskończony – Polish" lang="pl" hreflang="pl" data-title="Ułamek dziesiętny nieskończony" data-language-autonym="Polski" data-language-local-name="Polish" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/D%C3%ADzima_peri%C3%B3dica" title="Dízima periódica – Portuguese" lang="pt" hreflang="pt" data-title="Dízima periódica" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ru badge-Q70894304 mw-list-item" title=""><a href="https://ru.wikipedia.org/wiki/%D0%9F%D0%B5%D1%80%D0%B8%D0%BE%D0%B4%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B0%D1%8F_%D0%B4%D0%B5%D1%81%D1%8F%D1%82%D0%B8%D1%87%D0%BD%D0%B0%D1%8F_%D0%B4%D1%80%D0%BE%D0%B1%D1%8C" title="Периодическая десятичная дробь – Russian" lang="ru" hreflang="ru" data-title="Периодическая десятичная дробь" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/Repeating_decimal" title="Repeating decimal – Simple English" lang="en-simple" hreflang="en-simple" data-title="Repeating decimal" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-sk mw-list-item"><a href="https://sk.wikipedia.org/wiki/Peri%C3%B3da_(matematika)" title="Perióda (matematika) – Slovak" lang="sk" hreflang="sk" data-title="Perióda (matematika)" data-language-autonym="Slovenčina" data-language-local-name="Slovak" class="interlanguage-link-target"><span>Slovenčina</span></a></li><li class="interlanguage-link interwiki-sl mw-list-item"><a href="https://sl.wikipedia.org/wiki/Deseti%C5%A1ki_ulomek" title="Desetiški ulomek – Slovenian" lang="sl" hreflang="sl" data-title="Desetiški ulomek" data-language-autonym="Slovenščina" data-language-local-name="Slovenian" class="interlanguage-link-target"><span>Slovenščina</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/Jaksollinen_desimaaliluku" title="Jaksollinen desimaaliluku – Finnish" lang="fi" hreflang="fi" data-title="Jaksollinen desimaaliluku" data-language-autonym="Suomi" data-language-local-name="Finnish" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-ta mw-list-item"><a href="https://ta.wikipedia.org/wiki/%E0%AE%AE%E0%AF%80%E0%AE%B3%E0%AF%81%E0%AE%AE%E0%AF%8D_%E0%AE%A4%E0%AE%9A%E0%AE%AE%E0%AE%99%E0%AF%8D%E0%AE%95%E0%AE%B3%E0%AF%8D" title="மீளும் தசமங்கள் – Tamil" lang="ta" hreflang="ta" data-title="மீளும் தசமங்கள்" data-language-autonym="தமிழ்" data-language-local-name="Tamil" class="interlanguage-link-target"><span>தமிழ்</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%97%E0%B8%A8%E0%B8%99%E0%B8%B4%E0%B8%A2%E0%B8%A1%E0%B8%8B%E0%B9%89%E0%B8%B3" title="ทศนิยมซ้ำ – Thai" lang="th" hreflang="th" data-title="ทศนิยมซ้ำ" data-language-autonym="ไทย" data-language-local-name="Thai" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/Devirli_say%C4%B1" title="Devirli sayı – Turkish" lang="tr" hreflang="tr" data-title="Devirli sayı" data-language-autonym="Türkçe" data-language-local-name="Turkish" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-ur mw-list-item"><a href="https://ur.wikipedia.org/wiki/%D9%84%D8%A7%D9%85%D8%B9%DB%8C%D8%AF_%D8%A7%D8%B9%D8%B4%D8%A7%D8%B1%DB%8C%DB%81" title="لامعید اعشاریہ – Urdu" lang="ur" hreflang="ur" data-title="لامعید اعشاریہ" data-language-autonym="اردو" data-language-local-name="Urdu" class="interlanguage-link-target"><span>اردو</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/S%E1%BB%91_th%E1%BA%ADp_ph%C3%A2n_v%C3%B4_h%E1%BA%A1n_tu%E1%BA%A7n_ho%C3%A0n" title="Số thập phân vô hạn tuần hoàn – Vietnamese" lang="vi" hreflang="vi" data-title="Số thập phân vô hạn tuần hoàn" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnamese" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/%E5%BE%AA%E7%92%B0%E5%B0%8F%E6%95%B8" title="循環小數 – Cantonese" lang="yue" hreflang="yue" data-title="循環小數" data-language-autonym="粵語" data-language-local-name="Cantonese" class="interlanguage-link-target"><span>粵語</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E5%BE%AA%E7%8E%AF%E5%B0%8F%E6%95%B0" title="循环小数 – Chinese" lang="zh" hreflang="zh" data-title="循环小数" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q389208#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/Repeating_decimal" 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:Repeating_decimal" 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/Repeating_decimal"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Repeating_decimal&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=Repeating_decimal&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/Repeating_decimal"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Repeating_decimal&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=Repeating_decimal&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/Repeating_decimal" 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/Repeating_decimal" 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=Repeating_decimal&oldid=1258671238" 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=Repeating_decimal&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=Repeating_decimal&id=1258671238&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%2FRepeating_decimal"><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%2FRepeating_decimal"><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=Repeating_decimal&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=Repeating_decimal&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/Q389208" 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">Decimal representation of a number whose digits are periodic</div> <style data-mw-deduplicate="TemplateStyles:r1236090951">.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}</style><div role="note" class="hatnote navigation-not-searchable">"Repeating fraction" redirects here. Not to be confused with <a href="/wiki/Continued_fraction" title="Continued fraction">continued fraction</a>.</div> <style data-mw-deduplicate="TemplateStyles:r1251242444">.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}</style><style data-mw-deduplicate="TemplateStyles:r1248332772">.mw-parser-output .multiple-issues-text{width:95%;margin:0.2em 0}.mw-parser-output .multiple-issues-text>.mw-collapsible-content{margin-top:0.3em}.mw-parser-output .compact-ambox .ambox{border:none;border-collapse:collapse;background-color:transparent;margin:0 0 0 1.6em!important;padding:0!important;width:auto;display:block}body.mediawiki .mw-parser-output .compact-ambox .ambox.mbox-small-left{font-size:100%;width:auto;margin:0}.mw-parser-output .compact-ambox .ambox .mbox-text{padding:0!important;margin:0!important}.mw-parser-output .compact-ambox .ambox .mbox-text-span{display:list-item;line-height:1.5em;list-style-type:disc}body.skin-minerva .mw-parser-output .multiple-issues-text>.mw-collapsible-toggle,.mw-parser-output .compact-ambox .ambox .mbox-image,.mw-parser-output .compact-ambox .ambox .mbox-imageright,.mw-parser-output .compact-ambox .ambox .mbox-empty-cell,.mw-parser-output .compact-ambox .hide-when-compact{display:none}</style><table class="box-Multiple_issues plainlinks metadata ambox ambox-content ambox-multiple_issues compact-ambox" role="presentation"><tbody><tr><td class="mbox-image"><div class="mbox-image-div"><span typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/b/b4/Ambox_important.svg/40px-Ambox_important.svg.png" decoding="async" width="40" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/b/b4/Ambox_important.svg/60px-Ambox_important.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/b/b4/Ambox_important.svg/80px-Ambox_important.svg.png 2x" data-file-width="40" data-file-height="40" /></span></span></div></td><td class="mbox-text"><div class="mbox-text-span"><div class="multiple-issues-text mw-collapsible"><b>This article has multiple issues.</b> Please help <b><a href="/wiki/Special:EditPage/Repeating_decimal" title="Special:EditPage/Repeating decimal">improve it</a></b> or discuss these issues on the <b><a href="/wiki/Talk:Repeating_decimal" title="Talk:Repeating decimal">talk page</a></b>. <small><i>(<a href="/wiki/Help:Maintenance_template_removal" title="Help:Maintenance template removal">Learn how and when to remove these messages</a>)</i></small> <div class="mw-collapsible-content"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1251242444"><table class="box-More_citations_needed plainlinks metadata ambox ambox-content ambox-Refimprove" role="presentation"><tbody><tr><td class="mbox-image"><div class="mbox-image-div"><span typeof="mw:File"><a href="/wiki/File:Question_book-new.svg" class="mw-file-description"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/50px-Question_book-new.svg.png" decoding="async" width="50" height="39" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/75px-Question_book-new.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/100px-Question_book-new.svg.png 2x" data-file-width="512" data-file-height="399" /></a></span></div></td><td class="mbox-text"><div class="mbox-text-span">This article <b>needs additional citations for <a href="/wiki/Wikipedia:Verifiability" title="Wikipedia:Verifiability">verification</a></b>.<span class="hide-when-compact"> Please help <a href="/wiki/Special:EditPage/Repeating_decimal" title="Special:EditPage/Repeating decimal">improve this article</a> by <a href="/wiki/Help:Referencing_for_beginners" title="Help:Referencing for beginners">adding citations to reliable sources</a>. Unsourced material may be challenged and removed.<br /><small><span class="plainlinks"><i>Find sources:</i> <a rel="nofollow" class="external text" href="https://www.google.com/search?as_eq=wikipedia&q=%22Repeating+decimal%22">"Repeating decimal"</a> – <a rel="nofollow" class="external text" href="https://www.google.com/search?tbm=nws&q=%22Repeating+decimal%22+-wikipedia&tbs=ar:1">news</a> <b>·</b> <a rel="nofollow" class="external text" href="https://www.google.com/search?&q=%22Repeating+decimal%22&tbs=bkt:s&tbm=bks">newspapers</a> <b>·</b> <a rel="nofollow" class="external text" href="https://www.google.com/search?tbs=bks:1&q=%22Repeating+decimal%22+-wikipedia">books</a> <b>·</b> <a rel="nofollow" class="external text" href="https://scholar.google.com/scholar?q=%22Repeating+decimal%22">scholar</a> <b>·</b> <a rel="nofollow" class="external text" href="https://www.jstor.org/action/doBasicSearch?Query=%22Repeating+decimal%22&acc=on&wc=on">JSTOR</a></span></small></span> <span class="date-container"><i>(<span class="date">July 2023</span>)</i></span><span class="hide-when-compact"><i> (<small><a href="/wiki/Help:Maintenance_template_removal" title="Help:Maintenance template removal">Learn how and when to remove this message</a></small>)</i></span></div></td></tr></tbody></table> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1251242444"><table class="box-Cleanup plainlinks metadata ambox ambox-style ambox-Cleanup" role="presentation"><tbody><tr><td class="mbox-image"><div class="mbox-image-div"><span typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/f/f2/Edit-clear.svg/40px-Edit-clear.svg.png" decoding="async" width="40" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/f/f2/Edit-clear.svg/60px-Edit-clear.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/f/f2/Edit-clear.svg/80px-Edit-clear.svg.png 2x" data-file-width="48" data-file-height="48" /></span></span></div></td><td class="mbox-text"><div class="mbox-text-span">This article may <b>require <a href="/wiki/Wikipedia:Cleanup" title="Wikipedia:Cleanup">cleanup</a></b> to meet Wikipedia's <a href="/wiki/Wikipedia:Manual_of_Style" title="Wikipedia:Manual of Style">quality standards</a>. The specific problem is: <b>The article is polluted with multiple non-encyclopedic tables, often placed before the true content that is hidden by them. Section are placed in a random order with the most important facts relegated toward the end of the article.</b><span class="hide-when-compact"> Please help <a href="/wiki/Special:EditPage/Repeating_decimal" title="Special:EditPage/Repeating decimal">improve this article</a> if you can.</span> <span class="date-container"><i>(<span class="date">July 2024</span>)</i></span><span class="hide-when-compact"><i> (<small><a href="/wiki/Help:Maintenance_template_removal" title="Help:Maintenance template removal">Learn how and when to remove this message</a></small>)</i></span></div></td></tr></tbody></table> </div> </div><span class="hide-when-compact"><i> (<small><a href="/wiki/Help:Maintenance_template_removal" title="Help:Maintenance template removal">Learn how and when to remove this message</a></small>)</i></span></div></td></tr></tbody></table> <p>A <b>repeating decimal</b> or <b>recurring decimal</b> is a <a href="/wiki/Decimal_representation" title="Decimal representation">decimal representation</a> of a number whose <a href="/wiki/Numerical_digit" title="Numerical digit">digits</a> are eventually <a href="/wiki/Periodic_function" title="Periodic function">periodic</a> (that is, after some place, the same sequence of digits is repeated forever); if this sequence consists only of zeros (that is if there is only a finite number of nonzero digits), the decimal is said to be <i>terminating</i>, and is not considered as repeating. </p><p>It can be shown that a number is <a href="/wiki/Rational_number" title="Rational number">rational</a> if and only if its decimal representation is repeating or terminating. For example, the decimal representation of <style data-mw-deduplicate="TemplateStyles:r1214402035">.mw-parser-output .sfrac{white-space:nowrap}.mw-parser-output .sfrac.tion,.mw-parser-output .sfrac .tion{display:inline-block;vertical-align:-0.5em;font-size:85%;text-align:center}.mw-parser-output .sfrac .num{display:block;line-height:1em;margin:0.0em 0.1em;border-bottom:1px solid}.mw-parser-output .sfrac .den{display:block;line-height:1em;margin:0.1em 0.1em}.mw-parser-output .sr-only{border:0;clip:rect(0,0,0,0);clip-path:polygon(0px 0px,0px 0px,0px 0px);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}</style><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">3</span></span>⁠</span> becomes periodic just after the <a href="/wiki/Decimal_point" class="mw-redirect" title="Decimal point">decimal point</a>, repeating the single digit "3" forever, i.e. 0.333.... A more complicated example is <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">3227</span><span class="sr-only">/</span><span class="den">555</span></span>⁠</span>, whose decimal becomes periodic at the <i>second</i> digit following the decimal point and then repeats the sequence "144" forever, i.e. 5.8144144144.... Another example of this is <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">593</span><span class="sr-only">/</span><span class="den">53</span></span>⁠</span>, which becomes periodic after the decimal point, repeating the 13-digit pattern "1886792452830" forever, i.e. 11.18867924528301886792452830.... </p><p><span class="anchor" id="terminating_decimal"></span> The infinitely repeated digit sequence is called the <b>repetend</b> or <b>reptend</b>. If the repetend is a zero, this decimal representation is called a <b>terminating decimal</b> rather than a repeating decimal, since the zeros can be omitted and the decimal terminates before these zeros.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> Every terminating decimal representation can be written as a <a href="/wiki/Decimal_fraction" class="mw-redirect" title="Decimal fraction">decimal fraction</a>, a fraction whose denominator is a <a href="/wiki/Power_(math)" class="mw-redirect" title="Power (math)">power</a> of 10 (e.g. <span class="nowrap">1.585 = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1585</span><span class="sr-only">/</span><span class="den">1000</span></span>⁠</span></span>); it may also be written as a <a href="/wiki/Ratio" title="Ratio">ratio</a> of the form <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num"><i>k</i></span><span class="sr-only">/</span><span class="den">2<sup><i>n</i></sup>·5<sup><i>m</i></sup></span></span>⁠</span> (e.g. <span class="nowrap">1.585 = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">317</span><span class="sr-only">/</span><span class="den">2<sup>3</sup>·5<sup>2</sup></span></span>⁠</span></span>). However, <i>every</i> number with a terminating decimal representation also trivially has a second, alternative representation as a repeating decimal whose repetend is the digit <b>9</b>. This is obtained by decreasing the final (rightmost) non-zero digit by one and appending a repetend of 9. Two examples of this are <a href="/wiki/0.999..." title="0.999..."><span class="nowrap">1.000... = 0.999...</span></a> and <span class="nowrap">1.585000... = 1.584999...</span>. (This type of repeating decimal can be obtained by long division if one uses a modified form of the usual <a href="/wiki/Division_algorithm" title="Division algorithm">division algorithm</a>.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>) </p><p>Any number that cannot be expressed as a <a href="/wiki/Ratio" title="Ratio">ratio</a> of two <a href="/wiki/Integer" title="Integer">integers</a> is said to be <a href="/wiki/Irrational_number" title="Irrational number">irrational</a>. Their decimal representation neither terminates nor infinitely repeats, but extends forever without repetition (see <a href="#Every_rational_number_is_either_a_terminating_or_repeating_decimal">§ Every rational number is either a terminating or repeating decimal</a>). Examples of such irrational numbers are <a href="/wiki/Square_root_of_2" title="Square root of 2"><span class="texhtml"><span class="nowrap">√<span style="border-top:1px solid; padding:0 0.1em;">2</span></span></span></a> and <a href="/wiki/Pi" title="Pi"><span class="texhtml mvar" style="font-style:italic;">π</span></a>.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Background">Background</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=1" title="Edit section: Background"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Notation">Notation</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=2" title="Edit section: Notation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1251242444"><table class="box-Unreferenced_section plainlinks metadata ambox ambox-content ambox-Unreferenced" role="presentation"><tbody><tr><td class="mbox-image"><div class="mbox-image-div"><span typeof="mw:File"><a href="/wiki/File:Question_book-new.svg" class="mw-file-description"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/50px-Question_book-new.svg.png" decoding="async" width="50" height="39" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/75px-Question_book-new.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/100px-Question_book-new.svg.png 2x" data-file-width="512" data-file-height="399" /></a></span></div></td><td class="mbox-text"><div class="mbox-text-span">This section <b>does not <a href="/wiki/Wikipedia:Citing_sources" title="Wikipedia:Citing sources">cite</a> any <a href="/wiki/Wikipedia:Verifiability" title="Wikipedia:Verifiability">sources</a></b>.<span class="hide-when-compact"> Please help <a href="/wiki/Special:EditPage/Repeating_decimal" title="Special:EditPage/Repeating decimal">improve this section</a> by <a href="/wiki/Help:Referencing_for_beginners" title="Help:Referencing for beginners">adding citations to reliable sources</a>. Unsourced material may be challenged and <a href="/wiki/Wikipedia:Verifiability#Burden_of_evidence" title="Wikipedia:Verifiability">removed</a>.</span> <span class="date-container"><i>(<span class="date">May 2022</span>)</i></span><span class="hide-when-compact"><i> (<small><a href="/wiki/Help:Maintenance_template_removal" title="Help:Maintenance template removal">Learn how and when to remove this message</a></small>)</i></span></div></td></tr></tbody></table> <p>There are several notational conventions for representing repeating decimals. None of them are accepted universally. </p> <table class="wikitable" style="margin-left: auto; margin-right: auto; border: none;"> <caption>Different notations with examples </caption> <tbody><tr> <th colspan="2">Fraction </th> <th><a href="/wiki/Vinculum_(symbol)" title="Vinculum (symbol)">Vinculum</a> </th> <th>Dots </th> <th><a href="/wiki/Parentheses" class="mw-redirect" title="Parentheses">Parentheses</a> </th> <th>Arc </th> <th><a href="/wiki/Ellipsis" title="Ellipsis">Ellipsis</a> </th></tr> <tr> <td style="text-align:center;border-right:none;"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">9</span></span>⁠</span></td> <td style="padding:0;border-left:none;"> </td> <td>0.<span style="text-decoration:overline;">1</span> </td> <td>0.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">1</span></span></span> </td> <td>0.(1) </td> <td>0.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: black; border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">1</span> </td> <td>0.111... </td></tr> <tr> <td style="text-align:center;border-right:none;"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">3</span></span>⁠</span></td> <td style="padding:0;border-left:none;">= <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">3</span><span class="sr-only">/</span><span class="den">9</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">3</span> </td> <td>0.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">3</span></span></span> </td> <td>0.(3) </td> <td>0.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: black; border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">3</span> </td> <td>0.333... </td></tr> <tr> <td style="text-align:center;border-right:none;"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">2</span><span class="sr-only">/</span><span class="den">3</span></span>⁠</span></td> <td style="padding:0;border-left:none;">= <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">6</span><span class="sr-only">/</span><span class="den">9</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">6</span> </td> <td>0.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">6</span></span></span> </td> <td>0.(6) </td> <td>0.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: black; border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">6</span> </td> <td>0.666... </td></tr> <tr> <td style="text-align:center;border-right:none;"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">9</span><span class="sr-only">/</span><span class="den">11</span></span>⁠</span></td> <td style="padding:0;border-left:none;">= <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">81</span><span class="sr-only">/</span><span class="den">99</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">81</span> </td> <td>0.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">8</span></span></span><span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">1</span></span></span> </td> <td>0.(81) </td> <td>0.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: black; border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">81</span> </td> <td>0.8181... </td></tr> <tr> <td style="text-align:center;border-right:none;"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">7</span><span class="sr-only">/</span><span class="den">12</span></span>⁠</span></td> <td style="padding:0;border-left:none;">= <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">525</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> </td> <td>0.58<span style="text-decoration:overline;">3</span> </td> <td>0.58<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">3</span></span></span> </td> <td>0.58(3) </td> <td>0.58<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: black; border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">3</span> </td> <td><span style="white-space:nowrap">0.58<span style="margin-left:0.25em">333</span></span>... </td></tr> <tr> <td style="text-align:center;border-right:none;"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span></td> <td style="padding:0;border-left:none;">= <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">142857</span><span class="sr-only">/</span><span class="den">999999</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">142857</span> </td> <td>0.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">1</span></span></span>4285<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">7</span></span></span> </td> <td>0.(142857) </td> <td>0.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: black; border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">142857</span> </td> <td><span style="white-space:nowrap">0.142857<span style="margin-left:0.25em">142857</span></span>... </td></tr> <tr> <td style="text-align:center;border-right:none;"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">81</span></span>⁠</span></td> <td style="padding:0;border-left:none;">= <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">12345679</span><span class="sr-only">/</span><span class="den">999999999</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">012345679</span> </td> <td>0.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">0</span></span></span>1234567<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">9</span></span></span> </td> <td>0.(012345679) </td> <td>0.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: black; border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">012345679</span> </td> <td><span style="white-space:nowrap">0.012345679<span style="margin-left:0.25em">012345679</span></span>... </td></tr> <tr> <td style="text-align:center;border-right:none;"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">22</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span></td> <td style="padding:0;border-left:none;">= <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">3142854</span><span class="sr-only">/</span><span class="den">999999</span></span>⁠</span> </td> <td>3.<span style="text-decoration:overline;">142857</span> </td> <td>3.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">1</span></span></span>4285<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">7</span></span></span> </td> <td>3.(142857) </td> <td>3.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: black; border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">142857</span> </td> <td><span style="white-space:nowrap">3.142857<span style="margin-left:0.25em">142857</span></span>... </td></tr> <tr> <td style="text-align:center;border-right:none;"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">593</span><span class="sr-only">/</span><span class="den">53</span></span>⁠</span></td> <td style="padding:0;border-left:none;">= <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">111886792452819</span><span class="sr-only">/</span><span class="den">9999999999999</span></span>⁠</span> </td> <td>11.<span style="text-decoration:overline;">1886792452830</span> </td> <td>11.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">1</span></span></span>88679245283<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">0</span></span></span> </td> <td>11.(1886792452830) </td> <td>11.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: black; border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">1886792452830</span> </td> <td><span style="white-space:nowrap">11.1886792452830<span style="margin-left:0.25em">1886792452830</span></span>... </td></tr></tbody></table> <ul><li><b>Vinculum</b>: In the <a href="/wiki/United_States" title="United States">United States</a>, <a href="/wiki/Canada" title="Canada">Canada</a>, <a href="/wiki/India" title="India">India</a>, <a href="/wiki/France" title="France">France</a>, <a href="/wiki/Germany" title="Germany">Germany</a>, <a href="/wiki/Italy" title="Italy">Italy</a>, <a href="/wiki/Switzerland" title="Switzerland">Switzerland</a>, the <a href="/wiki/Czech_Republic" title="Czech Republic">Czech Republic</a>, <a href="/wiki/Slovakia" title="Slovakia">Slovakia</a>, <a href="/wiki/Slovenia" title="Slovenia">Slovenia</a>, <a href="/wiki/Chile" title="Chile">Chile</a>, and <a href="/wiki/Turkey" title="Turkey">Turkey</a>, the convention is to draw a horizontal line (a vinculum) above the repetend.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup></li> <li><b>Dots</b>: In some Islamic countries, such as <a href="/wiki/Malaysia" title="Malaysia">Malaysia</a>, <a href="/wiki/Morocco" title="Morocco">Morocco</a>, <a href="/wiki/Pakistan" title="Pakistan">Pakistan</a>, <a href="/wiki/Tunisia" title="Tunisia">Tunisia</a>, <a href="/wiki/Iran" title="Iran">Iran</a>, <a href="/wiki/Algeria" title="Algeria">Algeria</a> and <a href="/wiki/Egypt" title="Egypt">Egypt</a>, as well as the <a href="/wiki/United_Kingdom" title="United Kingdom">United Kingdom</a>, <a href="/wiki/New_Zealand" title="New Zealand">New Zealand</a>, <a href="/wiki/Australia" title="Australia">Australia</a>, <a href="/wiki/South_Africa" title="South Africa">South Africa</a>, <a href="/wiki/Japan" title="Japan">Japan</a>, <a href="/wiki/Thailand" title="Thailand">Thailand</a>, India, <a href="/wiki/South_Korea" title="South Korea">South Korea</a>, <a href="/wiki/Singapore" title="Singapore">Singapore</a>, and the <a href="/wiki/People%27s_Republic_of_China" class="mw-redirect" title="People's Republic of China">People's Republic of China</a>, the convention is to place dots above the outermost numerals of the repetend.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (October 2023)">citation needed</span></a></i>]</sup></li> <li><b>Parentheses</b>: In parts of <a href="/wiki/Europe" title="Europe">Europe</a>, incl. <a href="/wiki/Austria" title="Austria">Austria</a>, <a href="/wiki/Denmark" title="Denmark">Denmark</a>, <a href="/wiki/Finland" title="Finland">Finland</a>, the <a href="/wiki/Netherlands" title="Netherlands">Netherlands</a>, <a href="/wiki/Norway" title="Norway">Norway</a>, <a href="/wiki/Poland" title="Poland">Poland</a>, <a href="/wiki/Russia" title="Russia">Russia</a> and <a href="/wiki/Ukraine" title="Ukraine">Ukraine</a>, as well as <a href="/wiki/Vietnam" title="Vietnam">Vietnam</a> and <a href="/wiki/Israel" title="Israel">Israel</a>, the convention is to enclose the repetend in parentheses. This can cause confusion with the notation for <a href="/wiki/Standard_uncertainty" class="mw-redirect" title="Standard uncertainty">standard uncertainty</a>.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (October 2023)">citation needed</span></a></i>]</sup></li> <li><b>Arc</b>: In <a href="/wiki/Spain" title="Spain">Spain</a> and some <a href="/wiki/Latin_America" title="Latin America">Latin American</a> countries, such as <a href="/wiki/Argentina" title="Argentina">Argentina</a>, <a href="/wiki/Brazil" title="Brazil">Brazil</a>, and <a href="/wiki/Mexico" title="Mexico">Mexico</a>, the arc notation over the repetend is also used as an alternative to the vinculum and the dots notation.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (October 2023)">citation needed</span></a></i>]</sup></li> <li><b>Ellipsis</b>: Informally, repeating decimals are often represented by an ellipsis (three periods, 0.333...), especially when the previous notational conventions are first taught in school. This notation introduces uncertainty as to which digits should be repeated and even whether repetition is occurring at all, since such ellipses are also employed for <a href="/wiki/Irrational_number" title="Irrational number">irrational numbers</a>; <a href="/wiki/Pi" title="Pi"><span class="texhtml mvar" style="font-style:italic;">π</span></a>, for example, can be represented as 3.14159....<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (October 2023)">citation needed</span></a></i>]</sup></li></ul> <p>In English, there are various ways to read repeating decimals aloud. For example, 1.2<span style="text-decoration:overline;">34</span> may be read "one point two repeating three four", "one point two repeated three four", "one point two recurring three four", "one point two repetend three four" or "one point two into infinity three four". Likewise, 11.<span style="text-decoration:overline;">1886792452830</span> may be read "eleven point repeating one double eight six seven nine two four five two eight three zero", "eleven point repeated one double eight six seven nine two four five two eight three zero", "eleven point recurring one double eight six seven nine two four five two eight three zero" "eleven point repetend one double eight six seven nine two four five two eight three zero" or "eleven point into infinity one double eight six seven nine two four five two eight three zero". </p> <div class="mw-heading mw-heading3"><h3 id="Decimal_expansion_and_recurrence_sequence">Decimal expansion and recurrence sequence</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=3" title="Edit section: Decimal expansion and recurrence sequence"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In order to convert a <a href="/wiki/Rational_number" title="Rational number">rational number</a> represented as a fraction into decimal form, one may use <a href="/wiki/Long_division" title="Long division">long division</a>. For example, consider the rational number <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">5</span><span class="sr-only">/</span><span class="den">74</span></span>⁠</span>: </p> <pre> <u> 0.0<span style="text-decoration:overline;">675</span></u> 74 ) 5.00000 <u>4.44</u> 560 <u>518</u> 420 <u>370</u> 500 </pre> <p>etc. Observe that at each step we have a remainder; the successive remainders displayed above are 56, 42, 50. When we arrive at 50 as the remainder, and bring down the "0", we find ourselves dividing 500 by 74, which is the same problem we began with. Therefore, the decimal repeats: <span style="white-space:nowrap">0.0675<span style="margin-left:0.25em">675</span><span style="margin-left:0.25em">675</span></span>.... </p><p>For any integer fraction <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num"><i>A</i></span><span class="sr-only">/</span><span class="den"><i>B</i></span></span>⁠</span>, the remainder at step k, for any positive integer <i>k</i>, is <i>A</i> × 10<sup><i>k</i></sup> (modulo <i>B</i>). </p> <div class="mw-heading mw-heading3"><h3 id="Every_rational_number_is_either_a_terminating_or_repeating_decimal">Every rational number is either a terminating or repeating decimal</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=4" title="Edit section: Every rational number is either a terminating or repeating decimal"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For any given divisor, only finitely many different remainders can occur. In the example above, the 74 possible remainders are 0, 1, 2, ..., 73. If at any point in the division the remainder is 0, the expansion terminates at that point. Then the length of the repetend, also called "period", is defined to be 0. </p><p>If 0 never occurs as a remainder, then the division process continues forever, and eventually, a remainder must occur that has occurred before. The next step in the division will yield the same new digit in the quotient, and the same new remainder, as the previous time the remainder was the same. Therefore, the following division will repeat the same results. The repeating sequence of digits is called "repetend" which has a certain length greater than 0, also called "period".<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> </p><p>In base 10, a fraction has a repeating decimal if and only if <a href="/wiki/In_lowest_terms" class="mw-redirect" title="In lowest terms">in lowest terms</a>, its denominator has any prime factors besides 2 or 5, or in other words, cannot be expressed as 2<sup><i>m</i></sup> 5<sup><i>n</i></sup>, where <i>m</i> and <i>n</i> are non-negative integers. </p> <div class="mw-heading mw-heading3"><h3 id="Every_repeating_or_terminating_decimal_is_a_rational_number">Every repeating or terminating decimal is a rational number</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=5" title="Edit section: Every repeating or terminating decimal is a rational number"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Each repeating decimal number satisfies a <a href="/wiki/Linear_equation" title="Linear equation">linear equation</a> with integer coefficients, and its unique solution is a rational number. In the example above, <span class="nowrap"><i>α</i> = 5.8144144144...</span> satisfies the equation </p> <dl><dd><table> <tbody><tr> <td nowrap="">10000<i>α</i> − 10<i>α</i> </td> <td nowrap="">= 58144.144144... − 58.144144... </td></tr> <tr> <td align="right">9990<i>α</i></td> <td>= 58086 </td></tr> <tr> <td align="right">Therefore, <i>α</i></td> <td>= <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">58086</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">3227</span><span class="sr-only">/</span><span class="den">555</span></span>⁠</span> </td></tr></tbody></table></dd></dl> <p>The process of how to find these integer coefficients is described <a href="#Converting_repeating_decimals_to_fractions">below</a>. </p> <div class="mw-heading mw-heading4"><h4 id="Formal_proof">Formal proof</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=6" title="Edit section: Formal proof"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Given a repeating decimal <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=a.b{\overline {c}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> <mo>=</mo> <mi>a</mi> <mo>.</mo> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>c</mi> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x=a.b{\overline {c}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/16a54142b38eef55044f1aa4adc502ee0a13a066" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:8.811ex; height:2.343ex;" alt="{\displaystyle x=a.b{\overline {c}}}"></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 a}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>a</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle a}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ffd2487510aa438433a2579450ab2b3d557e5edc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.23ex; height:1.676ex;" alt="{\displaystyle a}"></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 b}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>b</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle b}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f11423fbb2e967f986e36804a8ae4271734917c3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.998ex; height:2.176ex;" alt="{\displaystyle b}"></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 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> are groups of digits, 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 n=\lceil {\log _{10}b}\rceil }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>=</mo> <mo fence="false" stretchy="false">⌈<!-- ⌈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>log</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>10</mn> </mrow> </msub> <mo>⁡<!-- --></mo> <mi>b</mi> </mrow> <mo fence="false" stretchy="false">⌉<!-- ⌉ --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n=\lceil {\log _{10}b}\rceil }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/dcdf45b77c6dfd8c6759cff84d486cf27849b14e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:12.791ex; height:2.843ex;" alt="{\displaystyle n=\lceil {\log _{10}b}\rceil }"></span>, the number of digits of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>b</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle b}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f11423fbb2e967f986e36804a8ae4271734917c3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.998ex; height:2.176ex;" alt="{\displaystyle b}"></span>. Multiplying by <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 10^{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 10^{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/eeff06a7c9ad9455cb809047cfc97a92c51e1bf7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.543ex; height:2.343ex;" alt="{\displaystyle 10^{n}}"></span> separates the repeating and terminating groups: </p><p><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 10^{n}x=ab.{\bar {c}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> <mi>x</mi> <mo>=</mo> <mi>a</mi> <mi>b</mi> <mo>.</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>c</mi> <mo stretchy="false">¯<!-- ¯ --></mo> </mover> </mrow> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 10^{n}x=ab.{\bar {c}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c5f7466a59e4142a7edc3df474358a079229996a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:13.171ex; height:2.343ex;" alt="{\displaystyle 10^{n}x=ab.{\bar {c}}.}"></span> </p><p>If the decimals terminate (<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=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>c</mi> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle c=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d9ee918699d0cb4b8c633cc1f520a8a7a174f44a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.268ex; height:2.176ex;" alt="{\displaystyle c=0}"></span>), the proof is complete.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> 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 c\neq 0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>c</mi> <mo>≠<!-- ≠ --></mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle c\neq 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/be27396bd0e62003728d08329a8767eee94409e2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.268ex; height:2.676ex;" alt="{\displaystyle c\neq 0}"></span> with <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k\in \mathbb {N} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>k</mi> <mo>∈<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">N</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle k\in \mathbb {N} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2a5bc4b7383031ba693b7433198ead7170954c1d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.73ex; height:2.176ex;" alt="{\displaystyle k\in \mathbb {N} }"></span> digits, 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 x=y.{\bar {c}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> <mo>=</mo> <mi>y</mi> <mo>.</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>c</mi> <mo stretchy="false">¯<!-- ¯ --></mo> </mover> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x=y.{\bar {c}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/86fd9b77eaca7c16ffccee921995ccbede1a858c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:7.909ex; height:2.343ex;" alt="{\displaystyle x=y.{\bar {c}}}"></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 y\in \mathbb {Z} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>∈<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y\in \mathbb {Z} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a7e6f12a950fae74d6a37b86f7a4bca9174475e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.546ex; height:2.509ex;" alt="{\displaystyle y\in \mathbb {Z} }"></span> is a terminating group of digits. Then, </p><p><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=d_{1}d_{2}\,...d_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>c</mi> <mo>=</mo> <msub> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mspace width="thinmathspace" /> <mo>.</mo> <mo>.</mo> <mo>.</mo> <msub> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle c=d_{1}d_{2}\,...d_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f8c2f7f6257c9705568373b86aa139740d56925d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:14.418ex; height:2.509ex;" alt="{\displaystyle c=d_{1}d_{2}\,...d_{k}}"></span> </p><p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d_{i}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle d_{i}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/abe3154db7d4f92fb42dd1f80f52f528c6312e4a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.009ex; height:2.509ex;" alt="{\displaystyle d_{i}}"></span> denotes the <i>i-</i>th <i>digit</i>, and </p><p><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=y+\sum _{n=1}^{\infty }{\frac {c}{{(10^{k})}^{n}}}=y+\left(c\sum _{n=0}^{\infty }{\frac {1}{{(10^{k})}^{n}}}\right)-c.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> <mo>=</mo> <mi>y</mi> <mo>+</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">∞<!-- ∞ --></mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>c</mi> <msup> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mo stretchy="false">)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mfrac> </mrow> <mo>=</mo> <mi>y</mi> <mo>+</mo> <mrow> <mo>(</mo> <mrow> <mi>c</mi> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">∞<!-- ∞ --></mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <msup> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mo stretchy="false">)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> <mo>−<!-- − --></mo> <mi>c</mi> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x=y+\sum _{n=1}^{\infty }{\frac {c}{{(10^{k})}^{n}}}=y+\left(c\sum _{n=0}^{\infty }{\frac {1}{{(10^{k})}^{n}}}\right)-c.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1500a68107709fde5a6e2e4956debe04b11f3d41" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; width:47.127ex; height:7.509ex;" alt="{\displaystyle x=y+\sum _{n=1}^{\infty }{\frac {c}{{(10^{k})}^{n}}}=y+\left(c\sum _{n=0}^{\infty }{\frac {1}{{(10^{k})}^{n}}}\right)-c.}"></span> </p><p>Since <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 \textstyle \sum _{n=0}^{\infty }{\frac {1}{{(10^{k})}^{n}}}={\frac {1}{1-10^{-k}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mstyle displaystyle="false" scriptlevel="0"> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">∞<!-- ∞ --></mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <msup> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mo stretchy="false">)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>k</mi> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \textstyle \sum _{n=0}^{\infty }{\frac {1}{{(10^{k})}^{n}}}={\frac {1}{1-10^{-k}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2c68a029f27a5a9b3f4d516712d861766c9d80e0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.171ex; width:21.32ex; height:4.509ex;" alt="{\displaystyle \textstyle \sum _{n=0}^{\infty }{\frac {1}{{(10^{k})}^{n}}}={\frac {1}{1-10^{-k}}}}"></span>,<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> </p><p><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=y-c+{\frac {10^{k}c}{10^{k}-1}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> <mo>=</mo> <mi>y</mi> <mo>−<!-- − --></mo> <mi>c</mi> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mi>c</mi> </mrow> <mrow> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </mfrac> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x=y-c+{\frac {10^{k}c}{10^{k}-1}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2ae520e5a03c6276f28b18dc2984348d4f31cb69" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:21.171ex; height:6.343ex;" alt="{\displaystyle x=y-c+{\frac {10^{k}c}{10^{k}-1}}.}"></span> </p><p>Since <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 the sum of an integer (<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 y-c}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>−<!-- − --></mo> <mi>c</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y-c}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a31b8fa48b1c33a27478e0118eacc4c418169c7a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.003ex; height:2.343ex;" alt="{\displaystyle y-c}"></span>) and a rational number (<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\textstyle {\frac {10^{k}c}{10^{k}-1}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mi>c</mi> </mrow> <mrow> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\textstyle {\frac {10^{k}c}{10^{k}-1}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/768bdcdf2721d71820459b7f5f35c74b4687f538" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:5.44ex; height:4.676ex;" alt="{\textstyle {\frac {10^{k}c}{10^{k}-1}}}"></span>), <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 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 also rational.<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> <div class="mw-heading mw-heading2"><h2 id="Table_of_values">Table of values</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=7" title="Edit section: Table of values"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div><ul> <li style="display: inline-table;"> <table class="wikitable"> <tbody><tr> <th class="nowrap ts-vertical-header is-valign-bot" style=""><div style=""><style data-mw-deduplicate="TemplateStyles:r1221560606">@supports(writing-mode:vertical-rl){.mw-parser-output .ts-vertical-header{line-height:1;max-width:1em;padding:0.4em;vertical-align:bottom;width:1em}html.client-js .mw-parser-output .sortable:not(.jquery-tablesorter) .ts-vertical-header:not(.unsortable),html.client-js .mw-parser-output .ts-vertical-header.headerSort{background-position:50%.4em;padding-right:0.4em;padding-top:21px}.mw-parser-output .ts-vertical-header.is-valign-top{vertical-align:top}.mw-parser-output .ts-vertical-header.is-valign-middle{vertical-align:middle}.mw-parser-output .ts-vertical-header.is-normal{font-weight:normal}.mw-parser-output .ts-vertical-header>*{display:inline-block;transform:rotate(180deg);writing-mode:vertical-rl}@supports(writing-mode:sideways-lr){.mw-parser-output .ts-vertical-header>*{transform:none;writing-mode:sideways-lr}}}</style><i>fraction</i></div> </th> <th>decimal<br />expansion </th> <th><style data-mw-deduplicate="TemplateStyles:r886047488">.mw-parser-output .nobold{font-weight:normal}</style><span class="nobold"><i>ℓ</i><sub>10</sub></span> </th> <th>binary<br />expansion </th> <th><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886047488"><span class="nobold"><i>ℓ</i><sub>2</sub></span> </th></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">2</span></span>⁠</span> </td> <td>0.5 </td> <td>0 </td> <td>0.1 </td> <td>0 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">3</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">3</span> </td> <td>1 </td> <td>0.<span style="text-decoration:overline;">01</span> </td> <td>2 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">4</span></span>⁠</span> </td> <td>0.25 </td> <td>0 </td> <td>0.01 </td> <td>0 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">5</span></span>⁠</span> </td> <td>0.2 </td> <td>0 </td> <td>0.<span style="text-decoration:overline;">0011</span> </td> <td>4 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">6</span></span>⁠</span> </td> <td>0.1<span style="text-decoration:overline;">6</span> </td> <td>1 </td> <td>0.0<span style="text-decoration:overline;">01</span> </td> <td>2 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">142857</span> </td> <td>6 </td> <td>0.<span style="text-decoration:overline;">001</span> </td> <td>3 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">8</span></span>⁠</span> </td> <td>0.125 </td> <td>0 </td> <td>0.001 </td> <td>0 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">9</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">1</span> </td> <td>1 </td> <td>0.<span style="text-decoration:overline;">000111</span> </td> <td>6 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">10</span></span>⁠</span> </td> <td>0.1 </td> <td>0 </td> <td>0.0<span style="text-decoration:overline;">0011</span> </td> <td>4 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">11</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">09</span> </td> <td>2 </td> <td>0.<span style="text-decoration:overline;">0001011101</span> </td> <td>10 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">12</span></span>⁠</span> </td> <td>0.08<span style="text-decoration:overline;">3</span> </td> <td>1 </td> <td>0.00<span style="text-decoration:overline;">01</span> </td> <td>2 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">076923</span> </td> <td>6 </td> <td>0.<span style="text-decoration:overline;">000100111011</span> </td> <td>12 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">14</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">714285</span> </td> <td>6 </td> <td>0.0<span style="text-decoration:overline;">001</span> </td> <td>3 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">15</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">6</span> </td> <td>1 </td> <td>0.<span style="text-decoration:overline;">0001</span> </td> <td>4 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">16</span></span>⁠</span> </td> <td>0.0625 </td> <td>0 </td> <td>0.0001 </td> <td>0 </td></tr></tbody></table> </li> <li style="display: inline-table;"> <table class="wikitable"> <tbody><tr> <th class="nowrap ts-vertical-header is-valign-bot" style=""><div style=""><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1221560606"><i>fraction</i></div> </th> <th>decimal<br />expansion </th> <th><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886047488"><span class="nobold"><i>ℓ</i><sub>10</sub></span> </th></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">17</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">0588235294117647</span> </td> <td style="text-align:right">16 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">18</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">5</span> </td> <td style="text-align:right">1 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">19</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">052631578947368421</span> </td> <td style="text-align:right">18 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">20</span></span>⁠</span> </td> <td>0.05 </td> <td style="text-align:right">0 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">21</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">047619</span> </td> <td style="text-align:right">6 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">22</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">45</span> </td> <td style="text-align:right">2 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">23</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">0434782608695652173913</span> </td> <td style="text-align:right">22 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">24</span></span>⁠</span> </td> <td>0.041<span style="text-decoration:overline;">6</span> </td> <td style="text-align:right">1 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">25</span></span>⁠</span> </td> <td>0.04 </td> <td style="text-align:right">0 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">26</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">384615</span> </td> <td style="text-align:right">6 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">27</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">037</span> </td> <td style="text-align:right">3 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">28</span></span>⁠</span> </td> <td>0.03<span style="text-decoration:overline;">571428</span> </td> <td style="text-align:right">6 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">29</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">0344827586206896551724137931</span> </td> <td style="text-align:right">28 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">30</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">3</span> </td> <td style="text-align:right">1 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">31</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">032258064516129</span> </td> <td style="text-align:right">15 </td></tr></tbody></table> </li> <li style="display: inline-table;"> <table class="wikitable"> <tbody><tr> <th class="nowrap ts-vertical-header is-valign-bot" style=""><div style=""><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1221560606"><i>fraction</i></div> </th> <th>decimal<br />expansion </th> <th><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886047488"><span class="nobold"><i>ℓ</i><sub>10</sub></span> </th></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">32</span></span>⁠</span> </td> <td>0.03125 </td> <td style="text-align:right">0 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">33</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">03</span> </td> <td style="text-align:right">2 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">34</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">2941176470588235</span> </td> <td style="text-align:right">16 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">35</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">285714</span> </td> <td style="text-align:right">6 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">36</span></span>⁠</span> </td> <td>0.02<span style="text-decoration:overline;">7</span> </td> <td style="text-align:right">1 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">37</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">027</span> </td> <td style="text-align:right">3 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">38</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">263157894736842105</span> </td> <td style="text-align:right">18 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">39</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">025641</span> </td> <td style="text-align:right">6 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">40</span></span>⁠</span> </td> <td>0.025 </td> <td style="text-align:right">0 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">41</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">02439</span> </td> <td style="text-align:right">5 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">42</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">238095</span> </td> <td style="text-align:right">6 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">43</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">023255813953488372093</span> </td> <td style="text-align:right">21 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">44</span></span>⁠</span> </td> <td>0.02<span style="text-decoration:overline;">27</span> </td> <td style="text-align:right">2 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">45</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">2</span> </td> <td style="text-align:right">1 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">46</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">2173913043478260869565</span> </td> <td style="text-align:right">22 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">47</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">0212765957446808510638297872340425531914893617</span> </td> <td style="text-align:right">46 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">48</span></span>⁠</span> </td> <td>0.0208<span style="text-decoration:overline;">3</span> </td> <td style="text-align:right">1 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">49</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">020408163265306122448979591836734693877551</span> </td> <td style="text-align:right">42 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">50</span></span>⁠</span> </td> <td>0.02 </td> <td style="text-align:right">0 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">51</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">0196078431372549</span> </td> <td style="text-align:right">16 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">52</span></span>⁠</span> </td> <td>0.01<span style="text-decoration:overline;">923076</span> </td> <td style="text-align:right">6 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">53</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">0188679245283</span> </td> <td style="text-align:right">13 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">54</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">185</span> </td> <td style="text-align:right">3 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">55</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">18</span> </td> <td style="text-align:right">2 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">56</span></span>⁠</span> </td> <td>0.017<span style="text-decoration:overline;">857142</span> </td> <td style="text-align:right">6 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">57</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">017543859649122807</span> </td> <td style="text-align:right">18 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">58</span></span>⁠</span> </td> <td>0.0<span style="text-decoration:overline;">1724137931034482758620689655</span> </td> <td style="text-align:right">28 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">59</span></span>⁠</span> </td> <td>0.<span style="text-decoration:overline;">0169491525423728813559322033898305084745762711864406779661</span> </td> <td style="text-align:right">58 </td></tr> <tr> <td style="text-align:center"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">60</span></span>⁠</span> </td> <td>0.01<span style="text-decoration:overline;">6</span> </td> <td style="text-align:right">1 </td></tr></tbody></table> </li> </ul></div> <p>Thereby <i>fraction</i> is the <a href="/wiki/Unit_fraction" title="Unit fraction">unit fraction</a> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>n</i></span></span>⁠</span> and <i>ℓ</i><sub>10</sub> is the length of the (decimal) repetend. </p><p>The lengths <i>ℓ</i><sub>10</sub>(<i>n</i>) of the decimal repetends of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>n</i></span></span>⁠</span>, <i>n</i> = 1, 2, 3, ..., are: </p> <dl><dd>0, 0, 1, 0, 0, 1, 6, 0, 1, 0, 2, 1, 6, 6, 1, 0, 16, 1, 18, 0, 6, 2, 22, 1, 0, 6, 3, 6, 28, 1, 15, 0, 2, 16, 6, 1, 3, 18, 6, 0, 5, 6, 21, 2, 1, 22, 46, 1, 42, 0, 16, 6, 13, 3, 2, 6, 18, 28, 58, 1, 60, 15, 6, 0, 6, 2, 33, 16, 22, 6, 35, 1, 8, 3, 1, 18, 6, 6, 13, 0, 9, 5, 41, 6, 16, 21, 28, 2, 44, 1, 6, 22, 15, 46, 18, 1, 96, 42, 2, 0... (sequence <span class="nowrap external"><a href="//oeis.org/A051626" class="extiw" title="oeis:A051626">A051626</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>For comparison, the lengths <i>ℓ</i><sub>2</sub>(<i>n</i>) of the <a href="/wiki/Binary_number#Representation" title="Binary number">binary</a> repetends of the fractions <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>n</i></span></span>⁠</span>, <i>n</i> = 1, 2, 3, ..., are: </p> <dl><dd>0, 0, 2, 0, 4, 2, 3, 0, 6, 4, 10, 2, 12, 3, 4, 0, 8, 6, 18, 4, 6, 10, 11, 2, 20, 12, 18, 3, 28, 4, 5, 0, 10, 8, 12, 6, 36, 18, 12, 4, 20, 6, 14, 10, 12, 11, ... (=<a href="//oeis.org/A007733" class="extiw" title="oeis:A007733">A007733</a>[<i>n</i>], if <i>n</i> not a power of 2 else =0).</dd></dl> <p>The decimal repetends of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>n</i></span></span>⁠</span>, <i>n</i> = 1, 2, 3, ..., are: </p> <dl><dd>0, 0, 3, 0, 0, 6, 142857, 0, 1, 0, 09, 3, 076923, 714285, 6, 0, 0588235294117647, 5, 052631578947368421, 0, 047619, 45, 0434782608695652173913, 6, 0, 384615, 037, 571428, 0344827586206896551724137931, 3, 032258064516129, 0, 03, 2941176470588235, 285714... (sequence <span class="nowrap external"><a href="//oeis.org/A036275" class="extiw" title="oeis:A036275">A036275</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 decimal repetend lengths of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span>, <i>p</i> = 2, 3, 5, ... (<i>n</i>th prime), are: </p> <dl><dd>0, 1, 0, 6, 2, 6, 16, 18, 22, 28, 15, 3, 5, 21, 46, 13, 58, 60, 33, 35, 8, 13, 41, 44, 96, 4, 34, 53, 108, 112, 42, 130, 8, 46, 148, 75, 78, 81, 166, 43, 178, 180, 95, 192, 98, 99, 30, 222, 113, 228, 232, 7, 30, 50, 256, 262, 268, 5, 69, 28, 141, 146, 153, 155, 312, 79... (sequence <span class="nowrap external"><a href="//oeis.org/A002371" class="extiw" title="oeis:A002371">A002371</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 least primes <i>p</i> for which <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> has decimal repetend length <i>n</i>, <i>n</i> = 1, 2, 3, ..., are: </p> <dl><dd>3, 11, 37, 101, 41, 7, 239, 73, 333667, 9091, 21649, 9901, 53, 909091, 31, 17, 2071723, 19, 1111111111111111111, 3541, 43, 23, 11111111111111111111111, 99990001, 21401, 859, 757, 29, 3191, 211, 2791, 353, 67, 103, 71, 999999000001, 2028119, 909090909090909091, 900900900900990990990991, 1676321, 83, 127, 173... (sequence <span class="nowrap external"><a href="//oeis.org/A007138" class="extiw" title="oeis:A007138">A007138</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 least primes <i>p</i> for which <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num"><i>k</i></span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> has <i>n</i> different cycles (<span class="nowrap">1 ≤ <i>k</i> ≤ <i>p</i>−1</span>), <i>n</i> = 1, 2, 3, ..., are: </p> <dl><dd>7, 3, 103, 53, 11, 79, 211, 41, 73, 281, 353, 37, 2393, 449, 3061, 1889, 137, 2467, 16189, 641, 3109, 4973, 11087, 1321, 101, 7151, 7669, 757, 38629, 1231, 49663, 12289, 859, 239, 27581, 9613, 18131, 13757, 33931... (sequence <span class="nowrap external"><a href="//oeis.org/A054471" class="extiw" title="oeis:A054471">A054471</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).</dd></dl> <div class="mw-heading mw-heading2"><h2 id="Fractions_with_prime_denominators">Fractions with prime denominators</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=8" title="Edit section: Fractions with prime denominators"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Reciprocals_of_primes" title="Reciprocals of primes">Reciprocals of primes</a></div> <p>A fraction <a href="/wiki/In_lowest_terms" class="mw-redirect" title="In lowest terms">in lowest terms</a> with a <a href="/wiki/Prime_number" title="Prime number">prime</a> denominator other than 2 or 5 (i.e. <a href="/wiki/Coprime" class="mw-redirect" title="Coprime">coprime</a> to 10) always produces a repeating decimal. The length of the repetend (period of the repeating decimal segment) of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> is equal to the <a href="/wiki/Multiplicative_order" title="Multiplicative order">order</a> of 10 modulo <i>p</i>. If 10 is a <a href="/wiki/Primitive_root_modulo_n" title="Primitive root modulo n">primitive root</a> modulo <i>p</i>, then the repetend length is equal to <i>p</i> − 1; if not, then the repetend length is a factor of <i>p</i> − 1. This result can be deduced from <a href="/wiki/Fermat%27s_little_theorem" title="Fermat's little theorem">Fermat's little theorem</a>, which states that <span class="nowrap">10<sup><i>p</i>−1</sup> ≡ 1 (mod <i>p</i>)</span>. </p><p>The base-10 <a href="/wiki/Digital_root" title="Digital root">digital root</a> of the repetend of the reciprocal of any prime number greater than 5 is 9.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup> </p><p>If the repetend length of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> for prime <i>p</i> is equal to <i>p</i> − 1 then the repetend, expressed as an integer, is called a <b>cyclic number</b>. </p> <div class="mw-heading mw-heading3"><h3 id="Cyclic_numbers">Cyclic numbers</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=9" title="Edit section: Cyclic numbers"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Cyclic_number" title="Cyclic number">Cyclic number</a></div> <p>Examples of fractions belonging to this group are: </p> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 0.<span style="text-decoration:overline;">142857</span>, 6 repeating digits</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">17</span></span>⁠</span> = 0.<span style="text-decoration:overline;">0588235294117647</span>, 16 repeating digits</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">19</span></span>⁠</span> = 0.<span style="text-decoration:overline;">052631578947368421</span>, 18 repeating digits</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">23</span></span>⁠</span> = 0.<span style="text-decoration:overline;">0434782608695652173913</span>, 22 repeating digits</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">29</span></span>⁠</span> = 0.<span style="text-decoration:overline;">0344827586206896551724137931</span>, 28 repeating digits</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">47</span></span>⁠</span> = 0.<span style="text-decoration:overline;">0212765957446808510638297872340425531914893617</span>, 46 repeating digits</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">59</span></span>⁠</span> = 0.<span style="text-decoration:overline;">0169491525423728813559322033898305084745762711864406779661</span>, 58 repeating digits</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">61</span></span>⁠</span> = 0.<span style="text-decoration:overline;">016393442622950819672131147540983606557377049180327868852459</span>, 60 repeating digits</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">97</span></span>⁠</span> = 0.<span style="text-decoration:overline;">010309278350515463917525773195876288659793814432989690721649484536082474226804123711340206185567</span>, 96 repeating digits</li></ul> <p>The list can go on to include the fractions <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">109</span></span>⁠</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">113</span></span>⁠</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">131</span></span>⁠</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">149</span></span>⁠</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">167</span></span>⁠</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">179</span></span>⁠</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">181</span></span>⁠</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">193</span></span>⁠</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">223</span></span>⁠</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">229</span></span>⁠</span>, etc. (sequence <span class="nowrap external"><a href="//oeis.org/A001913" class="extiw" title="oeis:A001913">A001913</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>). </p><p>Every <i>proper</i> multiple of a cyclic number (that is, a multiple having the same number of digits) is a rotation: </p> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 1 × 0.<span style="text-decoration:overline;">142857</span> = 0.<span style="text-decoration:overline;">142857</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">2</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 2 × 0.<span style="text-decoration:overline;">142857</span> = 0.<span style="text-decoration:overline;">285714</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">3</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 3 × 0.<span style="text-decoration:overline;">142857</span> = 0.<span style="text-decoration:overline;">428571</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 4 × 0.<span style="text-decoration:overline;">142857</span> = 0.<span style="text-decoration:overline;">571428</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">5</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 5 × 0.<span style="text-decoration:overline;">142857</span> = 0.<span style="text-decoration:overline;">714285</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">6</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 6 × 0.<span style="text-decoration:overline;">142857</span> = 0.<span style="text-decoration:overline;">857142</span></li></ul> <p>The reason for the cyclic behavior is apparent from an arithmetic exercise of long division of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span>: the sequential remainders are the cyclic sequence <span class="nowrap">{1, 3, 2, 6, 4, 5}</span>. See also the article <a href="/wiki/142,857" class="mw-redirect" title="142,857">142,857</a> for more properties of this cyclic number. </p><p>A fraction which is cyclic thus has a recurring decimal of even length that divides into two sequences in <a href="/wiki/Nines%27_complement" class="mw-redirect" title="Nines' complement">nines' complement</a> form. For example <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> starts '142' and is followed by '857' while <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">6</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> (by rotation) starts '857' followed by <i>its</i> nines' complement '142'. </p><p>The rotation of the repetend of a cyclic number always happens in such a way that each successive repetend is a bigger number than the previous one. In the succession above, for instance, we see that 0.142857... < 0.285714... < 0.428571... < 0.571428... < 0.714285... < 0.857142.... This, for cyclic fractions with long repetends, allows us to easily predict what the result of multiplying the fraction by any natural number n will be, as long as the repetend is known. </p><p>A <i>proper prime</i> is a prime <i>p</i> which ends in the digit 1 in base 10 and whose reciprocal in base 10 has a repetend with length <i>p</i> − 1. In such primes, each digit 0, 1,..., 9 appears in the repeating sequence the same number of times as does each other digit (namely, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num"><i>p</i> − 1</span><span class="sr-only">/</span><span class="den">10</span></span>⁠</span> times). They are:<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><sup class="reference nowrap"><span title="Page / location: 166">: 166 </span></sup> </p> <dl><dd>61, 131, 181, 461, 491, 541, 571, 701, 811, 821, 941, 971, 1021, 1051, 1091, 1171, 1181, 1291, 1301, 1349, 1381, 1531, 1571, 1621, 1741, 1811, 1829, 1861,... (sequence <span class="nowrap external"><a href="//oeis.org/A073761" class="extiw" title="oeis:A073761">A073761</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>A prime is a proper prime if and only if it is a <a href="/wiki/Full_reptend_prime" title="Full reptend prime">full reptend prime</a> and <a href="/wiki/Modular_arithmetic" title="Modular arithmetic">congruent</a> to 1 mod 10. </p><p>If a prime <i>p</i> is both <a href="/wiki/Full_reptend_prime" title="Full reptend prime">full reptend prime</a> and <a href="/wiki/Safe_prime" class="mw-redirect" title="Safe prime">safe prime</a>, then <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> will produce a stream of <i>p</i> − 1 <a href="/wiki/Pseudo-random_numbers" class="mw-redirect" title="Pseudo-random numbers">pseudo-random digits</a>. Those primes are </p> <dl><dd>7, 23, 47, 59, 167, 179, 263, 383, 503, 863, 887, 983, 1019, 1367, 1487, 1619, 1823, 2063... (sequence <span class="nowrap external"><a href="//oeis.org/A000353" class="extiw" title="oeis:A000353">A000353</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).</dd></dl> <div class="mw-heading mw-heading3"><h3 id="Other_reciprocals_of_primes">Other reciprocals of primes</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=10" title="Edit section: Other reciprocals of primes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Some reciprocals of primes that do not generate cyclic numbers are: </p> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">3</span></span>⁠</span> = 0.<span style="text-decoration:overline;">3</span>, which has a period (repetend length) of 1.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">11</span></span>⁠</span> = 0.<span style="text-decoration:overline;">09</span>, which has a period of two.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">076923</span>, which has a period of six.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">31</span></span>⁠</span> = 0.<span style="text-decoration:overline;">032258064516129</span>, which has a period of 15.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">37</span></span>⁠</span> = 0.<span style="text-decoration:overline;">027</span>, which has a period of three.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">41</span></span>⁠</span> = 0.<span style="text-decoration:overline;">02439</span>, which has a period of five.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">43</span></span>⁠</span> = 0.<span style="text-decoration:overline;">023255813953488372093</span>, which has a period of 21.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">53</span></span>⁠</span> = 0.<span style="text-decoration:overline;">0188679245283</span>, which has a period of 13.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">67</span></span>⁠</span> = 0.<span style="text-decoration:overline;">014925373134328358208955223880597</span>, which has a period of 33.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">71</span></span>⁠</span> = 0.<span style="text-decoration:overline;">01408450704225352112676058338028169</span>, which has a period of 35.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">73</span></span>⁠</span> = 0.<span style="text-decoration:overline;">01369863</span>, which has a period of eight.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">79</span></span>⁠</span> = 0.<span style="text-decoration:overline;">0126582278481</span>, which has a period of 13.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">83</span></span>⁠</span> = 0.<span style="text-decoration:overline;">01204819277108433734939759036144578313253</span>, which has a period of 41.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">89</span></span>⁠</span> = 0.<span style="text-decoration:overline;">01123595505617977528089887640449438202247191</span>, which has a period of 44.</li></ul> <p>(sequence <span class="nowrap external"><a href="//oeis.org/A006559" class="extiw" title="oeis:A006559">A006559</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 reason is that 3 is a divisor of 9, 11 is a divisor of 99, 41 is a divisor of 99999, etc. To find the period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span>, we can check whether the prime <i>p</i> divides some number 999...999 in which the number of digits divides <i>p</i> − 1. Since the period is never greater than <i>p</i> − 1, we can obtain this by calculating <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">10<sup><i>p</i>−1</sup> − 1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span>. For example, for 11 we get </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 {\frac {10^{11-1}-1}{11}}=909090909}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>11</mn> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> <mn>11</mn> </mfrac> </mrow> <mo>=</mo> <mn>909090909</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {10^{11-1}-1}{11}}=909090909}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/98ba021fc547132937a1fa2b7e586ba6830b9e1d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:24.701ex; height:5.676ex;" alt="{\displaystyle {\frac {10^{11-1}-1}{11}}=909090909}"></span></dd></dl> <p>and then by inspection find the repetend 09 and period of 2. </p><p>Those reciprocals of primes can be associated with several sequences of repeating decimals. For example, the multiples of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> can be divided into two sets, with different repetends. The first set is: </p> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">076923</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">10</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">769230</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">9</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">692307</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">12</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">923076</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">3</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">230769</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">307692</span></li></ul> <p>where the repetend of each fraction is a cyclic re-arrangement of 076923. The second set is: </p> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">2</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">153846</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">7</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">538461</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">5</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">384615</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">11</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">846153</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">6</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">461538</span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">8</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">615384</span></li></ul> <p>where the repetend of each fraction is a cyclic re-arrangement of 153846. </p><p>In general, the set of proper multiples of reciprocals of a prime <i>p</i> consists of <i>n</i> subsets, each with repetend length <i>k</i>, where <i>nk</i> = <i>p</i> − 1. </p> <div class="mw-heading mw-heading3"><h3 id="Totient_rule">Totient rule</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=11" title="Edit section: Totient rule"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For an arbitrary integer <i>n</i>, the length <i>L</i>(<i>n</i>) of the decimal repetend of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>n</i></span></span>⁠</span> divides <i>φ</i>(<i>n</i>), where <i>φ</i> is the <a href="/wiki/Totient_function" class="mw-redirect" title="Totient function">totient function</a>. The length is equal to <span class="nowrap"><i>φ</i>(<i>n</i>)</span> if and only if 10 is a <a href="/wiki/Primitive_root_modulo_n" title="Primitive root modulo n">primitive root modulo <i>n</i></a>.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> </p><p>In particular, it follows that <span class="nowrap"><i>L</i>(<i>p</i>) = <i>p</i> − 1</span> <a href="/wiki/If_and_only_if" title="If and only if">if and only if</a> <i>p</i> is a prime and 10 is a primitive root modulo <i>p</i>. Then, the decimal expansions of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num"><i>n</i></span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> for <i>n</i> = 1, 2, ..., <i>p</i> − 1, all have period <i>p</i> − 1 and differ only by a cyclic permutation. Such numbers <i>p</i> are called <a href="/wiki/Full_repetend_prime" class="mw-redirect" title="Full repetend prime">full repetend primes</a>. </p> <div class="mw-heading mw-heading2"><h2 id="Reciprocals_of_composite_integers_coprime_to_10">Reciprocals of composite integers coprime to 10</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=12" title="Edit section: Reciprocals of composite integers coprime to 10"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>If <i>p</i> is a prime other than 2 or 5, the decimal representation of the fraction <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i><sup>2</sup></span></span>⁠</span> repeats: </p> <dl><dd><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><b>49</b></span></span>⁠</span> = 0.<span style="text-decoration:overline;">020408163265306122448979591836734693877551</span>.</dd></dl> <p>The period (repetend length) <i>L</i>(49) must be a factor of <i>λ</i>(49) = 42, where <i>λ</i>(<i>n</i>) is known as the <a href="/wiki/Carmichael_function" title="Carmichael function">Carmichael function</a>. This follows from <a href="/wiki/Carmichael_function" title="Carmichael function">Carmichael's theorem</a> which states that if <i>n</i> is a positive integer then <i>λ</i>(<i>n</i>) is the smallest integer <i>m</i> such that </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle a^{m}\equiv 1{\pmod {n}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msup> <mo>≡<!-- ≡ --></mo> <mn>1</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 a^{m}\equiv 1{\pmod {n}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6295499efc8f39a0cd7ec690788edcb794eb2bde" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.245ex; height:2.843ex;" alt="{\displaystyle a^{m}\equiv 1{\pmod {n}}}"></span></dd></dl> <p>for every integer <i>a</i> that is <a href="/wiki/Coprime" class="mw-redirect" title="Coprime">coprime</a> to <i>n</i>. </p><p>The period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i><sup>2</sup></span></span>⁠</span> is usually <i>pT</i><sub><i>p</i></sub>, where <i>T</i><sub><i>p</i></sub> is the period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span>. There are three known primes for which this is not true, and for those the period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i><sup>2</sup></span></span>⁠</span> is the same as the period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> because <i>p</i><sup>2</sup> divides 10<sup><i>p</i>−1</sup>−1. These three primes are 3, 487, and 56598313 (sequence <span class="nowrap external"><a href="//oeis.org/A045616" class="extiw" title="oeis:A045616">A045616</a></span> in the <a href="/wiki/On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> </p><p>Similarly, the period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i><sup><i>k</i></sup></span></span>⁠</span> is usually <i>p</i><sup><i>k</i>–1</sup><i>T</i><sub><i>p</i></sub> </p><p>If <i>p</i> and <i>q</i> are primes other than 2 or 5, the decimal representation of the fraction <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>pq</i></span></span>⁠</span> repeats. An example is <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">119</span></span>⁠</span>: </p> <dl><dd><b>119</b> = 7 × 17</dd> <dd><i>λ</i>(7 × 17) = <a href="/wiki/Least_common_multiple" title="Least common multiple">LCM</a>(<i>λ</i>(7), <i>λ</i>(17)) = LCM(6, 16) = 48,</dd></dl> <p>where LCM denotes the <a href="/wiki/Least_common_multiple" title="Least common multiple">least common multiple</a>. </p><p>The period <i>T</i> of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>pq</i></span></span>⁠</span> is a factor of <i>λ</i>(<i>pq</i>) and it happens to be 48 in this case: </p> <dl><dd><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">119</span></span>⁠</span> = 0.<span style="text-decoration:overline;">008403361344537815126050420168067226890756302521</span>.</dd></dl> <p>The period <i>T</i> of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>pq</i></span></span>⁠</span> is LCM(<i>T</i><sub><i>p</i></sub>, <i>T</i><sub><i>q</i></sub>), where <i>T</i><sub><i>p</i></sub> is the period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> and <i>T</i><sub><i>q</i></sub> is the period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>q</i></span></span>⁠</span>. </p><p>If <i>p</i>, <i>q</i>, <i>r</i>, etc. are primes other than 2 or 5, and <i>k</i>, <i>ℓ</i>, <i>m</i>, etc. are positive integers, then </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {1}{p^{k}q^{\ell }r^{m}\cdots }}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <msup> <mi>q</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ℓ<!-- ℓ --></mi> </mrow> </msup> <msup> <mi>r</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msup> <mo>⋯<!-- ⋯ --></mo> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {1}{p^{k}q^{\ell }r^{m}\cdots }}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8b8547e2bb40bd8bffec2fba6a9f5258738f1515" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:10.926ex; height:5.843ex;" alt="{\displaystyle {\frac {1}{p^{k}q^{\ell }r^{m}\cdots }}}"></span></dd></dl> <p>is a repeating decimal with a period of </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 \operatorname {LCM} (T_{p^{k}},T_{q^{\ell }},T_{r^{m}},\ldots )}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>LCM</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <msub> <mi>T</mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> </mrow> </msub> <mo>,</mo> <msub> <mi>T</mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mi>q</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ℓ<!-- ℓ --></mi> </mrow> </msup> </mrow> </msub> <mo>,</mo> <msub> <mi>T</mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mi>r</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msup> </mrow> </msub> <mo>,</mo> <mo>…<!-- … --></mo> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \operatorname {LCM} (T_{p^{k}},T_{q^{\ell }},T_{r^{m}},\ldots )}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d98204bc07ab0c0696c6fb10ab8eb9e4d79df273" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:22.913ex; height:3.176ex;" alt="{\displaystyle \operatorname {LCM} (T_{p^{k}},T_{q^{\ell }},T_{r^{m}},\ldots )}"></span></dd></dl> <p>where <i>T<sub>p<sup>k</sup></sub></i>, <i>T<sub>q<sup>ℓ</sup></sub></i>, <i>T<sub>r<sup>m</sup></sub></i>,... are respectively the period of the repeating decimals <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p<sup>k</sup></i></span></span>⁠</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>q<sup>ℓ</sup></i></span></span>⁠</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>r<sup>m</sup></i></span></span>⁠</span>,... as defined above. </p> <div class="mw-heading mw-heading2"><h2 id="Reciprocals_of_integers_not_coprime_to_10">Reciprocals of integers not coprime to 10</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=13" title="Edit section: Reciprocals of integers not coprime to 10"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>An integer that is not coprime to 10 but has a prime factor other than 2 or 5 has a reciprocal that is eventually periodic, but with a non-repeating sequence of digits that precede the repeating part. The reciprocal can be expressed 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 {\frac {1}{2^{a}\cdot 5^{b}p^{k}q^{\ell }\cdots }}\,,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>a</mi> </mrow> </msup> <mo>⋅<!-- ⋅ --></mo> <msup> <mn>5</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>b</mi> </mrow> </msup> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <msup> <mi>q</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ℓ<!-- ℓ --></mi> </mrow> </msup> <mo>⋯<!-- ⋯ --></mo> </mrow> </mfrac> </mrow> <mspace width="thinmathspace" /> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {1}{2^{a}\cdot 5^{b}p^{k}q^{\ell }\cdots }}\,,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/aad675249daaa2062aeef4b8bfc605e1eab48c8a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.838ex; width:15.279ex; height:6.176ex;" alt="{\displaystyle {\frac {1}{2^{a}\cdot 5^{b}p^{k}q^{\ell }\cdots }}\,,}"></span></dd></dl> <p>where <i>a</i> and <i>b</i> are not both zero. </p><p>This fraction can also be expressed 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 {\frac {5^{a-b}}{10^{a}p^{k}q^{\ell }\cdots }}\,,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mn>5</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>a</mi> <mo>−<!-- − --></mo> <mi>b</mi> </mrow> </msup> <mrow> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>a</mi> </mrow> </msup> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <msup> <mi>q</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ℓ<!-- ℓ --></mi> </mrow> </msup> <mo>⋯<!-- ⋯ --></mo> </mrow> </mfrac> </mrow> <mspace width="thinmathspace" /> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {5^{a-b}}{10^{a}p^{k}q^{\ell }\cdots }}\,,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f16feb9226afa4118238e99118b7f17f43a4e156" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:12.663ex; height:6.343ex;" alt="{\displaystyle {\frac {5^{a-b}}{10^{a}p^{k}q^{\ell }\cdots }}\,,}"></span></dd></dl> <p>if <i>a</i> > <i>b</i>, or 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 {\frac {2^{b-a}}{10^{b}p^{k}q^{\ell }\cdots }}\,,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>b</mi> <mo>−<!-- − --></mo> <mi>a</mi> </mrow> </msup> <mrow> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>b</mi> </mrow> </msup> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <msup> <mi>q</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ℓ<!-- ℓ --></mi> </mrow> </msup> <mo>⋯<!-- ⋯ --></mo> </mrow> </mfrac> </mrow> <mspace width="thinmathspace" /> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {2^{b-a}}{10^{b}p^{k}q^{\ell }\cdots }}\,,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ffb274c50fb84c523ccfbf1a569e4b2da16fcd8c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.838ex; width:12.498ex; height:6.676ex;" alt="{\displaystyle {\frac {2^{b-a}}{10^{b}p^{k}q^{\ell }\cdots }}\,,}"></span></dd></dl> <p>if <i>b</i> > <i>a</i>, or 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 {\frac {1}{10^{a}p^{k}q^{\ell }\cdots }}\,,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>a</mi> </mrow> </msup> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <msup> <mi>q</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ℓ<!-- ℓ --></mi> </mrow> </msup> <mo>⋯<!-- ⋯ --></mo> </mrow> </mfrac> </mrow> <mspace width="thinmathspace" /> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {1}{10^{a}p^{k}q^{\ell }\cdots }}\,,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6e8d4176cddb1b5271eb8be70f959a83df967793" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:12.663ex; height:5.843ex;" alt="{\displaystyle {\frac {1}{10^{a}p^{k}q^{\ell }\cdots }}\,,}"></span></dd></dl> <p>if <i>a</i> = <i>b</i>. </p><p>The decimal has: </p> <ul><li>An initial transient of max(<i>a</i>, <i>b</i>) digits after the decimal point. Some or all of the digits in the transient can be zeros.</li> <li>A subsequent repetend which is the same as that for the fraction <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p<sup>k</sup></i> <i>q<sup>ℓ</sup></i> ⋯</span></span>⁠</span>.</li></ul> <p>For example <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">28</span></span>⁠</span> = 0.03<span style="text-decoration:overline;">571428</span>: </p> <ul><li><i>a</i> = 2, <i>b</i> = 0, and the other factors <span class="nowrap"><i>p<sup>k</sup></i> <i>q<sup>ℓ</sup></i> ⋯ = 7</span></li> <li>there are 2 initial non-repeating digits, 03; and</li> <li>there are 6 repeating digits, 571428, the same amount as <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> has.</li></ul> <div class="mw-heading mw-heading2"><h2 id="Converting_repeating_decimals_to_fractions">Converting repeating decimals to fractions</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=14" title="Edit section: Converting repeating decimals to fractions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Given a repeating decimal, it is possible to calculate the fraction that produces it. For example: </p> <dl><dd><table> <tbody><tr> <td style="text-align:right;width:3em"><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></td> <td style="width:12em"><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.333333\ldots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo>=</mo> <mn>0.333333</mn> <mo>…<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle =0.333333\ldots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bbdd989bed8804e4f3fc1df7afd8ac1ec25c5ac4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:14.348ex; height:2.176ex;" alt="{\displaystyle =0.333333\ldots }"></span> </td></tr> <tr> <td style="text-align:right"><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 10x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>10</mn> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 10x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b5d55a1c1904762c24cf43f5000da77696052001" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.655ex; height:2.176ex;" alt="{\displaystyle 10x}"></span></td> <td><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 =3.333333\ldots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo>=</mo> <mn>3.333333</mn> <mo>…<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle =3.333333\ldots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f399f536ec7a478ddb0a5fe75d0de4d4eba6b504" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:14.348ex; height:2.176ex;" alt="{\displaystyle =3.333333\ldots }"></span></td> <td>(multiply each side of the above line by 10) </td></tr> <tr> <td style="text-align:right"><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 9x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>9</mn> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 9x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a157790e3ea2ba51d6ae2143969bbdab80f68d1b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.492ex; height:2.176ex;" alt="{\displaystyle 9x}"></span></td> <td><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 =3}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo>=</mo> <mn>3</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle =3}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e40a8447b4be595459a57d399a1e490c08c1113e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.616ex; height:2.176ex;" alt="{\displaystyle =3}"></span></td> <td>(subtract the 1st line from the 2nd) </td></tr> <tr> <td style="text-align:right"><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></td> <td><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 ={\frac {3}{9}}={\frac {1}{3}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>3</mn> <mn>9</mn> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>3</mn> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle ={\frac {3}{9}}={\frac {1}{3}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5f166bb95037311c490966543d221dca7ab0a0cb" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:9.549ex; height:5.176ex;" alt="{\displaystyle ={\frac {3}{9}}={\frac {1}{3}}}"></span></td> <td>(reduce to lowest terms) </td></tr></tbody></table></dd></dl> <p>Another example: </p> <dl><dd><table> <tbody><tr> <td style="text-align:right;width:3em"><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></td> <td style="width:12em"><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.836363636\ldots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo>=</mo> <mtext> </mtext> <mtext> </mtext> <mtext> </mtext> <mtext> </mtext> <mn>0.836363636</mn> <mo>…<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle =\ \ \ \ 0.836363636\ldots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/39be152f9af3cdb84932f53ba6d91baa0424d1fa" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:20.158ex; height:2.176ex;" alt="{\displaystyle =\ \ \ \ 0.836363636\ldots }"></span> </td></tr> <tr> <td style="text-align:right"><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 10x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>10</mn> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 10x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b5d55a1c1904762c24cf43f5000da77696052001" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.655ex; height:2.176ex;" alt="{\displaystyle 10x}"></span></td> <td><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 =\ \ \ \ 8.36363636\ldots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo>=</mo> <mtext> </mtext> <mtext> </mtext> <mtext> </mtext> <mtext> </mtext> <mn>8.36363636</mn> <mo>…<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle =\ \ \ \ 8.36363636\ldots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e29784217f7e5fb5b5ef0f1c05fac012c96b4928" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:18.995ex; height:2.176ex;" alt="{\displaystyle =\ \ \ \ 8.36363636\ldots }"></span></td> <td>(move decimal to start of repetition = move by 1 place = multiply by 10) </td></tr> <tr> <td style="text-align:right"><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 1000x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>1000</mn> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 1000x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3e86ef591fc77aecd41122f45f3752137ba31631" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.98ex; height:2.176ex;" alt="{\displaystyle 1000x}"></span></td> <td><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 =836.36363636\ldots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo>=</mo> <mn>836.36363636</mn> <mo>…<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle =836.36363636\ldots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ad5676af02ed9aa90c2a526acd3b1625a87c1306" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:18.997ex; height:2.176ex;" alt="{\displaystyle =836.36363636\ldots }"></span></td> <td>(collate 2nd repetition here with 1st above = move by 2 places = multiply by 100) </td></tr> <tr> <td style="text-align:right"><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 990x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>990</mn> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 990x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f255a0f25922edbc825f8076f484764f879ea17c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:4.817ex; height:2.176ex;" alt="{\displaystyle 990x}"></span></td> <td><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 =828}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo>=</mo> <mn>828</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle =828}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/550332868c429a966447487043afa51a5b645614" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.941ex; height:2.176ex;" alt="{\displaystyle =828}"></span></td> <td>(subtract to clear decimals) </td></tr> <tr> <td style="text-align:right"><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></td> <td><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 ={\frac {828}{990}}={\frac {18\cdot 46}{18\cdot 55}}={\frac {46}{55}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>828</mn> <mn>990</mn> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>18</mn> <mo>⋅<!-- ⋅ --></mo> <mn>46</mn> </mrow> <mrow> <mn>18</mn> <mo>⋅<!-- ⋅ --></mo> <mn>55</mn> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>46</mn> <mn>55</mn> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle ={\frac {828}{990}}={\frac {18\cdot 46}{18\cdot 55}}={\frac {46}{55}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9e4eabe6884faafa39c1fa41c340b1ece5f8d6d9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:23.3ex; height:5.176ex;" alt="{\displaystyle ={\frac {828}{990}}={\frac {18\cdot 46}{18\cdot 55}}={\frac {46}{55}}}"></span></td> <td>(reduce to lowest terms) </td></tr></tbody></table></dd></dl> <div class="mw-heading mw-heading3"><h3 id="A_shortcut">A shortcut</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=15" title="Edit section: A shortcut"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The procedure below can be applied in particular if the repetend has <i>n</i> digits, all of which are 0 except the final one which is 1. For instance for <i>n</i> = 7: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}x&=0.000000100000010000001\ldots \\10^{7}x&=1.000000100000010000001\ldots \\\left(10^{7}-1\right)x=9999999x&=1\\x&={\frac {1}{10^{7}-1}}={\frac {1}{9999999}}\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mi>x</mi> </mtd> <mtd> <mi></mi> <mo>=</mo> <mn>0.000000100000010000001</mn> <mo>…<!-- … --></mo> </mtd> </mtr> <mtr> <mtd> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>7</mn> </mrow> </msup> <mi>x</mi> </mtd> <mtd> <mi></mi> <mo>=</mo> <mn>1.000000100000010000001</mn> <mo>…<!-- … --></mo> </mtd> </mtr> <mtr> <mtd> <mrow> <mo>(</mo> <mrow> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>7</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> <mo>)</mo> </mrow> <mi>x</mi> <mo>=</mo> <mn>9999999</mn> <mi>x</mi> </mtd> <mtd> <mi></mi> <mo>=</mo> <mn>1</mn> </mtd> </mtr> <mtr> <mtd> <mi>x</mi> </mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>7</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>9999999</mn> </mfrac> </mrow> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}x&=0.000000100000010000001\ldots \\10^{7}x&=1.000000100000010000001\ldots \\\left(10^{7}-1\right)x=9999999x&=1\\x&={\frac {1}{10^{7}-1}}={\frac {1}{9999999}}\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/25ef6b650d7e3461209779df0ecaf648d05515e1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -7.029ex; margin-bottom: -0.309ex; width:56.975ex; height:15.843ex;" alt="{\displaystyle {\begin{aligned}x&=0.000000100000010000001\ldots \\10^{7}x&=1.000000100000010000001\ldots \\\left(10^{7}-1\right)x=9999999x&=1\\x&={\frac {1}{10^{7}-1}}={\frac {1}{9999999}}\end{aligned}}}"></span></dd></dl> <p>So this particular repeating decimal corresponds to the fraction <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">10<sup><i>n</i></sup> − 1</span></span>⁠</span>, where the denominator is the number written as <i>n</i> 9s. Knowing just that, a general repeating decimal can be expressed as a fraction without having to solve an equation. For example, one could reason: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}7.48181818\ldots &=7.3+0.18181818\ldots \\[8pt]&={\frac {73}{10}}+{\frac {18}{99}}={\frac {73}{10}}+{\frac {9\cdot 2}{9\cdot 11}}={\frac {73}{10}}+{\frac {2}{11}}\\[12pt]&={\frac {11\cdot 73+10\cdot 2}{10\cdot 11}}={\frac {823}{110}}\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="1.1em 1.5em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mn>7.48181818</mn> <mo>…<!-- … --></mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mn>7.3</mn> <mo>+</mo> <mn>0.18181818</mn> <mo>…<!-- … --></mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>73</mn> <mn>10</mn> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>18</mn> <mn>99</mn> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>73</mn> <mn>10</mn> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>9</mn> <mo>⋅<!-- ⋅ --></mo> <mn>2</mn> </mrow> <mrow> <mn>9</mn> <mo>⋅<!-- ⋅ --></mo> <mn>11</mn> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>73</mn> <mn>10</mn> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>2</mn> <mn>11</mn> </mfrac> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>11</mn> <mo>⋅<!-- ⋅ --></mo> <mn>73</mn> <mo>+</mo> <mn>10</mn> <mo>⋅<!-- ⋅ --></mo> <mn>2</mn> </mrow> <mrow> <mn>10</mn> <mo>⋅<!-- ⋅ --></mo> <mn>11</mn> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>823</mn> <mn>110</mn> </mfrac> </mrow> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}7.48181818\ldots &=7.3+0.18181818\ldots \\[8pt]&={\frac {73}{10}}+{\frac {18}{99}}={\frac {73}{10}}+{\frac {9\cdot 2}{9\cdot 11}}={\frac {73}{10}}+{\frac {2}{11}}\\[12pt]&={\frac {11\cdot 73+10\cdot 2}{10\cdot 11}}={\frac {823}{110}}\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e6cf612540b8255ca0ae162cc6f8ccad16a2ed93" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -8.671ex; width:54.595ex; height:18.509ex;" alt="{\displaystyle {\begin{aligned}7.48181818\ldots &=7.3+0.18181818\ldots \\[8pt]&={\frac {73}{10}}+{\frac {18}{99}}={\frac {73}{10}}+{\frac {9\cdot 2}{9\cdot 11}}={\frac {73}{10}}+{\frac {2}{11}}\\[12pt]&={\frac {11\cdot 73+10\cdot 2}{10\cdot 11}}={\frac {823}{110}}\end{aligned}}}"></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 {\begin{aligned}11.18867924528301886792452830\ldots &=11+0.18867924528301886792452830\ldots \\[8pt]&=11+{\frac {10}{53}}={\frac {11\cdot 53+10}{53}}={\frac {593}{53}}\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="1.1em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mn>11.18867924528301886792452830</mn> <mo>…<!-- … --></mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mn>11</mn> <mo>+</mo> <mn>0.18867924528301886792452830</mn> <mo>…<!-- … --></mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <mn>11</mn> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>10</mn> <mn>53</mn> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>11</mn> <mo>⋅<!-- ⋅ --></mo> <mn>53</mn> <mo>+</mo> <mn>10</mn> </mrow> <mn>53</mn> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>593</mn> <mn>53</mn> </mfrac> </mrow> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}11.18867924528301886792452830\ldots &=11+0.18867924528301886792452830\ldots \\[8pt]&=11+{\frac {10}{53}}={\frac {11\cdot 53+10}{53}}={\frac {593}{53}}\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9ebeebd569c5d473703b099d8068247a0def48d7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.505ex; width:80.465ex; height:10.176ex;" alt="{\displaystyle {\begin{aligned}11.18867924528301886792452830\ldots &=11+0.18867924528301886792452830\ldots \\[8pt]&=11+{\frac {10}{53}}={\frac {11\cdot 53+10}{53}}={\frac {593}{53}}\end{aligned}}}"></span></dd></dl> <p>It is possible to get a general formula expressing a repeating decimal with an <i>n</i>-digit period (repetend length), beginning right after the decimal point, as a fraction: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}x&=0.{\overline {a_{1}a_{2}\cdots a_{n}}}\\10^{n}x&=a_{1}a_{2}\cdots a_{n}.{\overline {a_{1}a_{2}\cdots a_{n}}}\\[5pt]\left(10^{n}-1\right)x=99\cdots 99x&=a_{1}a_{2}\cdots a_{n}\\[5pt]x&={\frac {a_{1}a_{2}\cdots a_{n}}{10^{n}-1}}={\frac {a_{1}a_{2}\cdots a_{n}}{99\cdots 99}}\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt 0.8em 0.8em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mi>x</mi> </mtd> <mtd> <mi></mi> <mo>=</mo> <mn>0.</mn> <mrow class="MJX-TeXAtom-ORD"> <mover> <mrow> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>⋯<!-- ⋯ --></mo> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mrow> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mtd> </mtr> <mtr> <mtd> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> <mi>x</mi> </mtd> <mtd> <mi></mi> <mo>=</mo> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>⋯<!-- ⋯ --></mo> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>.</mo> <mrow class="MJX-TeXAtom-ORD"> <mover> <mrow> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>⋯<!-- ⋯ --></mo> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mrow> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mo>(</mo> <mrow> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> <mo>)</mo> </mrow> <mi>x</mi> <mo>=</mo> <mn>99</mn> <mo>⋯<!-- ⋯ --></mo> <mn>99</mn> <mi>x</mi> </mtd> <mtd> <mi></mi> <mo>=</mo> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>⋯<!-- ⋯ --></mo> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mtd> </mtr> <mtr> <mtd> <mi>x</mi> </mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>⋯<!-- ⋯ --></mo> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mrow> <mrow> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>⋯<!-- ⋯ --></mo> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mrow> <mrow> <mn>99</mn> <mo>⋯<!-- ⋯ --></mo> <mn>99</mn> </mrow> </mfrac> </mrow> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}x&=0.{\overline {a_{1}a_{2}\cdots a_{n}}}\\10^{n}x&=a_{1}a_{2}\cdots a_{n}.{\overline {a_{1}a_{2}\cdots a_{n}}}\\[5pt]\left(10^{n}-1\right)x=99\cdots 99x&=a_{1}a_{2}\cdots a_{n}\\[5pt]x&={\frac {a_{1}a_{2}\cdots a_{n}}{10^{n}-1}}={\frac {a_{1}a_{2}\cdots a_{n}}{99\cdots 99}}\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d2515e466c7582dd33e653060a6efdebcff65665" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -7.671ex; width:53.296ex; height:16.509ex;" alt="{\displaystyle {\begin{aligned}x&=0.{\overline {a_{1}a_{2}\cdots a_{n}}}\\10^{n}x&=a_{1}a_{2}\cdots a_{n}.{\overline {a_{1}a_{2}\cdots a_{n}}}\\[5pt]\left(10^{n}-1\right)x=99\cdots 99x&=a_{1}a_{2}\cdots a_{n}\\[5pt]x&={\frac {a_{1}a_{2}\cdots a_{n}}{10^{n}-1}}={\frac {a_{1}a_{2}\cdots a_{n}}{99\cdots 99}}\end{aligned}}}"></span></dd></dl> <p>More explicitly, one gets the following cases: </p><p>If the repeating decimal is between 0 and 1, and the repeating block is <i>n</i> digits long, first occurring right after the decimal point, then the fraction (not necessarily reduced) will be the integer number represented by the <i>n</i>-digit block divided by the one represented by <i>n</i> 9s. For example, </p> <ul><li>0.444444... = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">9</span></span>⁠</span> since the repeating block is 4 (a 1-digit block),</li> <li>0.565656... = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">56</span><span class="sr-only">/</span><span class="den">99</span></span>⁠</span> since the repeating block is 56 (a 2-digit block),</li> <li>0.012012... = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">12</span><span class="sr-only">/</span><span class="den">999</span></span>⁠</span> since the repeating block is 012 (a 3-digit block); this further reduces to <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">333</span></span>⁠</span>.</li> <li>0.999999... = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">9</span><span class="sr-only">/</span><span class="den">9</span></span>⁠</span> = 1, since the repeating block is 9 (also a 1-digit block)</li></ul> <p>If the repeating decimal is as above, except that there are <i>k</i> (extra) digits 0 between the decimal point and the repeating <i>n</i>-digit block, then one can simply add <i>k</i> digits 0 after the <i>n</i> digits 9 of the denominator (and, as before, the fraction may subsequently be simplified). For example, </p> <ul><li>0.000444... = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">9000</span></span>⁠</span> since the repeating block is 4 and this block is preceded by 3 zeros,</li> <li>0.005656... = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">56</span><span class="sr-only">/</span><span class="den">9900</span></span>⁠</span> since the repeating block is 56 and it is preceded by 2 zeros,</li> <li>0.00012012... = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">12</span><span class="sr-only">/</span><span class="den">99900</span></span>⁠</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">8325</span></span>⁠</span> since the repeating block is 012 and it is preceded by 2 zeros.</li></ul> <p>Any repeating decimal not of the form described above can be written as a sum of a terminating decimal and a repeating decimal of one of the two above types (actually the first type suffices, but that could require the terminating decimal to be negative). For example, </p> <ul><li>1.23444... = 1.23 + 0.00444... = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">123</span><span class="sr-only">/</span><span class="den">100</span></span>⁠</span> + <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1107</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> + <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1111</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> <ul><li>or alternatively 1.23444... = 0.79 + 0.44444... = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">79</span><span class="sr-only">/</span><span class="den">100</span></span>⁠</span> + <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">9</span></span>⁠</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">711</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> + <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">400</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1111</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span></li></ul></li> <li>0.3789789... = 0.3 + 0.0789789... = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">3</span><span class="sr-only">/</span><span class="den">10</span></span>⁠</span> + <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">789</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">2997</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> + <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">789</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">3786</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">631</span><span class="sr-only">/</span><span class="den">1665</span></span>⁠</span> <ul><li>or alternatively 0.3789789... = −0.6 + 0.9789789... = −<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">6</span><span class="sr-only">/</span><span class="den">10</span></span>⁠</span> + 978/999 = −<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">5994</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> + <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">9780</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">3786</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">631</span><span class="sr-only">/</span><span class="den">1665</span></span>⁠</span></li></ul></li></ul> <p>An even faster method is to ignore the decimal point completely and go like this </p> <ul><li>1.23444... = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1234 − 123</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1111</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> (denominator has one 9 and two 0s because one digit repeats and there are two non-repeating digits after the decimal point)</li> <li>0.3789789... = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">3789 − 3</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">3786</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> (denominator has three 9s and one 0 because three digits repeat and there is one non-repeating digit after the decimal point)</li></ul> <p>It follows that any repeating decimal with <a href="/wiki/Periodic_function" title="Periodic function">period</a> <i>n</i>, and <i>k</i> digits after the decimal point that do not belong to the repeating part, can be written as a (not necessarily reduced) fraction whose denominator is (10<sup><i>n</i></sup> − 1)10<sup><i>k</i></sup>. </p><p>Conversely the period of the repeating decimal of a fraction <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num"><i>c</i></span><span class="sr-only">/</span><span class="den"><i>d</i></span></span>⁠</span> will be (at most) the smallest number <i>n</i> such that 10<sup><i>n</i></sup> − 1 is divisible by <i>d</i>. </p><p>For example, the fraction <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">2</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> has <i>d</i> = 7, and the smallest <i>k</i> that makes 10<sup><i>k</i></sup> − 1 divisible by 7 is <i>k</i> = 6, because 999999 = 7 × 142857. The period of the fraction <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">2</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> is therefore 6. </p> <div class="mw-heading mw-heading4"><h4 id="In_compressed_form">In compressed form</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=16" title="Edit section: In compressed form"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The following picture suggests kind of compression of the above shortcut. Thereby <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 \mathbf {I} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">I</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {I} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8a458c8aeb096ce732abf346ae8edf3e4f53a126" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.014ex; height:2.176ex;" alt="{\displaystyle \mathbf {I} }"></span> represents the digits of the integer part of the decimal number (to the left of the decimal point), <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 \mathbf {A} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {A} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0795cc96c75d81520a120482662b90f024c9a1a1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.019ex; height:2.176ex;" alt="{\displaystyle \mathbf {A} }"></span> makes up the string of digits of the preperiod 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 \#\mathbf {A} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \#\mathbf {A} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/01f7b946ece1fc1bcb869894ba3796b7cd87ddfa" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.955ex; height:2.509ex;" alt="{\displaystyle \#\mathbf {A} }"></span> its length, 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 \mathbf {P} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">P</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {P} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c0c250ef2a112c86b93c637dfa288c6d7f34ac3f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.827ex; height:2.176ex;" alt="{\displaystyle \mathbf {P} }"></span> being the string of repeated digits (the period) with length <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 \#\mathbf {P} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">P</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \#\mathbf {P} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/768e06b55805eb98f69be9deefaccba44fe8cc84" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.763ex; height:2.509ex;" alt="{\displaystyle \#\mathbf {P} }"></span> which is nonzero. </p> <figure class="mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:CodeCogsEqn(4).gif" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/c/c7/CodeCogsEqn%284%29.gif/240px-CodeCogsEqn%284%29.gif" decoding="async" width="240" height="45" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/c/c7/CodeCogsEqn%284%29.gif/360px-CodeCogsEqn%284%29.gif 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/c/c7/CodeCogsEqn%284%29.gif/480px-CodeCogsEqn%284%29.gif 2x" data-file-width="691" data-file-height="130" /></a><figcaption>Formation rule</figcaption></figure> <p>In the generated fraction, the digit <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 9}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>9</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 9}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/32d3d1e1f9dfe0254c628379e69a69711fe4eabd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 9}"></span> will be repeated <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 \#\mathbf {P} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">P</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \#\mathbf {P} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/768e06b55805eb98f69be9deefaccba44fe8cc84" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.763ex; height:2.509ex;" alt="{\displaystyle \#\mathbf {P} }"></span> times, and the digit <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}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2aae8864a3c1fec9585261791a809ddec1489950" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 0}"></span> will be repeated <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 \#\mathbf {A} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \#\mathbf {A} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/01f7b946ece1fc1bcb869894ba3796b7cd87ddfa" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.955ex; height:2.509ex;" alt="{\displaystyle \#\mathbf {A} }"></span> times. </p><p>Note that in the absence of an <i><b>integer</b></i> part in the decimal, <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 \mathbf {I} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">I</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {I} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8a458c8aeb096ce732abf346ae8edf3e4f53a126" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.014ex; height:2.176ex;" alt="{\displaystyle \mathbf {I} }"></span> will be represented by zero, which being to the left of the other digits, will not affect the final result, and may be omitted in the calculation of the generating function. </p><p>Examples: </p><p><span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{array}{lllll}3.254444\ldots &=3.25{\overline {4}}&={\begin{Bmatrix}\mathbf {I} =3&\mathbf {A} =25&\mathbf {P} =4\\&\#\mathbf {A} =2&\#\mathbf {P} =1\end{Bmatrix}}&={\dfrac {3254-325}{900}}&={\dfrac {2929}{900}}\\\\0.512512\ldots &=0.{\overline {512}}&={\begin{Bmatrix}\mathbf {I} =0&\mathbf {A} =\emptyset &\mathbf {P} =512\\&\#\mathbf {A} =0&\#\mathbf {P} =3\end{Bmatrix}}&={\dfrac {512-0}{999}}&={\dfrac {512}{999}}\\\\1.09191\ldots &=1.0{\overline {91}}&={\begin{Bmatrix}\mathbf {I} =1&\mathbf {A} =0&\mathbf {P} =91\\&\#\mathbf {A} =1&\#\mathbf {P} =2\end{Bmatrix}}&={\dfrac {1091-10}{990}}&={\dfrac {1081}{990}}\\\\1.333\ldots &=1.{\overline {3}}&={\begin{Bmatrix}\mathbf {I} =1&\mathbf {A} =\emptyset &\mathbf {P} =3\\&\#\mathbf {A} =0&\#\mathbf {P} =1\end{Bmatrix}}&={\dfrac {13-1}{9}}&={\dfrac {12}{9}}&={\dfrac {4}{3}}\\\\0.3789789\ldots &=0.3{\overline {789}}&={\begin{Bmatrix}\mathbf {I} =0&\mathbf {A} =3&\mathbf {P} =789\\&\#\mathbf {A} =1&\#\mathbf {P} =3\end{Bmatrix}}&={\dfrac {3789-3}{9990}}&={\dfrac {3786}{9990}}&={\dfrac {631}{1665}}\end{array}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="left left left left left" rowspacing="4pt" columnspacing="1em"> <mtr> <mtd> <mn>3.254444</mn> <mo>…<!-- … --></mo> </mtd> <mtd> <mo>=</mo> <mn>3.25</mn> <mrow class="MJX-TeXAtom-ORD"> <mover> <mn>4</mn> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable rowspacing="4pt" columnspacing="1em"> <mtr> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">I</mi> </mrow> <mo>=</mo> <mn>3</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> <mo>=</mo> <mn>25</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">P</mi> </mrow> <mo>=</mo> <mn>4</mn> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> <mo>=</mo> <mn>2</mn> </mtd> <mtd> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">P</mi> </mrow> <mo>=</mo> <mn>1</mn> </mtd> </mtr> </mtable> <mo>}</mo> </mrow> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mfrac> <mrow> <mn>3254</mn> <mo>−<!-- − --></mo> <mn>325</mn> </mrow> <mn>900</mn> </mfrac> </mstyle> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mfrac> <mn>2929</mn> <mn>900</mn> </mfrac> </mstyle> </mrow> </mtd> </mtr> <mtr> <mtd /> </mtr> <mtr> <mtd> <mn>0.512512</mn> <mo>…<!-- … --></mo> </mtd> <mtd> <mo>=</mo> <mn>0.</mn> <mrow class="MJX-TeXAtom-ORD"> <mover> <mn>512</mn> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable rowspacing="4pt" columnspacing="1em"> <mtr> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">I</mi> </mrow> <mo>=</mo> <mn>0</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> <mo>=</mo> <mi mathvariant="normal">∅<!-- ∅ --></mi> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">P</mi> </mrow> <mo>=</mo> <mn>512</mn> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> <mo>=</mo> <mn>0</mn> </mtd> <mtd> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">P</mi> </mrow> <mo>=</mo> <mn>3</mn> </mtd> </mtr> </mtable> <mo>}</mo> </mrow> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mfrac> <mrow> <mn>512</mn> <mo>−<!-- − --></mo> <mn>0</mn> </mrow> <mn>999</mn> </mfrac> </mstyle> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mfrac> <mn>512</mn> <mn>999</mn> </mfrac> </mstyle> </mrow> </mtd> </mtr> <mtr> <mtd /> </mtr> <mtr> <mtd> <mn>1.09191</mn> <mo>…<!-- … --></mo> </mtd> <mtd> <mo>=</mo> <mn>1.0</mn> <mrow class="MJX-TeXAtom-ORD"> <mover> <mn>91</mn> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable rowspacing="4pt" columnspacing="1em"> <mtr> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">I</mi> </mrow> <mo>=</mo> <mn>1</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> <mo>=</mo> <mn>0</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">P</mi> </mrow> <mo>=</mo> <mn>91</mn> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> <mo>=</mo> <mn>1</mn> </mtd> <mtd> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">P</mi> </mrow> <mo>=</mo> <mn>2</mn> </mtd> </mtr> </mtable> <mo>}</mo> </mrow> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mfrac> <mrow> <mn>1091</mn> <mo>−<!-- − --></mo> <mn>10</mn> </mrow> <mn>990</mn> </mfrac> </mstyle> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mfrac> <mn>1081</mn> <mn>990</mn> </mfrac> </mstyle> </mrow> </mtd> </mtr> <mtr> <mtd /> </mtr> <mtr> <mtd> <mn>1.333</mn> <mo>…<!-- … --></mo> </mtd> <mtd> <mo>=</mo> <mn>1.</mn> <mrow class="MJX-TeXAtom-ORD"> <mover> <mn>3</mn> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable rowspacing="4pt" columnspacing="1em"> <mtr> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">I</mi> </mrow> <mo>=</mo> <mn>1</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> <mo>=</mo> <mi mathvariant="normal">∅<!-- ∅ --></mi> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">P</mi> </mrow> <mo>=</mo> <mn>3</mn> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> <mo>=</mo> <mn>0</mn> </mtd> <mtd> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">P</mi> </mrow> <mo>=</mo> <mn>1</mn> </mtd> </mtr> </mtable> <mo>}</mo> </mrow> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mfrac> <mrow> <mn>13</mn> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> <mn>9</mn> </mfrac> </mstyle> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mfrac> <mn>12</mn> <mn>9</mn> </mfrac> </mstyle> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mfrac> <mn>4</mn> <mn>3</mn> </mfrac> </mstyle> </mrow> </mtd> </mtr> <mtr> <mtd /> </mtr> <mtr> <mtd> <mn>0.3789789</mn> <mo>…<!-- … --></mo> </mtd> <mtd> <mo>=</mo> <mn>0.3</mn> <mrow class="MJX-TeXAtom-ORD"> <mover> <mn>789</mn> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable rowspacing="4pt" columnspacing="1em"> <mtr> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">I</mi> </mrow> <mo>=</mo> <mn>0</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> <mo>=</mo> <mn>3</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">P</mi> </mrow> <mo>=</mo> <mn>789</mn> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> <mo>=</mo> <mn>1</mn> </mtd> <mtd> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">P</mi> </mrow> <mo>=</mo> <mn>3</mn> </mtd> </mtr> </mtable> <mo>}</mo> </mrow> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mfrac> <mrow> <mn>3789</mn> <mo>−<!-- − --></mo> <mn>3</mn> </mrow> <mn>9990</mn> </mfrac> </mstyle> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mfrac> <mn>3786</mn> <mn>9990</mn> </mfrac> </mstyle> </mrow> </mtd> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mfrac> <mn>631</mn> <mn>1665</mn> </mfrac> </mstyle> </mrow> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{array}{lllll}3.254444\ldots &=3.25{\overline {4}}&={\begin{Bmatrix}\mathbf {I} =3&\mathbf {A} =25&\mathbf {P} =4\\&\#\mathbf {A} =2&\#\mathbf {P} =1\end{Bmatrix}}&={\dfrac {3254-325}{900}}&={\dfrac {2929}{900}}\\\\0.512512\ldots &=0.{\overline {512}}&={\begin{Bmatrix}\mathbf {I} =0&\mathbf {A} =\emptyset &\mathbf {P} =512\\&\#\mathbf {A} =0&\#\mathbf {P} =3\end{Bmatrix}}&={\dfrac {512-0}{999}}&={\dfrac {512}{999}}\\\\1.09191\ldots &=1.0{\overline {91}}&={\begin{Bmatrix}\mathbf {I} =1&\mathbf {A} =0&\mathbf {P} =91\\&\#\mathbf {A} =1&\#\mathbf {P} =2\end{Bmatrix}}&={\dfrac {1091-10}{990}}&={\dfrac {1081}{990}}\\\\1.333\ldots &=1.{\overline {3}}&={\begin{Bmatrix}\mathbf {I} =1&\mathbf {A} =\emptyset &\mathbf {P} =3\\&\#\mathbf {A} =0&\#\mathbf {P} =1\end{Bmatrix}}&={\dfrac {13-1}{9}}&={\dfrac {12}{9}}&={\dfrac {4}{3}}\\\\0.3789789\ldots &=0.3{\overline {789}}&={\begin{Bmatrix}\mathbf {I} =0&\mathbf {A} =3&\mathbf {P} =789\\&\#\mathbf {A} =1&\#\mathbf {P} =3\end{Bmatrix}}&={\dfrac {3789-3}{9990}}&={\dfrac {3786}{9990}}&={\dfrac {631}{1665}}\end{array}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/da2073c8d83a97adc3816231d39d040cbc9a26e8" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -22.005ex; width:97.834ex; height:45.176ex;" alt="{\displaystyle {\begin{array}{lllll}3.254444\ldots &=3.25{\overline {4}}&={\begin{Bmatrix}\mathbf {I} =3&\mathbf {A} =25&\mathbf {P} =4\\&\#\mathbf {A} =2&\#\mathbf {P} =1\end{Bmatrix}}&={\dfrac {3254-325}{900}}&={\dfrac {2929}{900}}\\\\0.512512\ldots &=0.{\overline {512}}&={\begin{Bmatrix}\mathbf {I} =0&\mathbf {A} =\emptyset &\mathbf {P} =512\\&\#\mathbf {A} =0&\#\mathbf {P} =3\end{Bmatrix}}&={\dfrac {512-0}{999}}&={\dfrac {512}{999}}\\\\1.09191\ldots &=1.0{\overline {91}}&={\begin{Bmatrix}\mathbf {I} =1&\mathbf {A} =0&\mathbf {P} =91\\&\#\mathbf {A} =1&\#\mathbf {P} =2\end{Bmatrix}}&={\dfrac {1091-10}{990}}&={\dfrac {1081}{990}}\\\\1.333\ldots &=1.{\overline {3}}&={\begin{Bmatrix}\mathbf {I} =1&\mathbf {A} =\emptyset &\mathbf {P} =3\\&\#\mathbf {A} =0&\#\mathbf {P} =1\end{Bmatrix}}&={\dfrac {13-1}{9}}&={\dfrac {12}{9}}&={\dfrac {4}{3}}\\\\0.3789789\ldots &=0.3{\overline {789}}&={\begin{Bmatrix}\mathbf {I} =0&\mathbf {A} =3&\mathbf {P} =789\\&\#\mathbf {A} =1&\#\mathbf {P} =3\end{Bmatrix}}&={\dfrac {3789-3}{9990}}&={\dfrac {3786}{9990}}&={\dfrac {631}{1665}}\end{array}}}"></span> </p><p>The 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 \emptyset }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi mathvariant="normal">∅<!-- ∅ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \emptyset }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6af50205f42bb2ec3c666b7b847d2c7f96e464c7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:1.162ex; height:2.509ex;" alt="{\displaystyle \emptyset }"></span> in the examples above denotes the absence of digits of part <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 \mathbf {A} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {A} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0795cc96c75d81520a120482662b90f024c9a1a1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.019ex; height:2.176ex;" alt="{\displaystyle \mathbf {A} }"></span> in the decimal, and therefore <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 \#\mathbf {A} =0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi mathvariant="normal">#<!-- # --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">A</mi> </mrow> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \#\mathbf {A} =0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6655dcdc7daf1eaeeb38ad8ae80ad76db6e2b3d3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:8.216ex; height:2.509ex;" alt="{\displaystyle \#\mathbf {A} =0}"></span> and a corresponding absence in the generated fraction. </p> <div class="mw-heading mw-heading2"><h2 id="Repeating_decimals_as_infinite_series">Repeating decimals as infinite series</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=17" title="Edit section: Repeating decimals as infinite series"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A repeating decimal can also be expressed as an <a href="/wiki/Infinite_series" class="mw-redirect" title="Infinite series">infinite series</a>. That is, a repeating decimal can be regarded as the sum of an infinite number of rational numbers. To take the simplest example, </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 0.{\overline {1}}={\frac {1}{10}}+{\frac {1}{100}}+{\frac {1}{1000}}+\cdots =\sum _{n=1}^{\infty }{\frac {1}{10^{n}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>0.</mn> <mrow class="MJX-TeXAtom-ORD"> <mover> <mn>1</mn> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>10</mn> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>100</mn> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>1000</mn> </mfrac> </mrow> <mo>+</mo> <mo>⋯<!-- ⋯ --></mo> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">∞<!-- ∞ --></mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0.{\overline {1}}={\frac {1}{10}}+{\frac {1}{100}}+{\frac {1}{1000}}+\cdots =\sum _{n=1}^{\infty }{\frac {1}{10^{n}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2238fe61d70636da4f6b5666194b2f95af719fcc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:41.62ex; height:6.843ex;" alt="{\displaystyle 0.{\overline {1}}={\frac {1}{10}}+{\frac {1}{100}}+{\frac {1}{1000}}+\cdots =\sum _{n=1}^{\infty }{\frac {1}{10^{n}}}}"></span></dd></dl> <p>The above series is a <a href="/wiki/Geometric_series" title="Geometric series">geometric series</a> with the first term as <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">10</span></span>⁠</span> and the common factor <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">10</span></span>⁠</span>. Because the absolute value of the common factor is less than 1, we can say that the geometric series <a href="/wiki/Convergent_series" title="Convergent series">converges</a> and find the exact value in the form of a fraction by using the following formula where <i>a</i> is the first term of the series and <i>r</i> is the common factor. </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 {\frac {a}{1-r}}={\frac {\frac {1}{10}}{1-{\frac {1}{10}}}}={\frac {1}{10-1}}={\frac {1}{9}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>a</mi> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mi>r</mi> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mfrac> <mn>1</mn> <mn>10</mn> </mfrac> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>10</mn> </mfrac> </mrow> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>10</mn> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>9</mn> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {a}{1-r}}={\frac {\frac {1}{10}}{1-{\frac {1}{10}}}}={\frac {1}{10-1}}={\frac {1}{9}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/66d4555a6d732464008a18b6225cc16a732a5eb8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.505ex; width:31.665ex; height:8.176ex;" alt="{\displaystyle {\frac {a}{1-r}}={\frac {\frac {1}{10}}{1-{\frac {1}{10}}}}={\frac {1}{10-1}}={\frac {1}{9}}}"></span></dd></dl> <p>Similarly, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}0.{\overline {142857}}&={\frac {142857}{10^{6}}}+{\frac {142857}{10^{12}}}+{\frac {142857}{10^{18}}}+\cdots =\sum _{n=1}^{\infty }{\frac {142857}{10^{6n}}}\\[6px]\implies &\quad {\frac {a}{1-r}}={\frac {\frac {142857}{10^{6}}}{1-{\frac {1}{10^{6}}}}}={\frac {142857}{10^{6}-1}}={\frac {142857}{999999}}={\frac {1}{7}}\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.9em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mn>0.</mn> <mrow class="MJX-TeXAtom-ORD"> <mover> <mn>142857</mn> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>142857</mn> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>6</mn> </mrow> </msup> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>142857</mn> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>12</mn> </mrow> </msup> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>142857</mn> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>18</mn> </mrow> </msup> </mfrac> </mrow> <mo>+</mo> <mo>⋯<!-- ⋯ --></mo> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">∞<!-- ∞ --></mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>142857</mn> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>6</mn> <mi>n</mi> </mrow> </msup> </mfrac> </mrow> </mtd> </mtr> <mtr> <mtd> <mspace width="thickmathspace" /> <mo stretchy="false">⟹<!-- ⟹ --></mo> <mspace width="thickmathspace" /> </mtd> <mtd> <mspace width="1em" /> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>a</mi> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mi>r</mi> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mfrac> <mn>142857</mn> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>6</mn> </mrow> </msup> </mfrac> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>6</mn> </mrow> </msup> </mfrac> </mrow> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>142857</mn> <mrow> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>6</mn> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>142857</mn> <mn>999999</mn> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>7</mn> </mfrac> </mrow> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}0.{\overline {142857}}&={\frac {142857}{10^{6}}}+{\frac {142857}{10^{12}}}+{\frac {142857}{10^{18}}}+\cdots =\sum _{n=1}^{\infty }{\frac {142857}{10^{6n}}}\\[6px]\implies &\quad {\frac {a}{1-r}}={\frac {\frac {142857}{10^{6}}}{1-{\frac {1}{10^{6}}}}}={\frac {142857}{10^{6}-1}}={\frac {142857}{999999}}={\frac {1}{7}}\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b641179f87b6e5f31361e4a13892afeb2a0e19d5" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -8.171ex; width:62.077ex; height:17.343ex;" alt="{\displaystyle {\begin{aligned}0.{\overline {142857}}&={\frac {142857}{10^{6}}}+{\frac {142857}{10^{12}}}+{\frac {142857}{10^{18}}}+\cdots =\sum _{n=1}^{\infty }{\frac {142857}{10^{6n}}}\\[6px]\implies &\quad {\frac {a}{1-r}}={\frac {\frac {142857}{10^{6}}}{1-{\frac {1}{10^{6}}}}}={\frac {142857}{10^{6}-1}}={\frac {142857}{999999}}={\frac {1}{7}}\end{aligned}}}"></span></dd></dl> <div class="mw-heading mw-heading2"><h2 id="Multiplication_and_cyclic_permutation">Multiplication and cyclic permutation</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=18" title="Edit section: Multiplication and cyclic permutation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Transposable_integer" title="Transposable integer">Transposable integer</a></div> <p>The cyclic behavior of repeating decimals in multiplication also leads to the construction of integers which are <a href="/wiki/Cyclic_permutation" title="Cyclic permutation">cyclically permuted</a> when multiplied by certain numbers. For example, <span class="nowrap">102564 × 4 = 410256</span>. 102564 is the repetend of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">39</span></span>⁠</span> and 410256 the repetend of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">16</span><span class="sr-only">/</span><span class="den">39</span></span>⁠</span>. </p> <div class="mw-heading mw-heading2"><h2 id="Other_properties_of_repetend_lengths">Other properties of repetend lengths</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=19" title="Edit section: Other properties of repetend lengths"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Various properties of repetend lengths (periods) are given by Mitchell<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> and Dickson.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup> </p> <ul><li>The period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k</i></span></span>⁠</span> for integer <i>k</i> is always ≤ <i>k</i> − 1.</li> <li>If <i>p</i> is prime, the period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> divides evenly into <i>p</i> − 1.</li> <li>If <i>k</i> is composite, the period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k</i></span></span>⁠</span> is strictly less than <i>k</i> − 1.</li> <li>The period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num"><i>c</i></span><span class="sr-only">/</span><span class="den"><i>k</i></span></span>⁠</span>, for <i>c</i> <a href="/wiki/Coprime" class="mw-redirect" title="Coprime">coprime</a> to <i>k</i>, equals the period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k</i></span></span>⁠</span>.</li> <li>If <i>k</i> = 2<sup><i>a</i></sup>·5<sup><i>b</i></sup><i>n</i> where <i>n</i> > 1 and <i>n</i> is not divisible by 2 or 5, then the length of the transient of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k</i></span></span>⁠</span> is max(<i>a</i>, <i>b</i>), and the period equals <i>r</i>, where <i>r</i> is the <a href="/wiki/Multiplicative_order" title="Multiplicative order">multiplicative order</a> of 10 mod n, that is the smallest integer such that <span class="nowrap">10<sup><i>r</i></sup> ≡ 1 (mod <i>n</i>)</span>.</li> <li>If <i>p</i>, <i>p′</i>, <i>p″</i>,... are distinct primes, then the period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i> <i>p′</i> <i>p″</i> ⋯</span></span>⁠</span> equals the lowest common multiple of the periods of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p′</i></span></span>⁠</span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p″</i></span></span>⁠</span>,....</li> <li>If <i>k</i> and <i>k′</i> have no common prime factors other than 2 or 5, then the period of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k k′</i></span></span>⁠</span> equals the least common multiple of the periods of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k</i></span></span>⁠</span> and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k′</i></span></span>⁠</span>.</li> <li>For prime <i>p</i>, if</li></ul> <dl><dd><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{period}}\left({\frac {1}{p}}\right)={\text{period}}\left({\frac {1}{p^{2}}}\right)=\cdots ={\text{period}}\left({\frac {1}{p^{m}}}\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtext>period</mtext> </mrow> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>p</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext>period</mtext> </mrow> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mo>⋯<!-- ⋯ --></mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext>period</mtext> </mrow> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msup> </mfrac> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\text{period}}\left({\frac {1}{p}}\right)={\text{period}}\left({\frac {1}{p^{2}}}\right)=\cdots ={\text{period}}\left({\frac {1}{p^{m}}}\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e6bb5bb609446628fd74c25bbd05f15c75e5e971" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:51.204ex; height:6.176ex;" alt="{\displaystyle {\text{period}}\left({\frac {1}{p}}\right)={\text{period}}\left({\frac {1}{p^{2}}}\right)=\cdots ={\text{period}}\left({\frac {1}{p^{m}}}\right)}"></span></dd></dl></dd> <dd>for some <i>m</i>, but <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{period}}\left({\frac {1}{p^{m}}}\right)\neq {\text{period}}\left({\frac {1}{p^{m+1}}}\right),}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtext>period</mtext> </mrow> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msup> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>≠<!-- ≠ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mtext>period</mtext> </mrow> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>+</mo> <mn>1</mn> </mrow> </msup> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\text{period}}\left({\frac {1}{p^{m}}}\right)\neq {\text{period}}\left({\frac {1}{p^{m+1}}}\right),}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3d4d1531be5792910cb0a865b8fedccf509c14d7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:33.887ex; height:6.176ex;" alt="{\displaystyle {\text{period}}\left({\frac {1}{p^{m}}}\right)\neq {\text{period}}\left({\frac {1}{p^{m+1}}}\right),}"></span></dd></dl></dd> <dd>then for <i>c</i> ≥ 0 we have <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{period}}\left({\frac {1}{p^{m+c}}}\right)=p^{c}\cdot {\text{period}}\left({\frac {1}{p}}\right).}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtext>period</mtext> </mrow> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>+</mo> <mi>c</mi> </mrow> </msup> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>c</mi> </mrow> </msup> <mo>⋅<!-- ⋅ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mtext>period</mtext> </mrow> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>p</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\text{period}}\left({\frac {1}{p^{m+c}}}\right)=p^{c}\cdot {\text{period}}\left({\frac {1}{p}}\right).}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/099b983765f03e24219f12dca9170a694b7b34e0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:35.895ex; height:6.176ex;" alt="{\displaystyle {\text{period}}\left({\frac {1}{p^{m+c}}}\right)=p^{c}\cdot {\text{period}}\left({\frac {1}{p}}\right).}"></span></dd></dl></dd></dl> <ul><li>If <i>p</i> is a <b>proper prime</b> ending in a 1, that is, if the repetend of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> is a cyclic number of length <i>p</i> − 1 and <i>p</i> = 10<i>h</i> + 1 for some <i>h</i>, then each digit 0, 1, ..., 9 appears in the repetend exactly <i>h</i> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num"><i>p</i> − 1</span><span class="sr-only">/</span><span class="den">10</span></span>⁠</span> times.</li></ul> <p>For some other properties of repetends, see also.<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> </p> <div class="mw-heading mw-heading2"><h2 id="Extension_to_other_bases">Extension to other bases</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=20" title="Edit section: Extension to other bases"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Various features of repeating decimals extend to the representation of numbers in all other integer bases, not just base 10: </p> <ul><li>Every real number can be represented as an integer part followed by a <a href="/wiki/Radix" title="Radix">radix</a> point (the generalization of a <a href="/wiki/Decimal_point" class="mw-redirect" title="Decimal point">decimal point</a> to non-decimal systems) followed by a finite or infinite number of <a href="/wiki/Numerical_digit" title="Numerical digit">digits</a>.</li> <li>If the base is an integer, a <i>terminating</i> sequence obviously represents a rational number.</li> <li>A rational number has a terminating sequence if all the prime factors of the denominator of the fully reduced fractional form are also factors of the base. These numbers make up a <a href="/wiki/Dense_set" title="Dense set">dense set</a> in <span class="texhtml"><b>Q</b></span> and <span class="texhtml"><b>R</b></span>.</li> <li><span class="anchor" id="nonUnique"></span>If the <a href="/wiki/Positional_notation" title="Positional notation">positional numeral system</a> is a standard one, that is it has base</li></ul> <dl><dd><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 b\in \mathbb {Z} \smallsetminus \{-1,0,1\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>b</mi> <mo>∈<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> <mo>∖<!-- ∖ --></mo> <mo fence="false" stretchy="false">{</mo> <mo>−<!-- − --></mo> <mn>1</mn> <mo>,</mo> <mn>0</mn> <mo>,</mo> <mn>1</mn> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle b\in \mathbb {Z} \smallsetminus \{-1,0,1\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4f1498adef20545607bc265f16ab25d2b18a65e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:17.917ex; height:2.843ex;" alt="{\displaystyle b\in \mathbb {Z} \smallsetminus \{-1,0,1\}}"></span></dd></dl></dd> <dd>combined with a consecutive set of digits <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle D:=\{d_{1},d_{1}+1,\dots ,d_{r}\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>D</mi> <mo>:=</mo> <mo fence="false" stretchy="false">{</mo> <msub> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <msub> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>+</mo> <mn>1</mn> <mo>,</mo> <mo>…<!-- … --></mo> <mo>,</mo> <msub> <mi>d</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>r</mi> </mrow> </msub> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle D:=\{d_{1},d_{1}+1,\dots ,d_{r}\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/440159dc9938a423e96e62f245799e2d0bb89d64" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:24.918ex; height:2.843ex;" alt="{\displaystyle D:=\{d_{1},d_{1}+1,\dots ,d_{r}\}}"></span></dd></dl></dd> <dd>with <span class="texhtml"><i>r</i> := |<span class="nowrap" style="padding-left:0.1em; padding-right:0.1em;">b</span>|</span>, <span class="texhtml"><i>d<sub>r</sub></i> := d<sub>1</sub> + <i>r</i> − 1</span> and <span class="texhtml">0 ∈ <i>D</i></span>, then a terminating sequence is obviously equivalent to the same sequence with <i>non-terminating</i> repeating part consisting of the digit 0. If the base is positive, then there exists an <a href="/wiki/Order_isomorphism" title="Order isomorphism">order homomorphism</a> from the <a href="/wiki/String_(computer_science)#Lexicographical_ordering" title="String (computer science)">lexicographical order</a> of the <a href="/wiki/Sequence#Finite_and_infinite" title="Sequence">right-sided infinite strings</a> over the <a href="/wiki/Alphabet" title="Alphabet">alphabet</a> <span class="texhtml"><i>D</i></span> into some closed interval of the reals, which maps the strings <span class="texhtml">0.<i>A</i><sub>1</sub><i>A</i><sub>2</sub>...<i>A</i><sub><i>n</i></sub><span style="text-decoration:overline;"><i>d<sub>b</sub></i></span></span> and <span class="texhtml">0.<i>A</i><sub>1</sub><i>A</i><sub>2</sub>...(<i>A<sub>n</sub></i>+1)<span style="text-decoration:overline;"><i>d</i><sub>1</sub></span></span> with <span class="texhtml"><i>A<sub>i</sub></i> ∈ <i>D</i></span> and <span class="texhtml"><i>A<sub>n</sub></i> ≠ <i>d<sub>b</sub></i></span> to the same real number – and there are no other duplicate images. In the decimal system, for example, there is 0.<span style="text-decoration:overline;">9</span> = 1.<span style="text-decoration:overline;">0</span> = 1; in the <a href="/wiki/Balanced_ternary" title="Balanced ternary">balanced ternary</a> system there is 0.<span style="text-decoration:overline;">1</span> = 1.<span style="text-decoration:overline;">T</span> = <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">2</span></span>⁠</span>.</dd></dl> <ul><li><span class="anchor" id="repeatingLength"></span>A rational number has an indefinitely repeating sequence of finite length <span class="texhtml mvar" style="font-style:italic;">l</span>, if the reduced fraction's denominator contains a prime factor that is not a factor of the base. If <span class="texhtml mvar" style="font-style:italic;">q</span> is the maximal factor of the reduced denominator which is coprime to the base, <span class="texhtml mvar" style="font-style:italic;">l</span> is the smallest exponent such that <span class="texhtml mvar" style="font-style:italic;">q</span> divides <span class="texhtml"><i>b</i><sup><i>ℓ</i></sup> − 1</span>. It is the <a href="/wiki/Multiplicative_order" title="Multiplicative order">multiplicative order</a> <span class="texhtml">ord<sub><i>q</i></sub>(<i>b</i>)</span> of the residue class <span class="texhtml"><i>b</i> mod <i>q</i></span> which is a divisor of the <a href="/wiki/Carmichael_function" title="Carmichael function">Carmichael function</a> <span class="texhtml"><i>λ</i>(<i>q</i>)</span> which in turn is smaller than <span class="texhtml mvar" style="font-style:italic;">q</span>. The repeating sequence is preceded by a transient of finite length if the reduced fraction also shares a prime factor with the base. A repeating sequence</li></ul> <dl><dd><dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left(0.{\overline {A_{1}A_{2}\ldots A_{\ell }}}\right)_{b}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow> <mo>(</mo> <mrow> <mn>0.</mn> <mrow class="MJX-TeXAtom-ORD"> <mover> <mrow> <msub> <mi>A</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>A</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>…<!-- … --></mo> <msub> <mi>A</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ℓ<!-- ℓ --></mi> </mrow> </msub> </mrow> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>b</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left(0.{\overline {A_{1}A_{2}\ldots A_{\ell }}}\right)_{b}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2e49c18417a4fd4884c5df63e704a6dd707e4689" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:17.391ex; height:4.843ex;" alt="{\displaystyle \left(0.{\overline {A_{1}A_{2}\ldots A_{\ell }}}\right)_{b}}"></span></dd></dl></dd> <dd>represents the fraction <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 {\frac {(A_{1}A_{2}\ldots A_{\ell })_{b}}{b^{\ell }-1}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <msub> <mi>A</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>A</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>…<!-- … --></mo> <msub> <mi>A</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ℓ<!-- ℓ --></mi> </mrow> </msub> <msub> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>b</mi> </mrow> </msub> </mrow> <mrow> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>ℓ<!-- ℓ --></mi> </mrow> </msup> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </mfrac> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {(A_{1}A_{2}\ldots A_{\ell })_{b}}{b^{\ell }-1}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f7c36bd49309e777c2a330928c3c14e60f5b335f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:15.983ex; height:6.176ex;" alt="{\displaystyle {\frac {(A_{1}A_{2}\ldots A_{\ell })_{b}}{b^{\ell }-1}}.}"></span></dd></dl></dd></dl> <ul><li>An irrational number has a representation of infinite length that is not, from any point, an indefinitely repeating sequence of finite length.</li></ul> <p>For example, in <a href="/wiki/Duodecimal" title="Duodecimal">duodecimal</a>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">2</span></span>⁠</span> = 0.6, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">3</span></span>⁠</span> = 0.4, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">4</span></span>⁠</span> = 0.3 and <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">6</span></span>⁠</span> = 0.2 all terminate; <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">5</span></span>⁠</span> = 0.<span style="text-decoration:overline;">2497</span> repeats with period length 4, in contrast with the equivalent decimal expansion of 0.2; <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 0.<span style="text-decoration:overline;">186A35</span> has period 6 in duodecimal, just as it does in decimal. </p><p>If <span class="texhtml mvar" style="font-style:italic;">b</span> is an integer base and <span class="texhtml mvar" style="font-style:italic;">k</span> is an integer, then </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {1}{k}}={\frac {1}{b}}+{\frac {(b-k)^{1}}{b^{2}}}+{\frac {(b-k)^{2}}{b^{3}}}+{\frac {(b-k)^{3}}{b^{4}}}+\cdots +{\frac {(b-k)^{N-1}}{b^{N}}}+\cdots ={\frac {1}{b}}{\frac {1}{1-{\frac {b-k}{b}}}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>k</mi> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>b</mi> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>b</mi> <mo>−<!-- − --></mo> <mi>k</mi> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msup> </mrow> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>b</mi> <mo>−<!-- − --></mo> <mi>k</mi> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mrow> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msup> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>b</mi> <mo>−<!-- − --></mo> <mi>k</mi> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msup> </mrow> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>4</mn> </mrow> </msup> </mfrac> </mrow> <mo>+</mo> <mo>⋯<!-- ⋯ --></mo> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>b</mi> <mo>−<!-- − --></mo> <mi>k</mi> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msup> </mrow> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> </mrow> </msup> </mfrac> </mrow> <mo>+</mo> <mo>⋯<!-- ⋯ --></mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>b</mi> </mfrac> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>b</mi> <mo>−<!-- − --></mo> <mi>k</mi> </mrow> <mi>b</mi> </mfrac> </mrow> </mrow> </mfrac> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {1}{k}}={\frac {1}{b}}+{\frac {(b-k)^{1}}{b^{2}}}+{\frac {(b-k)^{2}}{b^{3}}}+{\frac {(b-k)^{3}}{b^{4}}}+\cdots +{\frac {(b-k)^{N-1}}{b^{N}}}+\cdots ={\frac {1}{b}}{\frac {1}{1-{\frac {b-k}{b}}}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7809fcadf4e6d09289a3d0dd18fada41634f5428" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.671ex; width:81.626ex; height:7.676ex;" alt="{\displaystyle {\frac {1}{k}}={\frac {1}{b}}+{\frac {(b-k)^{1}}{b^{2}}}+{\frac {(b-k)^{2}}{b^{3}}}+{\frac {(b-k)^{3}}{b^{4}}}+\cdots +{\frac {(b-k)^{N-1}}{b^{N}}}+\cdots ={\frac {1}{b}}{\frac {1}{1-{\frac {b-k}{b}}}}.}"></span></dd></dl> <p>For example 1/7 in duodecimal: <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {1}{7}}=\left({\frac {1}{10^{\phantom {1}}}}+{\frac {5}{10^{2}}}+{\frac {21}{10^{3}}}+{\frac {A5}{10^{4}}}+{\frac {441}{10^{5}}}+{\frac {1985}{10^{6}}}+\cdots \right)_{\text{base 12}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>7</mn> </mfrac> </mrow> <mo>=</mo> <msub> <mrow> <mo>(</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mphantom> <mn>1</mn> </mphantom> </mrow> </mrow> </msup> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>5</mn> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>21</mn> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msup> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>A</mi> <mn>5</mn> </mrow> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>4</mn> </mrow> </msup> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>441</mn> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>5</mn> </mrow> </msup> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1985</mn> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>6</mn> </mrow> </msup> </mfrac> </mrow> <mo>+</mo> <mo>⋯<!-- ⋯ --></mo> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mtext>base 12</mtext> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {1}{7}}=\left({\frac {1}{10^{\phantom {1}}}}+{\frac {5}{10^{2}}}+{\frac {21}{10^{3}}}+{\frac {A5}{10^{4}}}+{\frac {441}{10^{5}}}+{\frac {1985}{10^{6}}}+\cdots \right)_{\text{base 12}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/24c615701a873b22f0a1008e536232b488cc8364" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:60.525ex; height:6.176ex;" alt="{\displaystyle {\frac {1}{7}}=\left({\frac {1}{10^{\phantom {1}}}}+{\frac {5}{10^{2}}}+{\frac {21}{10^{3}}}+{\frac {A5}{10^{4}}}+{\frac {441}{10^{5}}}+{\frac {1985}{10^{6}}}+\cdots \right)_{\text{base 12}}}"></span> </p><p>which is 0.<span style="text-decoration:overline;">186A35</span><sub>base12</sub>. 10<sub>base12</sub> is 12<sub>base10</sub>, 10<sup>2</sup><sub>base12</sub> is 144<sub>base10</sub>, 21<sub>base12</sub> is 25<sub>base10</sub>, A5<sub>base12</sub> is 125<sub>base10</sub>. </p> <div class="mw-heading mw-heading3"><h3 id="Algorithm_for_positive_bases">Algorithm for positive bases</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=21" title="Edit section: Algorithm for positive bases"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For a rational <span class="texhtml">0 < <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num"><i>p</i></span><span class="sr-only">/</span><span class="den"><i>q</i></span></span>⁠</span> < 1</span> (and base <span class="texhtml"><i>b</i> ∈ <b>N</b><sub>>1</sub></span>) there is the following algorithm producing the repetend together with its length: </p> <div class="mw-highlight mw-highlight-lang-mupad mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">function</span><span class="w"> </span><span class="nf">b_adic</span><span class="p">(</span><span class="nv">b</span><span class="o">,</span><span class="nv">p</span><span class="o">,</span><span class="nv">q</span><span class="p">)</span><span class="w"> </span><span class="c1">// b ≥ 2; 0 < p < q</span> <span class="w"> </span><span class="nv">digits</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"0123..."</span><span class="o">;</span><span class="w"> </span><span class="c1">// up to the digit with value b–1</span> <span class="k">begin</span> <span class="w"> </span><span class="nv">s</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span><span class="o">;</span><span class="w"> </span><span class="c1">// the string of digits</span> <span class="w"> </span><span class="nv">pos</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</span><span class="o">;</span><span class="w"> </span><span class="c1">// all places are right to the radix point</span> <span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="ow">not</span><span class="w"> </span><span class="nf">defined</span><span class="p">(</span><span class="nv">occurs</span><span class="p">[</span><span class="nv">p</span><span class="p">])</span><span class="w"> </span><span class="k">do</span> <span class="w"> </span><span class="nv">occurs</span><span class="p">[</span><span class="nv">p</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">pos</span><span class="o">;</span><span class="w"> </span><span class="c1">// the position of the place with remainder p</span> <span class="w"> </span><span class="nv">bp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">b</span><span class="o">*</span><span class="nv">p</span><span class="o">;</span> <span class="hll"><span class="w"> </span><span class="nv">z</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">floor</span><span class="p">(</span><span class="nv">bp</span><span class="o">/</span><span class="nv">q</span><span class="p">)</span><span class="o">;</span><span class="w"> </span><span class="c1">// index z of digit within: 0 ≤ z ≤ b-1</span> </span><span class="hll"><span class="w"> </span><span class="nv">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">b</span><span class="o">*</span><span class="nv">p</span><span class="w"> </span>−<span class="w"> </span><span class="nv">z</span><span class="o">*</span><span class="nv">q</span><span class="o">;</span><span class="w"> </span><span class="c1">// 0 ≤ p < q</span> </span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="nv">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</span><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="nv">L</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</span><span class="o">;</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="ow">not</span><span class="w"> </span><span class="nv">z</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</span><span class="w"> </span><span class="k">then</span> <span class="w"> </span><span class="nv">s</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">s</span><span class="w"> </span><span class="o">.</span><span class="w"> </span><span class="nf">substring</span><span class="p">(</span><span class="nv">digits</span><span class="o">,</span><span class="w"> </span><span class="nv">z</span><span class="o">,</span><span class="w"> </span><span class="m">1</span><span class="p">)</span><span class="w"> </span> <span class="w"> </span><span class="k">end</span><span class="w"> </span><span class="k">if</span> <span class="w"> </span><span class="nf">return</span> <span class="p">(</span><span class="nv">s</span><span class="p">)</span><span class="o">;</span> <span class="w"> </span><span class="k">end</span><span class="w"> </span><span class="k">if</span> <span class="w"> </span><span class="nv">s</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">s</span><span class="w"> </span><span class="o">.</span><span class="w"> </span><span class="nf">substring</span><span class="p">(</span><span class="nv">digits</span><span class="o">,</span><span class="w"> </span><span class="nv">z</span><span class="o">,</span><span class="w"> </span><span class="m">1</span><span class="p">)</span><span class="o">;</span><span class="w"> </span><span class="c1">// append the character of the digit</span> <span class="w"> </span><span class="nv">pos</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="m">1</span><span class="o">;</span> <span class="w"> </span><span class="k">end</span><span class="w"> </span><span class="k">while</span> <span class="w"> </span><span class="nv">L</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">pos</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="nv">occurs</span><span class="p">[</span><span class="nv">p</span><span class="p">]</span><span class="o">;</span><span class="w"> </span><span class="c1">// the length of the repetend (being < q)</span> <span class="w"> </span><span class="c1">// mark the digits of the repetend by a vinculum:</span> <span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="nv">i</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="nv">occurs</span><span class="p">[</span><span class="nv">p</span><span class="p">]</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="nv">pos</span><span class="o">-</span><span class="m">1</span><span class="w"> </span><span class="k">do</span> <span class="w"> </span><span class="nf">substring</span><span class="p">(</span><span class="nv">s</span><span class="o">,</span><span class="w"> </span><span class="nv">i</span><span class="o">,</span><span class="w"> </span><span class="m">1</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">overline</span><span class="p">(</span><span class="nf">substring</span><span class="p">(</span><span class="nv">s</span><span class="o">,</span><span class="w"> </span><span class="nv">i</span><span class="o">,</span><span class="w"> </span><span class="m">1</span><span class="p">))</span><span class="o">;</span> <span class="w"> </span><span class="k">end</span><span class="w"> </span><span class="k">for</span> <span class="w"> </span><span class="nf">return</span> <span class="p">(</span><span class="nv">s</span><span class="p">)</span><span class="o">;</span> <span class="k">end</span><span class="w"> </span><span class="nv">function</span> </pre></div> <p>The first highlighted line calculates the digit <span class="texhtml mvar" style="font-style:italic;">z</span>. </p><p>The subsequent line calculates the new remainder <span class="texhtml mvar" style="font-style:italic;">p′</span> of the division <a href="/wiki/Modular_arithmetic" title="Modular arithmetic">modulo</a> the denominator <span class="texhtml mvar" style="font-style:italic;">q</span>. As a consequence of the <a href="/wiki/Floor_and_ceiling_functions" title="Floor and ceiling functions">floor function</a> <code>floor</code> 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 {\frac {bp}{q}}-1\;\;<\;\;z=\left\lfloor {\frac {bp}{q}}\right\rfloor \;\;\leq \;\;{\frac {bp}{q}},}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>b</mi> <mi>p</mi> </mrow> <mi>q</mi> </mfrac> </mrow> <mo>−<!-- − --></mo> <mn>1</mn> <mspace width="thickmathspace" /> <mspace width="thickmathspace" /> <mo><</mo> <mspace width="thickmathspace" /> <mspace width="thickmathspace" /> <mi>z</mi> <mo>=</mo> <mrow> <mo>⌊</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>b</mi> <mi>p</mi> </mrow> <mi>q</mi> </mfrac> </mrow> <mo>⌋</mo> </mrow> <mspace width="thickmathspace" /> <mspace width="thickmathspace" /> <mo>≤<!-- ≤ --></mo> <mspace width="thickmathspace" /> <mspace width="thickmathspace" /> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>b</mi> <mi>p</mi> </mrow> <mi>q</mi> </mfrac> </mrow> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {bp}{q}}-1\;\;<\;\;z=\left\lfloor {\frac {bp}{q}}\right\rfloor \;\;\leq \;\;{\frac {bp}{q}},}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8ee4587b4380cef1fb47c962cbf4bd144c0e274b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:31.914ex; height:6.176ex;" alt="{\displaystyle {\frac {bp}{q}}-1\;\;<\;\;z=\left\lfloor {\frac {bp}{q}}\right\rfloor \;\;\leq \;\;{\frac {bp}{q}},}"></span></dd></dl> <p>thus </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 bp-q<zq\quad \implies \quad p':=bp-zq<q}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>b</mi> <mi>p</mi> <mo>−<!-- − --></mo> <mi>q</mi> <mo><</mo> <mi>z</mi> <mi>q</mi> <mspace width="1em" /> <mspace width="thickmathspace" /> <mo stretchy="false">⟹<!-- ⟹ --></mo> <mspace width="thickmathspace" /> <mspace width="1em" /> <msup> <mi>p</mi> <mo>′</mo> </msup> <mo>:=</mo> <mi>b</mi> <mi>p</mi> <mo>−<!-- − --></mo> <mi>z</mi> <mi>q</mi> <mo><</mo> <mi>q</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle bp-q<zq\quad \implies \quad p':=bp-zq<q}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0518b0f5ba3c328642bb709181043914cf06d9a8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:39.297ex; height:2.843ex;" alt="{\displaystyle bp-q<zq\quad \implies \quad p':=bp-zq<q}"></span></dd></dl> <p>and </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 zq\leq bp\quad \implies \quad 0\leq bp-zq=:p'\,.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>z</mi> <mi>q</mi> <mo>≤<!-- ≤ --></mo> <mi>b</mi> <mi>p</mi> <mspace width="1em" /> <mspace width="thickmathspace" /> <mo stretchy="false">⟹<!-- ⟹ --></mo> <mspace width="thickmathspace" /> <mspace width="1em" /> <mn>0</mn> <mo>≤<!-- ≤ --></mo> <mi>b</mi> <mi>p</mi> <mo>−<!-- − --></mo> <mi>z</mi> <mi>q</mi> <mo>=:</mo> <msup> <mi>p</mi> <mo>′</mo> </msup> <mspace width="thinmathspace" /> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle zq\leq bp\quad \implies \quad 0\leq bp-zq=:p'\,.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8aa2c2e589c10809a602f66f0dd634f1b692a91b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:36.514ex; height:2.843ex;" alt="{\displaystyle zq\leq bp\quad \implies \quad 0\leq bp-zq=:p'\,.}"></span></dd></dl> <p>Because all these remainders <span class="texhtml mvar" style="font-style:italic;">p</span> are non-negative integers less than <span class="texhtml mvar" style="font-style:italic;">q</span>, there can be only a finite number of them with the consequence that they must recur in the <code>while</code> loop. Such a recurrence is detected by the <a href="/wiki/Associative_array" title="Associative array">associative array</a> <code>occurs</code>. The new digit <span class="texhtml mvar" style="font-style:italic;">z</span> is formed in the yellow line, where <span class="texhtml mvar" style="font-style:italic;">p</span> is the only non-constant. The length <span class="texhtml mvar" style="font-style:italic;">L</span> of the repetend equals the number of the remainders (see also section <a href="#Every_rational_number_is_either_a_terminating_or_repeating_decimal">Every rational number is either a terminating or repeating decimal</a>). </p> <div class="mw-heading mw-heading2"><h2 id="Applications_to_cryptography">Applications to cryptography</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=22" title="Edit section: Applications to cryptography"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Repeating decimals (also called decimal sequences) have found cryptographic and error-correction coding applications.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup> In these applications repeating decimals to base 2 are generally used which gives rise to binary sequences. The maximum length binary sequence for <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> (when 2 is a primitive root of <i>p</i>) is given by:<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle a(i)=2^{i}{\bmod {p}}{\bmod {2}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>a</mi> <mo stretchy="false">(</mo> <mi>i</mi> <mo stretchy="false">)</mo> <mo>=</mo> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msup> <mrow class="MJX-TeXAtom-ORD"> <mo lspace="thickmathspace" rspace="thickmathspace">mod</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>p</mi> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo lspace="thickmathspace" rspace="thickmathspace">mod</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle a(i)=2^{i}{\bmod {p}}{\bmod {2}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/45043b161b23bd27f94c30775e6d9633bd58ef8c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:22.596ex; height:3.176ex;" alt="{\displaystyle a(i)=2^{i}{\bmod {p}}{\bmod {2}}}"></span></dd></dl> <p>These sequences of period <i>p</i> − 1 have an autocorrelation function that has a negative peak of −1 for shift of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1214402035"><span class="sfrac">⁠<span class="tion"><span class="num"><i>p</i> − 1</span><span class="sr-only">/</span><span class="den">2</span></span>⁠</span>. The randomness of these sequences has been examined by <a href="/wiki/Diehard_tests" title="Diehard tests">diehard tests</a>.<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=23" title="Edit section: See also"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Decimal_representation" title="Decimal representation">Decimal representation</a></li> <li><a href="/wiki/Full_reptend_prime" title="Full reptend prime">Full reptend prime</a></li> <li><a href="/wiki/Midy%27s_theorem" title="Midy's theorem">Midy's theorem</a></li> <li><a href="/wiki/Parasitic_number" title="Parasitic number">Parasitic number</a></li> <li><a href="/wiki/Trailing_zero" title="Trailing zero">Trailing zero</a></li> <li><a href="/wiki/Unique_prime" class="mw-redirect" title="Unique prime">Unique prime</a></li> <li><a href="/wiki/0.999..." title="0.999...">0.999...</a>, a repeating decimal equal to one</li> <li><a href="/wiki/Pigeonhole_principle" title="Pigeonhole principle">Pigeonhole principle</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="Notes">Notes</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Repeating_decimal&action=edit&section=24" title="Edit section: Notes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist"> <div class="mw-references-wrap mw-references-columns"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text">Courant, R. and Robbins, H. <i>What Is Mathematics?: An Elementary Approach to Ideas and Methods, 2nd ed.</i> Oxford, England: Oxford University Press, 1996: p. 67.</span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><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="CITEREFBeswick2004" class="citation cs2">Beswick, Kim (2004), "Why Does 0.999... = 1?: A Perennial Question and Number Sense", <i>Australian Mathematics Teacher</i>, <b>60</b> (4): 7–9</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Australian+Mathematics+Teacher&rft.atitle=Why+Does+0.999...+%3D+1%3F%3A+A+Perennial+Question+and+Number+Sense&rft.volume=60&rft.issue=4&rft.pages=7-9&rft.date=2004&rft.aulast=Beswick&rft.aufirst=Kim&rfr_id=info%3Asid%2Fen.wikipedia.org%3ARepeating+decimal" class="Z3988"></span></span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://math.stackexchange.com/questions/895611/lamberts-original-proof-that-pi-is-irrational">"Lambert's Original Proof that $\pi$ is irrational"</a>. <i>Mathematics Stack Exchange</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-12-19</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Mathematics+Stack+Exchange&rft.atitle=Lambert%27s+Original+Proof+that+%24%5Cpi%24+is+irrational.&rft_id=https%3A%2F%2Fmath.stackexchange.com%2Fquestions%2F895611%2Flamberts-original-proof-that-pi-is-irrational&rfr_id=info%3Asid%2Fen.wikipedia.org%3ARepeating+decimal" class="Z3988"></span></span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text">Conférence Intercantonale de l'Instruction Publique de la Suisse Romande et du Tessin (2011). <i>Aide-mémoire</i>. Mathématiques 9-10-11. LEP. pp. 20–21.</span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text">For a base <i>b</i> and a divisor <i>n</i>, in terms of group theory <a href="/wiki/Carmichael_function#Order_of_elements_modulo_n" title="Carmichael function">this length</a> divides <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 \operatorname {ord} _{n}(b):=\min\{L\in \mathbb {N} \,\mid \,b^{L}\equiv 1{\bmod {n}}\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>ord</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mi>b</mi> <mo stretchy="false">)</mo> <mo>:=</mo> <mo movablelimits="true" form="prefix">min</mo> <mo fence="false" stretchy="false">{</mo> <mi>L</mi> <mo>∈<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">N</mi> </mrow> <mspace width="thinmathspace" /> <mo>∣<!-- ∣ --></mo> <mspace width="thinmathspace" /> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>L</mi> </mrow> </msup> <mo>≡<!-- ≡ --></mo> <mn>1</mn> <mrow class="MJX-TeXAtom-ORD"> <mo lspace="thickmathspace" rspace="thickmathspace">mod</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </mrow> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \operatorname {ord} _{n}(b):=\min\{L\in \mathbb {N} \,\mid \,b^{L}\equiv 1{\bmod {n}}\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7c89f02c770bea80606bb6ad11a7fb832c81083f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:39.836ex; height:3.176ex;" alt="{\displaystyle \operatorname {ord} _{n}(b):=\min\{L\in \mathbb {N} \,\mid \,b^{L}\equiv 1{\bmod {n}}\}}"></span></dd></dl> (with <a href="/wiki/Modular_arithmetic" title="Modular arithmetic">modular arithmetic</a> <span class="nowrap">≡ 1 mod <i>n</i></span>) which divides the Carmichael function <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 \lambda (n):=\max\{\operatorname {ord} _{n}(b)\,\mid \,\gcd(b,n)=1\}}"> <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> <mo movablelimits="true" form="prefix">max</mo> <mo fence="false" stretchy="false">{</mo> <msub> <mi>ord</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mi>b</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mo>∣<!-- ∣ --></mo> <mspace width="thinmathspace" /> <mo movablelimits="true" form="prefix">gcd</mo> <mo stretchy="false">(</mo> <mi>b</mi> <mo>,</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lambda (n):=\max\{\operatorname {ord} _{n}(b)\,\mid \,\gcd(b,n)=1\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/51a96b36d6386d94b9865d41df7076a48dd7b003" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:38.042ex; height:2.843ex;" alt="{\displaystyle \lambda (n):=\max\{\operatorname {ord} _{n}(b)\,\mid \,\gcd(b,n)=1\}}"></span></dd></dl> which again divides <a href="/wiki/Euler%27s_totient_function" title="Euler's totient function">Euler's totient function</a> <i>φ</i>(<i>n</i>).</span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFVuorinen" class="citation web cs1">Vuorinen, Aapeli. <a rel="nofollow" class="external text" href="https://www.aapelivuorinen.com/blog/2017/03/06/rational-numbers-repeating-decimal-expansions/">"Rational numbers have repeating decimal expansions"</a>. <i>Aapeli Vuorinen</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-12-23</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Aapeli+Vuorinen&rft.atitle=Rational+numbers+have+repeating+decimal+expansions&rft.aulast=Vuorinen&rft.aufirst=Aapeli&rft_id=https%3A%2F%2Fwww.aapelivuorinen.com%2Fblog%2F2017%2F03%2F06%2Frational-numbers-repeating-decimal-expansions%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ARepeating+decimal" class="Z3988"></span></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20231223234518/https://www.sjsu.edu/faculty/watkins/repeatingdecimals.htm">"The Sets of Repeating Decimals"</a>. <i>www.sjsu.edu</i>. Archived from <a rel="nofollow" class="external text" href="https://www.sjsu.edu/faculty/watkins/repeatingdecimals.htm">the original</a> on 23 December 2023<span class="reference-accessdate">. Retrieved <span class="nowrap">2023-12-23</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=www.sjsu.edu&rft.atitle=The+Sets+of+Repeating+Decimals&rft_id=https%3A%2F%2Fwww.sjsu.edu%2Ffaculty%2Fwatkins%2Frepeatingdecimals.htm&rfr_id=info%3Asid%2Fen.wikipedia.org%3ARepeating+decimal" 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="CITEREFRoRi2016" class="citation web cs1">RoRi (2016-03-01). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20231223234333/https://www.stumblingrobot.com/2016/02/29/prove-that-every-repeating-decimal-represents-a-rational-number/">"Prove that every repeating decimal represents a rational number"</a>. <i>Stumbling Robot</i>. Archived from <a rel="nofollow" class="external text" href="https://www.stumblingrobot.com/2016/02/29/prove-that-every-repeating-decimal-represents-a-rational-number/">the original</a> on 23 December 2023<span class="reference-accessdate">. Retrieved <span class="nowrap">2023-12-23</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Stumbling+Robot&rft.atitle=Prove+that+every+repeating+decimal+represents+a+rational+number&rft.date=2016-03-01&rft.au=RoRi&rft_id=https%3A%2F%2Fwww.stumblingrobot.com%2F2016%2F02%2F29%2Fprove-that-every-repeating-decimal-represents-a-rational-number%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ARepeating+decimal" class="Z3988"></span></span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGray2000" class="citation journal cs1">Gray, Alexander J. (March 2000). "Digital roots and reciprocals of primes". <i><a href="/wiki/Mathematical_Gazette" class="mw-redirect" title="Mathematical Gazette">Mathematical Gazette</a></i>. <b>84</b> (499): 86. <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%2F3621484">10.2307/3621484</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/3621484">3621484</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:125834304">125834304</a>. <q>For primes greater than 5, all the digital roots appear to have the same value, 9. We can confirm this if...</q></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Mathematical+Gazette&rft.atitle=Digital+roots+and+reciprocals+of+primes&rft.volume=84&rft.issue=499&rft.pages=86&rft.date=2000-03&rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A125834304%23id-name%3DS2CID&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F3621484%23id-name%3DJSTOR&rft_id=info%3Adoi%2F10.2307%2F3621484&rft.aulast=Gray&rft.aufirst=Alexander+J.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ARepeating+decimal" 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">Dickson, L. E., <i>History of the Theory of Numbers</i>, Volume 1, Chelsea Publishing Co., 1952.</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">William E. Heal. Some Properties of Repetends. Annals of Mathematics, Vol. 3, No. 4 (Aug., 1887), pp. 97–103</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">Albert H. Beiler, <i>Recreations in the Theory of Numbers</i>, p. 79</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">Mitchell, Douglas W., "A nonlinear random number generator with known, long cycle length", <i><a href="/wiki/Cryptologia" title="Cryptologia">Cryptologia</a></i> 17, January 1993, pp. 55–62.</span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><a href="/wiki/L._E._Dickson" class="mw-redirect" title="L. E. Dickson">Dickson, Leonard E.</a>, <i><a href="/wiki/History_of_the_Theory_of_Numbers" title="History of the Theory of Numbers">History of the Theory of Numbers</a>, Vol. I</i>, Chelsea Publ. Co., 1952 (orig. 1918), pp. 164–173.</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">Armstrong, N. J., and Armstrong, R. J., "Some properties of repetends", <i>Mathematical Gazette</i> 87, November 2003, pp. 437–443.</span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text">Kak, Subhash, Chatterjee, A. "On decimal sequences". <i>IEEE Transactions on Information Theory</i>, vol. IT-27, pp. 647–652, September 1981.</span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text">Kak, Subhash, "Encryption and error-correction using d-sequences". <i>IEEE Transactios on Computers</i>, vol. C-34, pp. 803–809, 1985.</span> </li> <li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text">Bellamy, J. "Randomness of D sequences via diehard testing". 2013. <a href="/wiki/ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<a rel="nofollow" class="external text" href="https://arxiv.org/abs/1312.3618">1312.3618</a></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=Repeating_decimal&action=edit&section=25" title="Edit section: External links"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><span class="citation mathworld" id="Reference-Mathworld-Repeating_Decimal"><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/RepeatingDecimal.html">"Repeating Decimal"</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=Repeating+Decimal&rft.au=Weisstein%2C+Eric+W.&rft_id=https%3A%2F%2Fmathworld.wolfram.com%2FRepeatingDecimal.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ARepeating+decimal" class="Z3988"></span></span></li></ul> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐5c59558b9d‐2p7sq Cached time: 20241202004516 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.832 seconds Real time usage: 1.056 seconds Preprocessor visited node count: 13196/1000000 Post‐expand include size: 191442/2097152 bytes Template argument size: 22411/2097152 bytes Highest expansion depth: 20/100 Expensive parser function count: 14/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 208687/5000000 bytes Lua time usage: 0.308/10.000 seconds Lua memory usage: 6513421/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 719.729 1 -total 24.88% 179.082 243 Template:Sfrac 16.26% 117.047 1 Template:Reflist 13.32% 95.900 1 Template:Multiple_issues 10.95% 78.801 1 Template:Citation 10.26% 73.833 1 Template:Short_description 8.54% 61.476 3 Template:Ambox 7.49% 53.890 2 Template:Pagetype 7.20% 51.815 1 Template:More_citations_needed 4.55% 32.767 4 Template:Cn --> <!-- Saved in parser cache with key enwiki:pcache:13612447:|#|:idhash:canonical and timestamp 20241202004516 and revision id 1258671238. 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&useformat=desktop" 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=Repeating_decimal&oldid=1258671238">https://en.wikipedia.org/w/index.php?title=Repeating_decimal&oldid=1258671238</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:Elementary_arithmetic" title="Category:Elementary arithmetic">Elementary arithmetic</a></li><li><a href="/wiki/Category:Numeral_systems" title="Category:Numeral systems">Numeral systems</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><li><a href="/wiki/Category:Articles_needing_additional_references_from_July_2023" title="Category:Articles needing additional references from July 2023">Articles needing additional references from July 2023</a></li><li><a href="/wiki/Category:All_articles_needing_additional_references" title="Category:All articles needing additional references">All articles needing additional references</a></li><li><a href="/wiki/Category:Articles_needing_cleanup_from_July_2024" title="Category:Articles needing cleanup from July 2024">Articles needing cleanup from July 2024</a></li><li><a href="/wiki/Category:All_pages_needing_cleanup" title="Category:All pages needing cleanup">All pages needing cleanup</a></li><li><a href="/wiki/Category:Cleanup_tagged_articles_with_a_reason_field_from_July_2024" title="Category:Cleanup tagged articles with a reason field from July 2024">Cleanup tagged articles with a reason field from July 2024</a></li><li><a href="/wiki/Category:Wikipedia_pages_needing_cleanup_from_July_2024" title="Category:Wikipedia pages needing cleanup from July 2024">Wikipedia pages needing cleanup from July 2024</a></li><li><a href="/wiki/Category:Articles_with_multiple_maintenance_issues" title="Category:Articles with multiple maintenance issues">Articles with multiple maintenance issues</a></li><li><a href="/wiki/Category:Articles_needing_additional_references_from_May_2022" title="Category:Articles needing additional references from May 2022">Articles needing additional references from May 2022</a></li><li><a href="/wiki/Category:All_articles_with_unsourced_statements" title="Category:All articles with unsourced statements">All articles with unsourced statements</a></li><li><a href="/wiki/Category:Articles_with_unsourced_statements_from_October_2023" title="Category:Articles with unsourced statements from October 2023">Articles with unsourced statements from October 2023</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 20 November 2024, at 23:11<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=Repeating_decimal&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-5c59558b9d-m6fsj","wgBackendResponseTime":155,"wgPageParseReport":{"limitreport":{"cputime":"0.832","walltime":"1.056","ppvisitednodes":{"value":13196,"limit":1000000},"postexpandincludesize":{"value":191442,"limit":2097152},"templateargumentsize":{"value":22411,"limit":2097152},"expansiondepth":{"value":20,"limit":100},"expensivefunctioncount":{"value":14,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":208687,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 719.729 1 -total"," 24.88% 179.082 243 Template:Sfrac"," 16.26% 117.047 1 Template:Reflist"," 13.32% 95.900 1 Template:Multiple_issues"," 10.95% 78.801 1 Template:Citation"," 10.26% 73.833 1 Template:Short_description"," 8.54% 61.476 3 Template:Ambox"," 7.49% 53.890 2 Template:Pagetype"," 7.20% 51.815 1 Template:More_citations_needed"," 4.55% 32.767 4 Template:Cn"]},"scribunto":{"limitreport-timeusage":{"value":"0.308","limit":"10.000"},"limitreport-memusage":{"value":6513421,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-5c59558b9d-2p7sq","timestamp":"20241202004516","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Repeating decimal","url":"https:\/\/en.wikipedia.org\/wiki\/Repeating_decimal","sameAs":"http:\/\/www.wikidata.org\/entity\/Q389208","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q389208","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-02-06T19:24:23Z","dateModified":"2024-11-20T23:11:52Z","headline":"decimal representation of a number whose digits are periodic"}</script> </body> </html>