Sudipta Das found square numbers 39866596 and 82355625, which are 11-complements. On my site, and here, I asked if anyone could prove anything about n-complements. "L.T. Pebody" <ltp1000@hermes.cam.ac.uk> rose to the challenge, and found a pretty amazing proof. It answers Sudipta's question, and makes the 39866596/82355625 pair all the more remarkable. Pebody's proof follows: --Ed Pegg Jr. 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.