The document describes the Sieve of Eratosthenes, a simple algorithm for finding all prime numbers up to a given limit. It works by first listing out all consecutive integers from 2 to the limit, and initially marking all of them as prime. It then removes all multiples of the first number from the list, then all multiples of the next number in the list, and so on. When the process is complete, all numbers remaining marked as prime in the list are prime numbers.
38. The sieve of Eratosthenes leaves behind
the prime numbers. It can easily be modified to
leave behind different sequences of numbers
which are called lucky numbers.
39. A lucky number is a natural number in a
set which is generated by a “sieve" similar to
the Sieve of Eratosthenes that generates the
primes.
LUCKY NUMBERS
81. Given a positive integer S = S0 define a
sequence S1, S2, S3, …, Si+1, where S1 is the sum of
the squares of the digits of S0, S2 is the sum of the
squares of the digits of S1, and so on until Si+1 which
is the sum of the squares of the digits of Si. Then S is
a happy number if and only if there exists i such that
Si = 1.
HAPPY NUMBERS
82. Example:
19 is a happy number, as the associated sequence is:
S = S0 = 19
S1 = 12 + 92 = 82
S2= 82 + 22 = 68
S3 = 62 + 82 = 100
S4= 12 + 02 + 02 = 1
Note: If a number is happy, then all members of its sequence
are happy.
HAPPY NUMBERS
87. An amicable pair (m, n) consists of two
positive integers and for which the sum of proper
divisors of one number equals the other number.
Example:
Proper Divisors of 220:
1 + 2 + 4 + 5 + 11 + 20 + 22 + 44 + 55 + 110 = 284
Proper Divisors of 284:
1 + 2 + 4 + 71 + 142 = 220
amicable pair
88. An amicable pair constitutes an aliquot sequence
of period two.
Example:
The aliquot sequence of the amicable pair (220 , 284) is:
220, 284, 220, 284, 220, 284, … ,
amicable pair
89. The first few amicable pairs:
(220, 284), (1184, 1210), (2620, 2924), (5020, 5564) and
(6232, 6368)
amicable pair
90. amicable pair
If n is a positive integer such that, p = 3 · 2n - 1,
q = 3 · 2n+1 - 1, and r = 9 · 22n+1 - 1 are all prime, then
a = 2n+1(pq) and b = (2n+1·r) form an amicable pair.
91. amicable pair
Example: For n = 1
p = 3 · 2n – 1 = 3·21 – 1 = 5, which is a prime number.
q = 3 · 2n+1 – 1 = 3 · 21+1 – 1 = 11, which is a prime number.
r = 9 · 22n+1 – 1 = 9 · 22(1)+1 – 1 = 71, which is a prime number.
Then, a = 2n+1(pq) = 21+1 · 5 · 11 = 220 and b = (2n+1·r)
= 21+1 · 71 = 284 which forms the smallest pair of amicable
numbers.
92. amicable pair
k-tuplet of Amicable Numbers
The positive integers n1, n2, ..., nk form a k-tuplet
of amicable numbers if the sum of all the natural proper
divisors, of any one of them is equal to the sum of the
other k-1 numbers.
93. amicable pair
Example: The numbers 1,980, 2,016 and 2,556 constitute a
triplet of amicable numbers.
Sum of the Proper Divisors of 1,980:
1 + 2 + 3 + 4 + 5 + 6 + 9 + 10 + 11 + 12 + 15 + 18 + 20 + 22
+ 30 + 33 + 36 + 44 + 45 + 55 + 60 + 66 + 90 + 99 + 110 +
132 + 165 + 180 + 198 + 220 + 330 + 396 + 495 + 660 + 990
= 4,572, which is also the sum of 2,016 and 2,556.
94. amicable pair
Example: The numbers 1,980, 2,016 and 2,556 constitute a
triplet of amicable numbers.
Sum of the Proper Divisors of 2,016:
1 + 2 + 3 + 4 + 6 + 7 + 8 + 9 + 12 + 14 + 16 + 18 + 21+ 24
+ 28 + 32 + 36 + 42 + 48 + 56 + 63 + 72 + 84 + 96 + 112
+ 126 + 144 + 168 + 198 + 224 + 252 + 288 + 336 + 504
+ 672 + 1008
= 4,572, which is also the sum of 1,980 and 2,556.
95. amicable pair
Example: The numbers 1,980, 2,016 and 2,556 constitute a
triplet of amicable numbers.
Sum of the Proper Divisors of 2,556:
1 + 2 + 3 + 4 + 6 + 9 + 12 + 18 + 36 + 71 + 142 + 213 + 284
+ 426 + 639 + 852 + 1278
= 3,996, which is also the sum of 1,980 and 2,016.
96. 1. There is no amicable pair in which one of the two
numbers is a square.
2. There are some amicable pairs (m,n) in which the sum of
digits of m and n is equal.
For example, consider the amicable pair (69615, 87633),
Sum of digits of 69615 = 6+9+6+1+5 = 27
Sum of digits of 87633 = 8+7+6+3+3 = 27
97. 3. There are some amicable pairs (m,n) in which both m and n
are divisible by the sum of their respective digits.
Example: Consider the amicable pair (2620, 2924),
where 2620 is divisible by 2+6+2+0 = 10 (i.e. 2620/10 = 262)
and 2924 is divisible by 2+9+2+4 = 17 (i.e. 2924/17 = 172).
These pairs of amicable numbers are called Harshad Amicable
Numbers.
98. 4. There are some amicable pairs in which both m and n are
happy numbers.
Example: Consider the amicable pair (10572550, 10854650)
S = S0 = 10,572,550
S1 = 12 + 02 + 52 + 72 + 22
+ 52 + 52 + 02 = 129
S2= 12 + 22 + 92 = 86
S3 = 82 + 62 = 100
S4= 12 + 02 + 02 = 1
S = S0 = 10,854,650
S1 = 12 + 02 + 82 + 52 + 42
+ 62 + 52 + 02 = 16
S2= 12 + 62 + 72 = 86
S3 = 82 + 62 = 100
S4= 12 + 02 + 02 = 1
99. Sociable numbers are numbers whose aliquot sums form
a cyclic sequence that begins and ends with the same number.
These are numbers that result in an aliquot sequence of
period greater than 2.
Example:
1264460, 2115324, 2784580, 4938136, 7169104, 18048976,
18656380, ...
sociable numbers
101. The sum of the proper divisors of 1,727,636 (22 * 521 * 829) is:
1 + 2 + 4 + 521 + 829 + 1042 + 1658 + 2084 + 3316 + 431909
+ 863818 = 1,305,184
The sum of the proper divisors of 1,305,184 (25 * 40787) is:
1 + 2 + 4 + 8 + 16 + 32 + 40787 + 81574 + 163148 + 326296
+ 652592 = 1,264,460.
This shows us that 1,264,460 is a sociable number and its
aliquot sequence is 1264460, 1547860, 1727636, 1305184, 1264460
… and has a repeating period of length 4.
sociable numbers