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

Home > Just Math
More than linear (Posted on 2015-06-30) Difficulty: 3 of 5
Find all possible positive integer solutions to this equation:

AN - BN = 2015, whenever N ≥ 2

Note: The common exponent must also be an integer.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 1 of 1
a      b  n
48 17 2
84 71 2
204 199 2
1008 1007 2
14 9 3
from
DefDbl A-Z
Dim crlf$



Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)

 For n = 2 To 11
   tot = 3
   Do
    'Text1.Text = Text1.Text & tot & crlf
    DoEvents
    noSoln = 0
    soln = 0
    For b = Int(tot / 2) To 1 Step -1
     a = tot - b
     aton = Int(a ^ n + 0.5)
     bton = Int(b ^ n + 0.5)
     If aton > maxnum Then maxnum = aton
     If bton > maxnum Then maxnum = bton
     diff = aton - bton
     If diff > 2015 And a - b = 1 Then noSoln = 1: Exit For
     If diff > 2015 Then Exit For
     If diff = 2015 Then
       Text1.Text = Text1.Text & a & Str(b) & Str(n) & crlf
       Exit For
     End If
    Next
    tot = tot + 1
   Loop Until noSoln
 Next

 
 Text1.Text = Text1.Text & crlf & maxnum & " done"
  
End Sub




  Posted by Charlie on 2015-06-30 16:19:44
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
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