Search Algorithms For Even Perfect Numbers And Amicable Pairs

by

Huen Y.K.

CAHRC, P.O.Box 1003, Singapore 911101
http://web.singnet.com.sg/~huens/
email: huens@mbox3.singnet.com.sg

(A short communication - 1st released: 30/12/97, revised 3/1/98)


Abstract

Experience has shown that sometimes unsolved problems are caused by the absence of suitable mathematical operators or functions which have yet to be defined. Mathematicians are most reluctant to introduce a new operator or function as this is like changing the football rules in the middle of a game. When one migrates from conventional algebra into sequence algebra, it is a big paradigm shift and it would be surprising if one does not encounter the need for new operators or functions. This is because numbers are now manipulated holistically as sequences rather than as individual variables. In sequence algebra, several inter-sequence and intra- sequence operations of both the arithmetic and logical kinds are found necessary. An example is that of the Normc-function which has already been defined and used [9]. A few new ones are defined in this paper and used in the developments of generating functions for even perfect numbers and for amicable pairs in composite number sequences.


1. Introduction

In sequence algebra, number sequences are described in closed algebraic expressions called generating functions. When these generating functions are series expanded, the terms can be either in power series form or in Laurent series form the choice of which is arbitrary and based on expedience. Many number theoretic problems involve filtering or extracting a new number sequence with specific properties such as the prime sequence or the Mersenne prime sequence or Fermat prime sequence and so on from the natural number sequence. Since sequence algebra is holistic, every number sequence can be viewed as a mapping transformation from the natural number sequence. These extractive operations put demands on new inter-sequence or intra-sequence operators or funcitons hitherto undefined but cannot be developed via existing operators or functions.

Number theorists are more preoccupied with prime numbers than composite numbers most probably because these are rare especially at the big end of the number axis. Considering that there is an overwhelming ratio of composite numbers to prime numbers the lack of interest on composite numbers seems strange. Amongst these rarities are two well known problems, that of Perfect numbers and Amicable Pairs. Both are composite number sequences. Even perfect number sequences are less of a problem since 2^(p-1) is always even and the product of 2^(p-1) and (2^p-1) must be even. Odd perfect numbers require much more stringent conditions and was predicted to have at least 300 decimal digits. The deterministic Mersenne prime sequence can be predicted in sequence algebra using mixed-mode generating functions which require the use of the Normc-function plus intra-sequence logical AND operation between the Mersenne number sequence and the prime sequence both of which are reduced to normalised forms. Thus the deterministic prediction of even perfect numbers is not a problem. Predicting the occurrences of amicable pairs does present an unusual problem since one does not know whether a chosen number will form an amicable pair. Therefore you only get an amicable pair if you have found both numbers. This is difficult using conventional algebra but a search algorithm is found in sequence algebra to be described in this paper.

Experience in sequence algebra is strongly indicative that the composite number sequence and the prime number sequence are different kettle of fish. The former can be predicted by a very compact closed form called the equation of divisibles [4,5,6] but the latter has to be derived by an indirect method via the difference between Nat(z) and Normc(Comp(z)). Athough both Prime(z) and Comp(z) have been successfully predicted deterministically in sequence algebra, the greater difficulty in deriving the latter probably shows that primeness is not an intrinsic number theoretic property when compared to compositeness as all primality tests are in fact tests for divisibility or compositeness. This might explain why no one has yet developed a deterministic primality test although the author has found that most primality tests are very good indeed. The author speculates that most probably a deterministic primality test as a shortcut will forever elude number theorists because sequence algebra has revealed that funamentals are heavily tilted in favour of the composite number sequence and not the prime sequence. In other words if one is asked to develop the generating function for Prime(z) from fundamentals, one does not even know where to begin.


2. New Operators And Functions Already Defined

This section summarises briefly some of the new operators and functions already adopted in sequence algebra. Any one of these can be dropped from the list if subsequently it is proved that it can be developed via the existing set of arithmetic operators and functions:

(i) Normc-Function

