Calmo numbers: Difference between revisions

Content added Content deleted
(Tidied up task description.)
Line 1: Line 1:
{{draft task}}
<big>Definition</big>
Let n be a natural number. Let the real divisors of n be: d(1),d(2),d(3),...,d(k), where k is divisible by 3. Add the first three divisors, then the next three, and so on. If the partial sums are prime numbers, then n is called a Calmo number.
<big>Example</big>
n = 165
divisors = [3 5 11 15 33 55]
3 + 5 + 11 = 19 is prime number
15 + 33 + 55 = 103 is prime number
<big>Task</big>
let's find Calmo numbers under 1000.


;Definition
Let '''n''' be a natural number having '''k''' divisors (other than '''1''' and '''n''' itself) where '''k''' is exactly divisible by 3.

Add the first three eligible divisors, then the next three, and so on until the eligible divisors are exhausted. If the resulting partial sums are prime numbers, then '''n''' is called a Calmo number.

;Example
Consider n = 165.

It has 6 eligible divisors, namely [3 5 11 15 33 55].

The sum of the first three is: 3 + 5 + 11 = 19 which is a prime number.

The sum of the next three is: 15 + 33 + 55 = 103 which is also a prime number.

Hence n is a Calmo number.

;Task
Find and show here all Calmo numbers under 1000.
<br><br>


=={{header|ALGOL 68}}==
=={{header|ALGOL 68}}==