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

Home > Just Math
Compare sizes (Posted on 2014-12-18) Difficulty: 2 of 5
Consider all possible trinomials of the form x^2 + p*x + q, where p,q are integers such that 1 ≤ p,q ≤ 2014.
Among them are m trinomials having integer zeroes, and n having no real roots.

Which number is higher, m or n?

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 2 of 3 |
By

 For p = 1 To 2014
  For q = 1 To 2014
    disc = p * p - 4 * q
    If disc < 0 Then
      n = n + 1
     Else
      sr = Int(Sqr(disc) + 0.5)
      If sr * sr = disc Then
        rt = -p + sr
        If rt Mod 2 = 0 Then
          m = m + 1
        End If
      End If
    End If
  Next
 Next

 Text1.Text = Text1.Text & m & Str(n) & crlf

m is 7835 and n is 119516, so n is larger.

  Posted by Charlie on 2014-12-18 20:24:15
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 (3)
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