This function should now be familiar to frequent visitors and readers to this website. Recently, Normc-function has been successfully implemented using Macsyma 2.2 [9]. Sequence algebra is holistic and global number sequences are the variables manipulated within generating functions. If the output sequence of one generating function is fed into the next generating function, operations can only be successful if the input sequence is in a normalised form which means that all numerators coefficients must be reduced to unity values. This can be done using the Normc- function.

(ii) Inter-Sequence Arithemtic Operations

Many of these need not be defined as these already exist in conventional arithmetics. For example the outer product between two sequences, the addition and subtraction between two sequences are all conventional. However inter-sequence division is not always successful and is left undefined. The inner-product between two sequences of identical lengths is newly defined. Shown below are the comparisons between outer product and inner product of sequences.

Starting with two sequences A(z) and B(z) given in equations (1) and (2):

.....................................................2.........3.........4.......5
...............................A(z) := 1/z + ---- + ---- + ---- + ---- ..........................(1).
.......................................................2.........3.........4........5
.....................................................z.........z.........z.........z

....................................................4.........6........8.......10
...............................B(z) := 2/z + ---- + ---- + ---- + ---- ...........................(2).
.......................................................2........3........4........5
....................................................z.........z.........z........z

The outerproduct is given by A(z)*B(z) which is conventional as shown in equation (3) but the inner product needs to be defined since the numerators are term-by-term multiplied but the denominators are left unchanged as shown in equation (4).

...............................4.......16......40.......80.....140....176....184...160...100
Outerproduct(z) := ---- + ---- + ---- + ---- + --- ..+ --- .+ --- + --- + --- ..........(3).
.................................2.........3.......4.........5........6........7........8.......9......10
...............................z.........z........z.........z.........z........z.........z.......z........z

.................................................................8.......18.......32......50
..........................Innerproduct(z) := 2/z + ---- + ---- + ---- + ---- ............................(4).
...................................................................2........3.........4........5
.................................................................z.........z.........z.........z

Both the above two equations are unnormalised and if these are to be further processed as input variables in generating functions, Normc-funtion must be applied to them first.

(iii) Intra-Sequence Functions

Intra-sequences are concerned with operations on terms within individual sequences. Conventional intra-seqeunce operators do exist but are applied uniformly to all terms such as the changing of arithmetic signs of all terms in a sequence by -F(z). In fact the Normc-function is an intra-sequence function as it is applied to a single sequence. However there are some obvious operators which are not implemented in most symbolic softwares, e.g. Abs(F(z)) will not apply abs( ) uniformly to all terms without special programming. Neither are there functions which only operate on a subset of terms in a sequence leaving the remainders unaltered.

(a) The Reciprocator-Function

This function called Recip( ) is defined as follows:

......................................................2........3........4........5
...............................A(z) := 1/z + ---- + ---- + ---- + ---- ..............................(5).
........................................................2........3........4........5
......................................................z........z........z........z

.........................................................3...........4
......................Recip(z) := 2 z + 1/3 z + 1/4 z ..........................(6).

Recip(z) is obviously not equivalent to 1/A(z) which is a conventional operation.

(b) Numer( ) and Denom( )

These functions have already been implemented in Macsyma 2.2 [9].

Given a sequence A(z) such as in equation (5), this is split into a numerator list and a denominator list using the NUmer- and Denom-function. Such operations are required if one wishes to compare term by term the values of the numerator coefficients with the values of the denominator power indices using either inter-sequence arithmetic or logical operators.

Numer(A(z)) = [ 1,2,3,4,5 ] where the elements in the list are derived from the numerator coefficients.

Denom(A(z)) = [ 1,2,3,4,5 ] where the elements in the list are derived from the power indices of the order variables z in the denominators of the terms.

In the next section, some of these new operators/functions will be used to develop search algorithms for Perfect numbers and Amicable Pairs. The former is relatively easy but in the latter, one must identify pairs from the composite number sequence. This is already possible visually but we wish to develop an algebraic algorithm to do this operation.

3. Generating Function For Perfect Numbers

Definition: A positive integer n is called a perfect number if it is equal to the sum of all of its positive divisors, excluding n itself [1,3]

We are interesting in precision grade of perfect number using a deterministic formulation developed from the equation of divisibles as shown in equation (8). Note that the lower bound of i starts from 1 instead of 2 because 1 in included as one of the divisors.

