[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1844.0. "Sum of any two = n^2 (where n=integer)" by SHIPS::WHITWOOD_N (Nigel Whitwood) Thu Feb 17 1994 12:43

T.RTitleUserPersonal
Name
DateLines
1844.2If this helps.CADSYS::COOPERTopher CooperMon Feb 21 1994 17:2813
    .1 contained a typo.  Here is the corrected version:

    Either of the following must hold:

	1) Four of the numbers are multiples of 16 and the last number is
	   either a multiple of 16, 1 mod 8, or 3 mod 16

   or

	2) Four of the numbers are 8 mod 16 and the last number is either
	   8 mod 16, 1 mod 8, or 11 mod 16.

					Topher
1844.33 and 4RTL::GILBERTMon Feb 21 1994 18:2256
> Find five different whole positive numbers a,b,c,d,e, any two of which
> sum to a square number.

    First, note that any solution in rationals can be converted to an integer
    solution by multiplying a,b,... by (lcd(a,b,...))^2, where lcd() is the
    least common divisor.

	Aside: We might multiply by a smaller number -- let 
	    lcd(a,b,...) = 	p1^e1 * p2^e2 * ... * pn^en
	be the prime decomposition of lcd(a,b,...).  Let bi = (ei mod 2), and
	    lcd2(a,b,...) =  p1^b1 * p2^b2 * ... * pn^bn
	Then we can convert a rational solution to an integer solution by
	multiplying a,b,... by (lcd2(a,b,...))^2.


    To find the general form of three rationals a,b,c any two of which sum
    to the square of a rational,
	b + c = A^2
	c + a = B^2
	a + b = C^2
    we can choose A, B, and C, and let
	a = ( -A^2 + B^2 + C^2 )/2
	b = (  A^2 - B^2 + C^2 )/2
	c = (  A^2 + B^2 - C^2 )/2


    To find the general form of four rationals a,b,c,d any two of which sum
    to the square of a rational,
	b + c = A^2
	c + a = B^2
	a + b = C^2
	a + d = D^2
	b + d = E^2
	c + d = F^2
    Suppose we can choose A and B.  Then since
	B^2 - A^2 = a - b = D^2 - E^2
	(B - A)(B + A) = (D - E)(D + E)
    This suggests the substitution
	v = (B - A)/(D - E)
    where v is a rational.  Substituting this into the above gives:
	(B - A) = (D - E) * v
	(B + A) = (D + E) / v
    and solve for D and E.
    We proceed similarly, with F and E, and introduce r.
    This gives two equations for E; equating these gives an equation for C.

    We choose A, B, v, and r, and let

	C = ((B^2 - A^2 - v^2)*r + (r^2-1)*B*v)/(v*(r^2+1))
	a = ( -A^2 + B^2 + C^2 )/2
	b = (  A^2 - B^2 + C^2 )/2
	c = (  A^2 + B^2 - C^2 )/2
	d = ( (C-B)^2*r^2 - 2*A^2 + (C+B)^2/r^2 )/4

    This is a general solution for four rationals, any two of which sum to
    the square of a rational.
1844.4Yes - But does it help ?SHIPS::WHITWOOD_NNigel WhitwoodTue Feb 22 1994 15:223
    Re -1.
    
    I got that far with five - it was at that point that I gave up :-)
1844.5RUSURE::EDPAlways mount a scratch monkey.Mon Mar 07 1994 17:3321
    Note that the formulae in .3 express four variables with the desired
    property as functions of A, B, r, and v.  In a set of five variables,
    three of them are common to two different sets of four.  Those sets of
    four can be expressed as functions of A, B, r0, v0, r1, and v1.  The Cs
    they generate will be equal, so we can solve for one of the variables
    in terms of the others.  Then the problem will be solved by finding a
    value of that solution that is rational when the other variables are
    rational and such that the sum of the generated "fourth" variables is a
    square.
    
    I've reduced this to a messy quartic in Maple.  Can anybody
    characterize when k^2 = an^4 + bn^2 + c has a solution for n and k in
    the integers, for given a, b, and c?
    
    
    				-- edp
    
    
Public key fingerprint:  8e ad 63 61 ba 0c 26 86  32 0a 7d 28 db e7 6f 75
To get PGP, FTP /pub/unix/security/crypt/pgp23A.zip from ftp.funet.fi.
For FTP access, mail "help" message to DECWRL::FTPmail or open Upsar::Gateways.
1844.63D::ROTHGeometry is the real life!Mon Mar 07 1994 21:5418
>    I've reduced this to a messy quartic in Maple.  Can anybody
>    characterize when k^2 = an^4 + bn^2 + c has a solution for n and k in
>    the integers, for given a, b, and c?

   I think this has a solution for rational n and k when the curve
   in the (n,k) plane has a singular point.  You can then paramterize
   the curve by the slope of a line passing through that point, which will
   intersect the curve at one other unique point, guaranteed to be rational
   in (n,k).

   Singularity can be tested for by calculating a discriminant for the
   curve, which vanishes.  At least this works for a cubic.

   I can look this up in a book on algebraic geometry tonight - I don't
   really remember the details, though I once worked things through
   for cubics.

   - Jim
1844.7another tackIOSG::CARLINDick Carlin IOSG, Reading, EnglandWed Mar 09 1994 07:5821
1844.8IOSG::TEFNUT::carlinDick Carlin IOSG ReadingThu Dec 08 1994 16:2827
Re .3

Peter, could you elaborate a bit on the following?:

> We proceed similarly, with F and E, and introduce r.
> This gives two equations for E; equating these gives an equation for C.

The nearest I can get to your subsequent 5 formulae is if I introduce an 
upside-down definition of r compared with that of v:

r = (F-E)/(B-C)		(since B^2-C^2 = c-b = F^2-E^2)

But then, for the first of the 5 formulae I get:

C = (r((B+A)v^2-(B-A))+(r^2-1)Bv)/v(r^2+1)

but with agreement for the other 4. I'm sure I've slipped up somewhere but I 
can't see where. How exactly did you define your r?

We also have to bear in mind that we have some constraints on v and r, given 
that we want a,b,c and d to be positive.

Re .5

edp, did you get any further along that path?

Dick