
Exercises and problems in Informatics October 2003 
I. 58. A sequence a_{1}, a_{2}, ..., a_{n} of positive integers each having at most N digits is called an aliquot sequence of N digits, if the sum of positive proper divisors (i.e. including 1 but excluding the number itself) of a_{i} is a_{i+1} (i=1,2,...,n1) and that of a_{n} is a_{1}. Members of an aliquot sequence are called sociable numbers. (Thus, the aliquot sequences of length 1 are just the perfect numbers, and aliquot sequences of length 2 are the usual amicable pairs.)
Your program (i58.pas, ...) should read the value of N (1\(\displaystyle \le\)N \(\displaystyle \le\)8), compute every sociable numbers of N digits for which the smallest element is in the interval [A,B], then write the output into the text file ``i58.out''.
The file containing the output corresponding to parameter values N=7, A=2, B=9 999 999 should be submitted.
Examples. Sociable numbers of 3 digits with the smallest element in the interval [200,230] form the wellknown amicable pair 220284.
Sociable numbers of 5 digits with the smallest element in the interval [10000,13000] include 1074410856, 1228514595, 1249614288154721453614264.
(10 points)
I. 59. A regular star polygon with N vertices is obtained by connecting every vertex of a regular Ngon with both of its K^{th} neighbours.
Write a program (i59.pas, ...) which reads the value of N (5\(\displaystyle \le\)N \(\displaystyle \le\)100), then displays all distinct regular star polygons with N vertices.
The example shows all 4 distinct regular star polygons with 11 vertices.
(10 points)
I. 60. Similarly to the concept of highly composite numbers (see Problem I. 55. in the September 2003 issue), we say that a positive integer n \(\displaystyle \in\)[A,B] is highly composite with respect to the interval [A,B], if the number of divisors of n is greater than or equal to that of any positive integers in the interval [A,B] below n.
Prepare your sheet (i60.xls) which  if A and B (1\(\displaystyle \le\)A\(\displaystyle \le\)B\(\displaystyle \le\)1000) are given  displays all numbers in the interval [A,B] highlighting with red all highly composite numbers with respect to that interval.
In the example italic letters show the red highlighting.
A=10  B=25 
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
(10 points)
Send your solutions to the following email address:
Deadline: 13 November 2003