Perfectnumb(z) := series(sum( i/(z^i*(z^i-1)),i=1..ub),z=infinity, ub); ...............(8).

where ub is an integer upperbound. Notice that Perfectnumb(z) has the same form as Comp(z) with the exception that there is a variable i in the numerator. We test a finite expansion with the above expression:

Perfectnumb(z):=sort(series(sum(i/(z^i*(z^i-1)),i=1..500),z=infinity,500)); ..................(9).

Three Perfect numbers are shown in bold.

..................................1..........1.........1.......3........1.......6.........1.........7.......4........8......1.......16
Perfectnumb(z) := O(----) + ---- + ---- + ---- + ---- + ---- + ---- + ---- + ---- + --- + --- + ---
....................................500.......2........3.......4.........5.......6.........7........8.......9......10.....11.....12
...................................z..........z.........z.......z..........z.......z.........z.........z........z.......z........z........z

...........1.....10......9.....15......1.....21......1......22.....11.....14.....1.....36.....6.......16.....13.....28
......+ --- + --- + --- + --- + --- + --- + --- + --- + --- + --- + --- + --- + --- + --- + --- + ---
............13...14.....15....16......17....18......19....20......21.....22....23......24.....25.....26....27....28
...........z......z.......z......z.........z......z.........z.....z.......z........z.......z.......z.......z.......z.......z......z

...............................................................................................................496
......+ ............................................................................................... + ------
................................................................................................................496
..............................................................................................................z

.....................................1
......+ ...................O(-------)
.......................................500 ............................................................................(10).
.....................................z

It is obvious that equation (10) does not discriminate between perfect and imperfect numbers and thus cannot be considered as an explicit formulation for the formers. However this equation gives the visual clue that the search algorithm must compare the numerator coefficient with power index to the denominator order variable within individual terms. All that is needed is to subtract correspondingly ordered elements from these two lists and only display those which satisfy the above criterion. For example the first perfect number is from 6/z^6 and we test the difference using Macsyma's zerop function which will return true if the difference is zero. We suppress displays of those which are nonzero using the filter expression given by equation (11) assuming xnum and xdenom are the two lists formed.

Perf_z:ratdisrep(taylor(sum(i/(z^i*(z^i-1)),i,1,500),z,inf,500));
xnum:reverse(makelist(coeff(Perf_z,z,i),i,lopow(Perf_z,z),0));

