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

Home > Just Math
Arithmetic Triplet Ascertainment (Posted on 2016-01-03) Difficulty: 3 of 5
F(n) denotes the largest prime divisor of a positive integer n.

Determine all possible triplets (A,B,C) of strictly increasing positive integers such that:
  • A, B and C are in arithmetic sequence, and:
  • F(A*B*C) ≤ 3

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 Heuristic solution Comment 1 of 1
These three sets form the basis of an infinite number of sets:

(1, 2, 3)
(2, 3, 4)
(2, 9, 16)

multiply any one of these three sets by any number that's a product of powers of 2 and 3, and you get another set.

Before the GCD test in the below program was added, many more were found. The GCD test showed all are based on the above three, having tested all cases where a+c <= 30,000.



DefDbl A-Z
Dim crlf$


Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 For tot = 4 To 30000
   For a = 1 To (tot - 1) / 2
    DoEvents
    If test(a) Then
     c = tot - a
     b = (a + c) / 2
     If b = Int(b) Then
      If gcd(a, b) = 1 Then
       If test(b) Then
         If test(c) Then
           Text1.Text = Text1.Text & a & Str(b) & Str(c) & crlf
         End If
       End If
      End If
     End If
    End If
   Next
 Next

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

Function test(x)
  t = x
  While t Mod 2 = 0
    t = t / 2
  Wend
  While t Mod 3 = 0
    t = t / 3
  Wend
  If t = 1 Then test = 1 Else test = 0
End Function

Function gcd(a, b)
  x = a: y = b
  Do
   q = Int(x / y)
   z = x - q * y
   x = y: y = z
  Loop Until z = 0
  gcd = x
End Function


  Posted by Charlie on 2016-01-03 10:57: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 (7)
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