RosettaCodeData/Task/Untouchable-numbers/00-TASK.txt
2023-07-01 13:44:08 -04:00

61 lines
3.6 KiB
Text

;Definitions:
:*   ''Untouchable numbers''   are also known as   ''nonaliquot numbers''.
:* &nbsp; An &nbsp; untouchable number &nbsp; is a positive integer that <u>cannot</u> be expressed as the sum of all the proper divisors of any positive integer. &nbsp; <small>(From Wikipedia)</small>
:* &nbsp; The &nbsp; ''sum of all the proper divisors'' &nbsp; is also known as &nbsp; the &nbsp; ''aliquot sum''.
:* &nbsp; An &nbsp; untouchable &nbsp; are those numbers that are not in the image of the aliquot sum function. &nbsp; <small>(From Wikipedia)</small>
:* &nbsp; Untouchable numbers: &nbsp; impossible values for the sum of all aliquot parts function. &nbsp; <small>(From OEIS: &nbsp; The On-line Encyclopedia of Integer Sequences&reg;)</small>
:* &nbsp; An untouchable number is a positive integer that is not the sum of the proper divisors of any number. &nbsp; <small>(From MathWorld&trade;)</small>
;Observations and conjectures:
All untouchable numbers &nbsp; <big>&gt;</big>&nbsp; '''5'''&nbsp; are composite numbers.
No untouchable number is perfect.
No untouchable number is sociable.
No untouchable number is a Mersenne prime.
No untouchable number is &nbsp; one more &nbsp; than a prime number, &nbsp; since if &nbsp; '''p''' &nbsp; is prime, &nbsp; then
the sum of the proper divisors of &nbsp; '''p<sup>2</sup>''' &nbsp; is&nbsp;&nbsp;'''p&nbsp;+&nbsp;1'''.
No untouchable number is &nbsp; three more &nbsp; than an odd prime number, &nbsp; since if &nbsp; '''p''' &nbsp; is an odd prime, &nbsp; then the
sum of the proper divisors of &nbsp; '''2p''' &nbsp; is&nbsp;&nbsp;'''p&nbsp;+&nbsp;3'''.
The number &nbsp;'''5'''&nbsp; is believed to be the only odd untouchable number, &nbsp; but this has not been proven: &nbsp; it would follow from a
slightly stronger version of the &nbsp; [https://en.wikipedia.org/wiki/Goldbach%27s_conjecture Goldbach's&nbsp;conjecture], &nbsp; since the sum of the
proper divisors of &nbsp; '''pq''' &nbsp; (with &nbsp; '''p''', '''q''' &nbsp; being
distinct primes) &nbsp; is&nbsp;&nbsp; '''1&nbsp;+&nbsp;p&nbsp;+&nbsp;q'''.
There are infinitely many untouchable numbers, &nbsp; a fact that was proven
by &nbsp; [https://en.wikipedia.org/wiki/Paul_Erd%C5%91s Paul Erdős].
According to Chen & Zhao, &nbsp; their natural density is at least &nbsp; '''d > 0.06'''.
;Task:
:* &nbsp; show &nbsp;(in a grid format)&nbsp; all untouchable numbers &nbsp;≤&nbsp; 2,000.
:* &nbsp; show (for the above) &nbsp; the &nbsp; ''count'' &nbsp; of untouchable numbers.
:* &nbsp; show the &nbsp; ''count'' &nbsp; of untouchable numbers from unity up to &nbsp; (inclusive):
::::* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10
::::* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100
::::* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1,000
::::* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10,000
::::* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100,000
::::* &nbsp; ... or as high as is you think is practical.
:* &nbsp; all output is to be shown here, on this page.
;See also:
:* &nbsp; Wolfram MathWorld: &nbsp; [https://mathworld.wolfram.com/UntouchableNumber.html untouchable number].
:* &nbsp; OEIS: &nbsp; [https://oeis.org/A005114 A005114 untouchable numbers].
:* &nbsp; OEIS: &nbsp; [https://oeis.org/A005114/b005114.txt a list of all untouchable numbers below 100,000 &nbsp; (inclusive)].
:* &nbsp; Wikipedia: [https://en.wikipedia.org/wiki/Untouchable_number untouchable number].
:* &nbsp; Wikipedia: [https://en.wikipedia.org/wiki/Goldbach%27s_conjecture Goldbach's conjecture].
<br><br>