xnum: [0, 0, 1, 1, 3, 1, 6, 1, 7, 4, 8, 1, 16, 1, 10, 9, 15, 1, 21, 1, 22, 11, 14, 1, 36, 6, 16, 13, 28, 1, 42, 1, 31, 15, 20, 13, 55, 1, 22, 17, 50, 1, 54, 1, 40, 33, 26, 1, 76, 8, 43, 21, 46, 1, 66, 17, 64, 23, 32, 1, 108, 1, 34, 41, 63, 19, 78, 1, 58, 27, 74, 1, 123, 1, 40, 49, 64, 19, 90, 1, 106, 40, 44, 1, 140, 23, 46, 33, 92, 1, 144, 21, 76, 35, 50, 25, 156, 1, 73, 57, 117, 1, 114, 1, 106, 87, 56, 1, 172, 1, 106, 41, 136, 1, 126, 29, 94, 65, 62, 25, 240, 12, 64, 45, 100, 31, 186, 1, 127, 47, 122, 1, 204, 27, 70, 105, 134, 1, 150, 1, 196, 51, 74, 25, 259, 35, 76, 81, 118, 1, 222, 1, 148, 81, 134, 37, 236, 1, 82, 57, 218, 31, 201, 1, 130, 123, 86, 1, 312, 14, 154, 89, 136, 1, 186, 73, 196, 63, 92, 1, 366, 1, 154, 65, 176, 43, 198, 29, 148, 131, 170, 1, 316, 1, 100, 141, 203, 1, 270, 1, 265, 71, 104, 37, 300, 47, 106, 105, 226, 31, 366, 1, 166, 75, 110, 49, 384, 39, 112, 77, 284, 31, 234, 1, 280, 178, 116, 1, 332, 1, 202, 153, 218, 1, 312, 53, 184, 83, 194, 1, 504, 1, 157, 121, 190, 97, 258, 33, 232, 87, 218, 1, 476, 35, 130, 177, 255, 1, 270, 45, 328, 129, 134, 1, 456, 59, 214, 93, 208, 1, 450, 1, 286, 175, 140, 97, 396, 1, 142, 137, 440, 1, 294, 1, 220, 195, 218, 49, 531, 18, 250, 101, 226, 1, 390, 65, 274, 183, 152, 37, 568, 51, 154, 105, 316, 67, 396, 1, 364, 107, 266, 1, 528, 1, 160, 309, 244, 1, 330, 41, 442, 111, 254, 37, 523, 109, 166, 113, 302, 55, 534, 1, 256, 161, 170, 73, 656, 1, 211, 117, 416, 43, 438, 57, 316, 231, 176, 1, 492, 1, 394, 209, 404, 1, 366, 77, 274, 219, 182, 1, 810, 20, 184, 169, 420, 79, 378, 1, 376, 177, 314, 61, 524, 1, 274, 249, 344, 43, 582, 1, 460, 131, 194, 1, 636, 191, 196, 185, 298, 1, 618, 41, 463, 135, 200, 85, 696, 1, 202, 241, 561, 1, 414, 45, 310, 321, 314, 49, 672, 1, 346, 141, 316, 67, 522, 89, 466, 143, 302, 1, 924, 1, 214, 201, 386, 133, 438, 69, 328, 243, 362, 1, 808, 1, 334, 285, 334, 43, 450, 1, 640, 300, 314, 1, 620, 95, 226, 153, 568, 1, 759, 53, 346, 155, 230, 217, 744, 1, 232, 261, 548, 1, 690, 1, 466, 303, 236, 1, 806, 75, 394, 161, 428, 55, 486, 145, 532, 225, 242, 1, 1032, 51, 244, 285, 447, 103, 606, 1, 442, 167, 536, 1, 684, 47, 346, 441, 496, 79, 510, 1, 592].................(11).

Nat_z:sum(i/z^i,i,2,500);
xdenom:reverse(makelist(coeff(Nat_z,z,i),i,lopow(Nat_z,z),0));

xdenom:[0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500]..............................(12).

makelist((zerop(pop(xnum)-pop(xdenom))-false)/(true-false)/z^(i-1),i,1,length(xnum));

[1, (1/z), 0, 0, 0, 0, (1/(z^6)), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (1/(z^28)), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (1/(z^496)), 0, 0, 0, 0]....................................(13).

Temp_z:apply("+",%);

(1/z) + (1/(z^6)) + (1/(z^28)) + (1/(z^496)) + 1.......................(14).

Perf_z:Temp_z-1-1/z

Fudging by subtracting 1 and 1/z from the output is required because 0 and 1 are not conventionally defined as perfect numbers.

(1/(z^6)) + (1/(z^28)) + (1/(z^496)).....................................(15).



4. Search Algorithm For Amicable Pairs [2]

Definition: An amicable pair is a pair of numbers each of which equals the sum of the other's proper divisors; the members of amicable pairs are also called amicables.

The smallest amicable pair is a (220, 284). It is interesting to note that expansions of Perfectnumb(z) also include amicables.

...................................1.........1........1........3........1........6.........1.......7..........4.......8.......1.......16
Perfectnumb(z) := O(----) + ---- + ---- + ---- + ---- + ---- + ---- + ---- + ---- + --- + --- + ---
...................................500......2........3........4.........5........6..........7........8..........9......10.....11.....12
..................................z..........z..........z........z.........z.......z...........z..........z...........z.......z.......z......z

...........1.......166.....75......110......49.....384.....39....112.....77......284.....31.....234......1
......+ ---- + ---- + ---- + ---- + ---- + ---- + ---- + ---- + ---- + ---- + ---- + ---- + ----
............211....212....213.....214.....215.....216....217.....218.....219....220....221.....222....223
...........z........z........z.........z...........z........z.........z........z............z........z.........z........z........z

......+ ................................................................................................................+.......

