RosettaCodeData/Task/Deceptive-numbers/00-TASK.txt

39 lines
1.5 KiB
Plaintext

Repunits are numbers that consist entirely of repetitions of the digit one (unity). The notation '''R<sub>n</sub>''' symbolizes the repunit made up of '''n''' ones.
Every prime '''p''' larger than 5, evenly divides the repunit '''R<sub>p-1</sub>'''.
;E.G.
The repunit '''R<sub>6</sub>''' is evenly divisible by '''7'''.
<span style=font-size:125%;font-weight:bold;padding-left:3em;>111111 / 7 = 15873</span>
The repunit '''R<sub>42</sub>''' is evenly divisible by '''43'''.
<span style=font-size:125%;font-weight:bold;padding-left:3em;>111111111111111111111111111111111111111111 / 43 = 2583979328165374677002583979328165374677</span>
And so on.
There are composite numbers that also have this same property. They are often referred to as ''deceptive non-primes'' or ''deceptive numbers''.
The repunit '''R<sub>90</sub>''' is evenly divisible by the composite number '''91''' (=7*13).
<div style=font-size:125%;font-weight:bold;padding-left:3em;>111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 / 91 = 1221001221001221001221001221001221001221001221001221001221001221001221001221001221001221</div>
;Task
* Find and show at least the first '''10 deceptive numbers'''; composite numbers '''n''' that evenly divide the repunit '''R<sub>n-1</sub>'''
;See also
;* [https://www.numbersaplenty.com/set/deceptive_number Numbers Aplenty - Deceptive numbers]
;* [[oeis:A000864|OEIS:A000864 - Deceptive nonprimes: composite numbers k that divide the repunit R_{k-1}]]
<br>