All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Excellent numbers (Posted on 2017-04-08) Difficulty: 3 of 5
An excellent number n has an even number of digits and, if you split the number into the front half a and the back half b, then b^2 − a^2 = n.
For example, 3468 = 68^2 − 34^2.
The only two-digit excellent number is 48 and the only four-digit
excellent number is 3468.

There are eight six-digit excellent numbers.

List them.

Bonus: List all 10-digit excellent numbers.

Source: Project Euler.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Hints/Tips Going further Comment 3 of 3 |
My earlier equation (2b-1)^2 = 4a*(a+10^k)+1 can still benefit from more algebraic manipulation, specifically to make it into a difference of squares: (2a+10^k)^2 - (2b-1)^2 = 10^(2k) - 1.  Then finding excellent numbers is reduced to testing factorizations of 10^(2k) - 1.

Let f*g be a factorization of 10^(2k) - 1 with f>g.  Then a = (f+g-2*10^k)/4 and b = (f-g+2)/4.

Testing this with k=1.  99 has 3 factorizations {99*1, 33*3, 11*9} only one of which results in a valid excellent number: 9=33*3 implies a = (33+3-20)/4 = 4 and b = (33-3+2)/4 = 8, which makes the two digit excellent number 48.

So looking for 14 digit excellent numbers starts with factoring 10^14-1 (prime factorization 3*3*11*239*4649*909091).  Only 2 of the 24 f*g factorizations resulted in valid numbers:
f*g = 36666663*2727273 yielded 4848484 8484848
f*g = 30000003*3333333 yielded 3333334 6666668

  Posted by Brian Smith on 2017-04-09 14:59:16
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (23)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information