.........396........1.....142....137.....440......1......294.....1......220....195....218......49.......531
......+ ---- + ---- + ---- + ---- + ---- + ---- + ---- + ---- + ---- + ---- + ---- + ---- + ----
............276....277....278....279....280....281....282....283....284.....285.....286.....287.....288
...........z.........z........z.........z........z........z........z..........z.........z.........z...........z........z........z

.................79.........510...........1
........+ -------- + -------- + -------- ............................................................................(16).
...................497........498........499
..................z............z.............z

In equation (16), we have visual clues on how to detect amicable pairs but it is difficult to devise an algorithm to detect amicable pairs at indeterminate distances apart. Just as in perfect numbers, we form the numerator and denominator lists but this time we form the inner product from them. Only amicable pairs will return identical inner product terms and the resultant list is sorted in ascending order so that amicable pairs appear side by side. Once confirmed, one can go back to the original sequence to look for the actual pairs. The algorithm is more complicated than that for perfect numbers for obvious reasons. For page economy, we only give an outline here leaving it for detailed development by interested readers. It is quite possible that you may find a more efficient method than the one described by the author. The procedures are outlined as follows:

From equation (16), we form the numerator list called xnum and the denominator list called xdenom just like the way we did it for perfect numbers (see equations (11) and (12)).

We take the inner product of the two lists called xnum and xdenom which gives the resultant list as shown in equation (17):

Inner_prod:sort(inner_z:makelist(xnum[i]*xdenom[i],i,1,length(xnum)));

[0, 0, 2, 3, 5, 7, 11, 12, 13, 17, 19, 23, 29, 31, 36, 36, 37, 41, 43, 47, 53, 56, 59, 61, 67, 71, 73, 79, 80, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 135, 137, 139, 140, 149, 150, 151, 157, 163, 167, 173, 179, 181, 191, 192, 193, 197, 199, 211, 223, 227, 229, 231, 233, 239, 240, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 308, 311, 313, 317, 331, 337, 347, 349, 351, 353, 359, 367, 373, 378, 379, 383, 389, 392, 397, 401, 409, 416, 419, 421, 431, 433, 439, 440, 443, 449, 455, 457, 461, 463, 467, 479, 487, 491, 495, 499, 663, 680, 784, 836, 864, 935, 992, 1071, 1196, 1235, 1260, 1311, 1452, 1463, 1485, 1760, 1856, 1863, 1911, 1955, 1980, 2000, 2108, 2150, 2268, 2366, 2375, 2392, 2583, 2871, 2960, 2975, 3240, 3255, 3335, 3564, 3575, 3584, 3591, 3608, 3648, 3675, 3875, 3944, 3956, 4032, 4551, 4700, 4864, 4991, 5075, 5148, 5180, 5202, 5423, 5535, 5643, 5735, 5936, 6063, 6479, 6480, 6851, 6992, 7020, 7154, 7191, 7220, 7316, 7511, 7605, 7808, 7955, 8096, 8151, 8463, 8480, 8855, 8856, 9063, 9135, 9380, 9635, 10508, 10535, 10904, 11024, 11063, 11096, 11151, 11628, 11655, 11660, 11700, 11760, 11895, 11907, 11951, 12393, 12400, 12455, 12775, 12956, 12960, 13079, 14063, 14175, 14271, 14276, 14364, 14663, 14976, 15219, 15232, 15351, 15635, 15860, 15975, 16031, 16211, 16256, 16376, 16863, 17464, 18095, 18135, 18224, 18576, 18791, 19175, 19400, 19551, 19671, 19943, 20295, 20435, 20636, 20700, 21008, 21320, 21663, 21735, 21836, 22496, 22631, 23171, 23392, 23436, 23540, 23765, 23903, 24416, 24455, 24531, 24759, 24831, 26015, 26180, 26216, 26675, 26928, 27335, 27440, 27495, 27671, 27824, 28028, 28800, 28835, 29391, 29403, 29463, 31815, 32300, 32364, 32384, 32562, 33020, 33063, 33300, 33575, 33669, 34496, 34880, 35108, 35175, 35192, 35343, 35425, 35631, 36816, 36828, 36935, 36951, 37296, 37994, 38223, 38360, 39263, 39476, 39663, 39788, 40050, 42275, 43424, 45135, 45296, 46172, 46360, 46460, 46508, 47008, 47775, 49911, 49955, 50240, 50576, 51948, 52416, 53000, 53055, 53460, 53613, 54116, 54351, 54500, 55575, 55744, 56525, 56780, 56924, 57536, 57951, 59631, 60672, 60896, 61200, 61347, 62348, 62480, 62480, 62720, 63468, 65156, 65280, 65313, 65880, 65992, 66608, 68391, 68875, 69660, 70215, 71318, 71595, 72500, 73008, 73359, 73535, 74108, 75656, 75696, 75831, 76860, 77104, 77792, 78183, 78800, 79695, 80396, 81104, 81663, 81788, 82460, 82908, 82944, 84992, 85023, 85280, 90308, 93375, 96064, 96159, 97335, 97544, 98735, 99056, 100796, 102476, 104247, 104420, 104940, 106256, 107325, 108704, 109296, 109976, 112112, 114660, 115624, 115676, 116180, 117608, 119799, 119952, 120384, 120960, 121176, 121500, 123200, 123975, 125240, 126236, 127484, 129344, 129564, 130005, 130192, 132300, 137655, 137900, 138348, 138368, 138788, 140384, 140895, 141440, 141440, 141860, 142208, 144956, 145624, 149796, 152880, 152928, 155660, 156392, 163664, 164736, 166428, 169452, 170400, 170924, 171216, 174800, 176220, 181496, 185180, 186588, 193856, 194928, 197100, 202016, 215696, 216108, 216224, 216348, 218295, 219996, 220416, 224400, 230364, 241020, 244224, 246016, 252080, 253232, 253980, 254464, 262640, 274176, 275280, 275616, 281600, 291600, 294516, 296000, 318780, 336528, 339264, 341550, 349056, 377208, 388080, 495360]..................................(17).

