wu :: forums
« wu :: forums - semi perimeter a square »

Welcome, Guest. Please Login or Register.
Mar 28th, 2024, 8:04am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   medium
(Moderators: towr, Icarus, SMQ, ThudnBlunder, Grimbal, william wu, Eigenray)
   semi perimeter a square
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: semi perimeter a square  (Read 2509 times)
Christine
Full Member
***





   


Posts: 159
semi perimeter a square  
« on: Mar 30th, 2014, 1:26pm »
Quote Quote Modify Modify

Can you find a triangle whose area, sides are integers and the semi perimeter is a square?
 
Is there an algorithm to generate them?
IP Logged
pex
Uberpuzzler
*****





   


Gender: male
Posts: 880
Re: semi perimeter a square  
« Reply #1 on: Mar 30th, 2014, 5:27pm »
Quote Quote Modify Modify

on Mar 30th, 2014, 1:26pm, Christine wrote:
Can you find a triangle whose area, sides are integers and the semi perimeter is a square?

Yes. The simplest triangle with integer sides and area that I can think of has sides 3,4,5. Its semiperimeter is 6, so scaling the whole thing up by a factor of 6 works: the 18,24,30 triangle fits the requirements.
IP Logged
Christine
Full Member
***





   


Posts: 159
Re: semi perimeter a square  
« Reply #2 on: Apr 10th, 2014, 3:18pm »
Quote Quote Modify Modify

on Mar 30th, 2014, 5:27pm, pex wrote:

Yes. The simplest triangle with integer sides and area that I can think of has sides 3,4,5. Its semiperimeter is 6, so scaling the whole thing up by a factor of 6 works: the 18,24,30 triangle fits the requirements.

 
Thanks. I'm looking for a primitive Heronian triangle
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: semi perimeter a square  
« Reply #3 on: Apr 10th, 2014, 11:13pm »
Quote Quote Modify Modify

The smallest primitive with those properties is 8,5,5 (which is just 2 (5,4,3)'s put together)
 
You can generate a list based on http://en.wikipedia.org/wiki/Heronian_triangle#Exact_formula_for_Heronia n_triangles
 
e.g.
Python Code:
from fractions import gcd
 
for m in range(1000):
 for n in range(1,m+1):
  for k in range(int(((m**2*n)/(2*m+n))**0.5-1), int((m*n)**0.5)+1):
   if gcd(m,gcd(n,k))==1 and m*n > k**2 >= (m**2*n)/(2*m+n) and m>=n>=1:
    a = n*(m**2+k**2)
    b = m*(n**2+k**2)
    c = (n+m)*(m*n-k**2)
    g = gcd(a,gcd(b,c))
    a /= g
    b /= g
    c /= g
    s = (a+b+c)/2
    if int(s**0.5)**2==s:
     print (m,n,k, a,b,c, (a+b+c)/2)

 
 
(697, 657, 104) is the first I've found to also have a square area.
« Last Edit: Apr 10th, 2014, 11:18pm by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board