Aliquot Sequence Program

  четверг 09 апреля
      83

Given a number n, the task is to print its Aliquot Sequence. Aliquot Sequence of a number starts with itself, remaining terms of the sequence are sum of proper divisors of immediate previous term. For example, Aliquot Sequence for 10 is 10, 8, 7, 1, 0. The sequence may repeat. For example, for 6, we have an infinite sequence of all 6s. In such cases we print the repeating number and stop.Examples:Input: n = 10Output: 10 8 7 1 0Sum of proper divisors of 10 is 5 + 2 + 1 = 8.Sum of proper divisors of 8 is 4 + 2 + 1 = 7.Sum of proper divisors of 7 is 1Sum of proper divisors of 1 is 0Note that there is no proper divisor of 1.Input: n = 6Output: 6Repeats with 6Input: n = 12Output: 12 16 15 9 4 3 1 0. Important Points:.

Numbers which have repeating Aliquot sequence of length 1 are called. For example 6, sum of its proper divisors is 6. Numbers which have repeating Aliquot sequence of length 2 are called. For example 220 is a Amicable Number.

EASEUS Partition Master 14 Crack is an ALL-IN-ONE PC & Server disk management toolkit for IT professionals, system administrators, technicians, and consultants to provide specialized service. Restorer ultimate crack keygen download for mac. Both advanced and basic Partition operations may be accomplished via this Partition software.

At present time, the aliquot sequences starting in a number under 10000, and whose. Program or KASH program that allow to compute an aliquot sequence.

Numbers which have repeating Aliquot sequence of length 3 are called. It is conjectured that every aliquot sequence ends in one of the following ways. with a prime number which in turn ends with 1 and then 0. a perfect number. a set of amicable or sociable numbers. The solution mainly lies in the calculation of sum of all the proper divisors of the previous term. If we observe carefully, the divisors of the number n are present in pairs.

For example if n = 100, then all the pairs of divisors are: (1,100), (2,50), (4,25), (5,20), (10,10). Using this fact efficiently compute divisors. While checking divisors we will have to be careful if there are two equal divisors as in case of (10, 10). In such case we will take only one of them in calculation of sum. This sum will contain sum of all the possible divisors so we have to subtract the number n from the sum of all divisors to get the sum of proper divisors.We can generate the sequence by first printing the number n and then calculating the next terms using sum of proper divisors. When we compute next term, we check if we have already seen this term or not. If the term appears again, we have repeating sequence.

We print the same and break the loop.

Example

In number theory, the s(n) of a positive integer n is the sum of all proper divisors of n, that is, all divisors of n other than n itself.They are defined by the sums of their aliquot divisors. The aliquot divisors of a number are all of its divisors except the number itself. The aliquot sum is the sum of the aliquot divisors so, for example, the aliquot divisors of 12 are 1, 2, 3, 4, and 6 and it’s aliquot sum is 16.A number whose aliquot sum equals its value is a PERFECT number (6 for example).