From equation (17), the identical inner products of the amicable pair (220,284) have been brought side by side by sorting in ascending orders. If one simply pops a pair of numbers from the above list, one may miss detecting identical pairs as these may be separated by the two pop sequence. The reason is that you can only pop an integer once from the stack for each integer from the list. To avoid this, you must assign the two popped integers to temporary variables like var1 and var2. In the next pop, the original integer in var2 is shifted to var1 and the newly popped integer is assigned to var2. Comparisons can be made using zerop function which will return true if var1=var2 if an amicable pair occurs. Then you could revert back to the original sequence to find the actual amicable pairs. The procedures are more complicated but could be completed using some of the newly defined functions described in section 2.



5. Conclusions

This paper shows how even perfect numbers and amicable pairs can be detected using search algorithms developed in sequence algebra and solved by a symbolic software called Macsyma 2.2. It is revealed that the search algorithm for amicable pairs is far more complicated than for perfect numbers although both are deterministic. Probabilistic perfect numbers can be found very efficiently using primality filters but not amicable numbers. The algorithms described here are not the most efficient because of the wedge-shape structure of the equation of divisibles where the number of computations increases as the square of the upperbound i of the integer range. However, all generating functions are developed from fundamentals which give insight on the difficulties associated with deterministic algorithms. In sequence algebra, composite sequences are easier to predict than prime sequences. This seems to hold true even in conventional number theory. It seems that we have to pay for devising fast shortcuts in number theory. There is a chasm between determinancy and probability.

6. References

Comments: Not all references in this list are directly referred in the main paper. Most are provided for readers not familiar with sequence algebra. These papers can be easily hyperlinked whilst you are in the web. Most html files are quite short and can be download quite fast with the exception of those published in journals.

1. Burton M. Burton: Elementary Number Theory, Third Edition, WCB publishers, 1994, 17 to 48 to 50.

2. Meows David : Perfect, amicable and socialble numbers

3. Chris K. Caldwell : GIMPS Homepage

4. Huen Y.K.: A Matrix Map for Prime and Non-prime Numbers, INT. J. Math. Educ. Sci. Technol., 1994, VOL. 25, NO.6, pp 913-920.

5. Huen Y.K.: Some Interesing Properties Of The Natural Number System, Int. J. Math. Educ. Sci. Technol., 1996, VOL.27, NO. 5, 685-691.

