-------------------------------------------
I have proved that any remaining pairs of complemetnary squares must be
11-complementary and that they must have a number of digits which is a
power of 2. Furthermore, I have checked and there do not exist any with up
to 256 digits. 512 and 1024 i intend to check this weekend, as I travel
from US to UK. Hopefully I will email full details by friday. My guess is
that there are only finitely many such, and quite probably just the ones
found.
Luke Pebody
Theorem: If x_1,x_2 are d-complementary squares with n digits, either:
(1) n=1 and d is in 2,5,8,10,13,18
(2) n=3 and d is 6
(3) n is a power of 2 with n>2 and d is 11
Proof:
Note 1: If x_1,x_2 are d-complementary squares with n digits, then
9x_1+9x_2 = d*(10^n-1) is the sum of two squares.
Note 2: If n is an integer and p is a prime, then v(p,n) (the p-valuation
of n) is the largest k such that p^k is a factor of n
Note 3: A number n is the sum of two squares precisely if v(p,n) is even
for all primes p such that 4|p+1
Theorem 1: For all primes p>3, there exists a prime p' with p'>p, p'>11
and 4|p'+1 such that v(p',10^p-1) is odd.
Proof:
10^p-1 is equivalent to 3 modulo 4 and therefore is not the sum of two
squares. Therefore, by note 3, there exists a prime p' with 4|p'+1
such that v(p',10^p-1) is odd.
Note that v(3,10^k-1)=2+v(3,k). Therefore, since p is a prime greater
than 3, v(3,10^p-1)=2 and p'>3.
Note also that v(p',10^p-1) being odd means that p' is a factor of
10^p-1. Note that the integers k such that p' is a factor of 10^k-1 are
precisely the multiples of the smallest such. Therefore the smallest such
must be p (as p'>3 and so p' is not a factor of 10^1-1). However, p' is a
factor of 10^(p'-1)-1, and so p is a factor of p'-1, and hence p'>p.
Furthermore, p>=5 and p'-1>=2p, so p'>=11, with equality only if p=5.
However, in this case p' is not a factor of 10^p-1, and hence p'>11.
Corollary 2: If d*(10^n-1) is the sum of two squares with 2<=d<=18
then n can only have 2 or 3 as prime factors.
PROOF
Suppose otherwise, let p be the largest prime factor. Then by theorem 1,
there exists p' with p'>p, p'>11 and 4|p'+1 such that v(p',10^p-1) is
odd, say it is equal to 2k+1.
Well n=pq, where all of q's prime factors are at most p and therefore
less than p'.
Then 10^p=1+(p'^(2k+1))a, where a is not divisble by p'.
Then 10^n-1=(10^pq-1)=(1+(p'^(2k+1))a)^q-1=p'(2k+1)qa + p'(4k+2)b, for
some integer b. Therefore v(p',10^n-1) is odd. Note that p' is a prime
with 4|p'+1 and p'>11. Therefore p'>18 and v(p',d)=0. Therefore
v(p',d*(10^n-1)) is odd, and d*(10^n-1) is not the sum of two squares.
Theorem 3: If d*(10^n-1) is the sum of two squares with 2<=d<=18 and n
divisible by 3 then n=3.
I: n is not divisible by 9.
(10^9-1)=333667*2997 and 333667 is prime. Therefore if n is divisble by
9, since dn is not divisible by 333667, the 333667-valuation of
d(10^n-1) will be odd.
Finally, since 4|1+333667, d(10^n-1) will not be the sum of two squares
II: n=3.
Otherwise, n=3*2^k with k>=1
Then (10^n-1)=(10^6-1)*(10^6+1)*(10^12+1)*...*(10^(n/2)+1).
Since 10^6+1, 10^12+1 and so on are all sums of two squares, d(10^n-1)
is the sum of two squares iff d(10^6-1) is. However
d(10^6-1)=d*(3*7*11)*(48^2+45^2). Therefore, d(10^6-1) is the sum of two
squares if d*3*7*11 is. However, such a d would have to be divisible by
3,7 and 11 and this is impossible.
PROOF OF THEOREM
From Theorem 3, either n=3 or n is a power of 2.
The cases n=1,n=3 can be done by hand, producing the sets
<1,1>,<1,4>,<4,4>,<1,9>,<4,9>,<9,9> and <225,441>.
Now if n=2^k, d*(10^n-1)=d*11*9*(10^2+1)*(10^4+1)*...*(10^(n/2)+1).
All of the multiplicative terms are sums of two squares except for d*11.
Therefore d must be a multiple of 11, and within the range [2,18].
Therefore d=11.
QED.
OPEN QUESTION: ARE THERE ANY CASES WITH d=11 AND n!=8?
If so, n>=1024.
Argument to follow that probability is very unlikely.
Luke T. Pebody
--------------------------------------------------
So far I have only found one larger pair of triangular numbers that are
9-complementary:
457758153 = tri(30257)
542241846 = tri(32931)
I need to check my work again, but it is my belief that such pairs do not
exist for 7- & 8-digit numbers. I will continue searching.
Alan Lemm
----------------------------------
The following pairs of triangular numbers are 9-complementary:
457,758,153 and 542,241,846
35,579,781,903 and 64,420,218,096
480,536,688,996 and 519,463,311,003
1,902,197,722,943,871 and 8,097,802,277,056,128
132,920,356,200,296,028 --- 867,079,643,799,703,971
43,302,144,975,971,310,528 --- 56,697,855,024,028,689,471
1,528,953,191,073,919,374,753 --- 8,471,046,808,926,080,625,246
1,773,658,337,462,376,872,871 --- 8,226,341,662,537,623,127,128
Al Zimmermann
---------------------------------
(1) Adding a few new ones (I downloaded a package for long integers).
(2) Got rid of the ones starting with 9 (e.g. 98346-1653)!
tri = 6, comp = 3, n = 3
tri = 78, comp = 21, n = 12
tri = 60378, comp = 39621, n = 347
tri = 77421, comp = 22578, n = 393
tri = 759528, comp = 240471, n = 1232
tri = 542241846, comp = 457758153, n = 32931
tri = 64420218096, comp = 35579781903, n = 358943
tri = 519463311003, comp = 480536688996, n = 1019277
--Nathan
--
Nathan Stohler
--------------------------------
Some thoughts....
A pair of 9-complimentary (9C) numbers will always sum to a number of N
digits, all of which are 9's. This number will be:
10^N - 1
I believe I know how to check if any pairs of 9C squares exist for any given
N. It doesn't prove that the set of pairs of 9C squares is infinite, but it
does seem to suggest that possibility.
Claim: For there to be a pairs of 9C squares that sum to 10^N - 1, then the
distance from (10^N - 1)/2 to the greatest square <= itself and the distance
from (10^N - 1)/2 to the lowest square >= itself must either be equal or differ
by a multiple of 4.
1) Any pair of 9C numbers that sum to a number of N digits will always be
equidistant to the number (10^N - 1)/2.
Proof:
Let A be the lower of the pair and B be the higher.
A + B = 10^N - 1, or 10^N - 1 - B = A
A - 0 = A
Therefore, the distance from B to 10^N - 1 and the distance from A to
0 are equal.
The midpoint between 0 and 10^N - 1 is (10^N - 1)/2.
If two points are equidistant to their nearest end point on a line,
then they are also equidistant to the midpoint of the line.
Therefore, A and B are equidistant to the number (10^N - 1)/2.
2) The midpoint, M, rests between two consecutive perfect squares (a
trivial but important point), which will be designated X and Y. The distance between
these two squares will be designated D. We will designate two other distances,
S and T, which will respectively be initialized to the distance between M and X
and the distance between M and Y.
3) If at this point we determine that X and Y are equidistant from M, then
they are 9C squares. Otherwise, we must search outward in both directions for
a pair of squares that are equidistant.
4) The distances between elements of the series of consecutive squares is
the series of consecutive odds.
Proof:
(N + 1)^2 - N^2 = 2N + 1
As N increments by 1, 2N + 1 increments by 2.
When N = 0, 2N + 1 = 1.
As N goes from 0 to infinity in increments of 1, 2N + 1 goes from 1
to infinity in increments of 2 (i.e. The series of consecutive odds).
5) Therefore, the distance between X and Y is odd. It should be noted that
the distance between any pair of 9C squares must also be odd, as they must sum
to an odd number.
6) As we progress from Y to the next square, we increase T by D + 2. We
must also progress from X to the next square in the opposite direction to keep
the distance between these two points odd. S will therefore increase by D - 2.
Note that T has increased by 4 more than S. If S is already smaller than T,
then we will increase S by moving 2 squares down the line, then begin adjusting
as stated previously. This will also cause the difference between S and T to be
adjusted by a multiple of 4, as the sum of any two consecutive odds is always a
multiple of 4.
Proof:
(2Z + 1) + (2(Z +1) + 1) = 4Z + 4 = 4(Z + 1)
7) For S and T to become equal (the condition for the squares to be 9C),
the initial difference between S and T must be 0 or a multiple of 4, or:
|T-S| mod 4 = 0
Since |T-S| mod 4 can only result in either a 0, 1, 2, or 3, I would expect
about 25% of all N's to have at least one pair of 9C squares. Since 25% of
infinity is still infinity, I would conjecture that the set of pairs of 9C squares
is infinite.
Clint Weaver
-----------------------------------------------
Computed values, to the limits of 32-bit arithmetic:
[2, 3] 3 + 6
[6, 12] 21 + 78
[212, 393] 22578 + 77421
[281, 347] 39621 + 60378
[693, 1232] 240471 + 759528
[30257, 32931] 457758153 + 542241846
--
Roger Phillips