6. Huen Y.K.: Visual algebra and its applications, INT. J. Math. Educ. Sci. Technol.,1996, VOL.??, NO.?, ???-??? (In the press as proof paper mes 100421).

7. The twin prime problem revisited, INT.J.MATH.EDUC.SCI.TECHNOL.,199?,VOL.??, NO.?,???-???, proof paper mes-0488 (10 pages).


8. Is Pie Periodic?, INT.J.MATH.EDUC.SCI.TECHNOL.,199?,VOL.??,NO.?,???-???, (in the press).

================================================

9. Evaluations Of Normc( ) Function In Macsyma 2.2 - Huen Y.K. (Date Released 17/12/97, 14 Kbytes)

================================================

10. List Processing In Sequence Algebra - Huen Y.K. (Date Released 23/12/97, 20 Kbytes)

================================================

11. A Simple Introduction To Sequence Algebra - by Huen Y.K. (date release: 15.3.97) (38 KBytes, 11*A4 pages).

========================================================

12. The Canonical Generating Function or CGF(z) ... - by Huen Y.K. (date released : 27.5..97) (24 KBytes, 7*A4s).

========================================================

13. Visual Solutions Of Number Theoretic Problems ..... - by Huen Y.K. (date released : 3.6.97) (38.3 KBytes, 10*A4s).

========================================================

14. Final Value Theorem Applied To Number Sequences... - by Huen Y.K. (date released : 5.6.97) (29.4 KBytes, 9*A4s).

========================================================

15. Unsolved Problems In Sequence Algebra - by Huen Y.K. (date released : 6.6.97) (29.4 KBytes, 9*A4s).

========================================================

16. Methods Of Developing Sequence Algebraic Formulations For Comp(z) and Prime(z) - by Huen Y.K. (date released : 20.6.97) (36.8 KBytes, 10*A4s).

========================================================

17. Composite Number Sequence Challenge 1/97 - by Huen Y.K. (date released : 28.6.97) (24.8 KBytes, 7*A4s).

========================================================

18. Lemmata, Corollaries, And Theorems In Sequence Order Analysis. - by Huen Y.K. (date released : 6.7.97) (38.3 KBytes, 12*A4s).

========================================================

19. Improved Formulations For Comp(z) and Prime(z) - by Huen Y.K. (date released : 16.9.97) (17 KBytes ).

========================================================

20. Detecting False Reports in Primality Tests By The Oddcomp(z) Method. - by Huen Y.K. (date released : 18.9.97, Revised 20/9) (26 KBytes ).

========================================================

21. The Throwing Power Of Oddcomp(z). - by Huen Y.K. (date released : 24.9.97 ) (15 Kbytes).

========================================================

22. Sequence Algebraic Approach To Prime Number Theorem - by Huen Y.K. (date released : 28.9.97 ) (21 Kbytes).

========================================================

23. Generating Functions - Closed Forms vs Open Forms - by Huen Y.K. (date released : 1.10.97 ) (21 Kbytes).

========================================================

24. Generating Large Odd Composite With Two Prime Factors - by Huen Y.K. (date released : 3.10.97 ) (13.5 Kbytes).

========================================================

25. In Search Of Counter- Examples In Maple's Isprime Function. - by Huen Y.K. (date released : 4.10.97 ) (18 Kbytes).

========================================================

26. A Sequence Algebraist's View Of Lehmann's Primality Test - by Huen Y.K. (date released : 6.10.97 ) (26 Kbytes).

========================================================

27. On Odd(z), Oddcomp(z), Seq1(z) and Seq2(z) - by Huen Y.K. (date released : 10.10.97 ) (17 Kbytes).

========================================================

28. How To Generate A Short And Contiguous Oddcomp(z) Sequence? - by Huen Y.K. (date released : 15.10.97 ) (13 Kbytes).

========================================================

(29) A Sketch Of Test-Tube Evolution In A Primeval Number Soup - by Huen Y.K. (date released : 25.11.97) (paper35.htm 1 K).

========================================================

(30) In Search Of Primes From The XGS Sequence - by Huen Y.K. (date released : 8.12..97) (paper38.htm 23 K).

=====================END OF PAPER ======================