Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #10926
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Re: are you interested in number theory AND programming |
| Date | 2020-06-13 23:28 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <rc3gdc$5dt$1@dont-email.me> (permalink) |
| References | <2122d884-f04b-42f8-b95a-a257b61fef86o@googlegroups.com> <rc03bc$pme$1@dont-email.me> <3a3b6135-9e6e-42f5-8088-2774a660f504o@googlegroups.com> <87wo4bp8xo.fsf@bsb.me.uk> <f54e9e16-de6c-4c66-8b7e-fdf40ea290dbo@googlegroups.com> |
On 13/06/2020 13:07, syedanwarowais5@gmail.com wrote:
> As part of a (hopefully growing) exploration in number theory, I need to find solutions to the following diophantine equation :
> ab(a+b)=cd(c+d) (in positive integers)
> The first solution set is a=1,b=5 and c=2,d=3.
> I know there are several more solution sets, though I don't know if there are an infinite number of solutions sets to this diophantine equation.
> Would you like to write a program to solve this puzzle?
> Once you respond, I will go deeper into the mathematics this connects to.
>
If a₁, b₁, c₁, d₁ is one set, and a₁, b₁, c₂, d₂ is another set (same a,
b), then c₁, d₁, c₂, d₂ is another set.
And for each set a, b, c, d, you have the sets:
a, b, c, d
b, a, c, d
a, b, d, c
b, a, d, c
c, d, a, b
d, c, a, b
c, d, b, a
d, c, b, a
and for any n, you get n.a, n.b, n.c, n.d.
I assume that you want a, b to be different from c, d, though you didn't
state it. So I'd say you are looking for numbers that can be written as
ab(a + b) in at least two different ways.
Here's a simple Python function for it:
def solutions(max_a = 200, min_len = 2) :
d = {}
for a in range(1, max_a) :
for b in range(a + 1, max_a + 1) :
s = a * b * (a + b)
if s in d :
d[s].append((a, b))
else :
d[s] = [(a, b)]
return sorted([vs for vs in d.values() if len(vs) >= min_len])
(My results match Ben's, which is a good sign.)
Back to comp.programming | Previous | Next — Previous in thread | Find similar | Unroll thread
are you interested in number theory AND programming syedanwarowais5@gmail.com - 2020-06-12 02:25 -0700
Re: are you interested in number theory AND programming root <NoEMail@home.org> - 2020-06-12 14:26 +0000
Re: are you interested in number theory AND programming syedanwarowais5@gmail.com - 2020-06-12 19:34 -0700
Re: are you interested in number theory AND programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-06-13 11:16 +0100
Re: are you interested in number theory AND programming syedanwarowais5@gmail.com - 2020-06-13 04:07 -0700
Re: are you interested in number theory AND programming Julio Di Egidio <julio@diegidio.name> - 2020-06-13 07:20 -0700
Re: are you interested in number theory AND programming Julio Di Egidio <julio@diegidio.name> - 2020-06-13 07:47 -0700
Re: are you interested in number theory AND programming Julio Di Egidio <julio@diegidio.name> - 2020-06-13 08:29 -0700
Re: are you interested in number theory AND programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-06-13 17:02 +0100
Re: are you interested in number theory AND programming syedanwarowais5@gmail.com - 2020-06-13 23:11 -0700
Re: are you interested in number theory AND programming syedanwarowais5@gmail.com - 2020-06-13 23:23 -0700
Re: are you interested in number theory AND programming James Dow Allen <jdallen2000@yahoo.com> - 2020-06-17 00:55 -0700
Re: are you interested in number theory AND programming Richard Heathfield <rjh@cpax.org.uk> - 2020-06-17 09:30 +0100
Re: are you interested in number theory AND programming James Dow Allen <jdallen2000@yahoo.com> - 2020-06-17 02:32 -0700
Re: are you interested in number theory AND programming Richard Heathfield <rjh@cpax.org.uk> - 2020-06-20 08:26 +0100
Re: are you interested in number theory AND programming James Dow Allen <jdallen2000@yahoo.com> - 2020-06-20 03:58 -0700
Re: are you interested in number theory AND programming Richard Heathfield <rjh@cpax.org.uk> - 2020-06-20 14:55 +0100
Re: are you interested in number theory AND programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-06-17 23:11 +0100
Re: are you interested in number theory AND programming syed owais <syedanwarowais5@gmail.com> - 2020-06-20 04:44 -0700
Re: are you interested in number theory AND programming Julio Di Egidio <julio@diegidio.name> - 2020-06-20 06:27 -0700
Re: are you interested in number theory AND programming syed owais <syedanwarowais5@gmail.com> - 2020-06-21 17:31 -0700
Re: are you interested in number theory AND programming James Dow Allen <jdallen2000@yahoo.com> - 2020-06-22 02:00 -0700
Re: are you interested in number theory AND programming syed owais <syedanwarowais5@gmail.com> - 2020-06-22 05:34 -0700
Re: are you interested in number theory AND programming root <NoEMail@home.org> - 2020-06-22 14:05 +0000
Re: are you interested in number theory AND programming syed owais <syedanwarowais5@gmail.com> - 2020-06-23 04:50 -0700
Re: are you interested in number theory AND programming David Brown <david.brown@hesbynett.no> - 2020-06-23 15:50 +0200
Re: are you interested in number theory AND programming Chad <cdalten@gmail.com> - 2020-06-23 14:34 -0700
Re: are you interested in number theory AND programming syed owais <syedanwarowais5@gmail.com> - 2020-06-24 01:39 -0700
Re: are you interested in number theory AND programming David Brown <david.brown@hesbynett.no> - 2020-06-24 15:48 +0200
Re: are you interested in number theory AND programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-06-24 13:52 +0100
Re: are you interested in number theory AND programming David Brown <david.brown@hesbynett.no> - 2020-06-24 16:00 +0200
Re: are you interested in number theory AND programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-06-24 17:03 +0100
Re: are you interested in number theory AND programming David Brown <david.brown@hesbynett.no> - 2020-06-24 20:32 +0200
Re: are you interested in number theory AND programming Chad <cdalten@gmail.com> - 2020-06-24 14:19 -0700
Re: are you interested in number theory AND programming Julio Di Egidio <julio@diegidio.name> - 2020-06-26 06:24 -0700
Re: are you interested in number theory AND programming David Brown <david.brown@hesbynett.no> - 2020-06-26 16:28 +0200
Re: are you interested in number theory AND programming Julio Di Egidio <julio@diegidio.name> - 2020-06-26 06:11 -0700
Re: are you interested in number theory AND programming James Dow Allen <jdallen2000@yahoo.com> - 2020-06-22 09:39 -0700
Re: are you interested in number theory AND programming syed owais <syedanwarowais5@gmail.com> - 2020-06-23 00:50 -0700
Re: are you interested in number theory AND programming James Dow Allen <jdallen2000@yahoo.com> - 2020-06-23 05:14 -0700
Re: are you interested in number theory AND programming syed owais <syedanwarowais5@gmail.com> - 2020-06-24 02:39 -0700
Re: are you interested in number theory AND programming Richard Heathfield <rjh@cpax.org.uk> - 2020-06-25 20:48 +0100
Re: are you interested in number theory AND programming David Brown <david.brown@hesbynett.no> - 2020-06-26 08:48 +0200
Re: are you interested in number theory AND programming syed owais <syedanwarowais5@gmail.com> - 2020-06-26 01:25 -0700
Re: are you interested in number theory AND programming David Brown <david.brown@hesbynett.no> - 2020-06-26 11:10 +0200
Re: are you interested in number theory AND programming James Dow Allen <jdallen2000@yahoo.com> - 2020-06-26 03:56 -0700
Re: are you interested in number theory AND programming David Brown <david.brown@hesbynett.no> - 2020-06-26 13:34 +0200
Re: are you interested in number theory AND programming Boris Dorestand <bdorestand@example.com> - 2020-06-27 11:22 -0300
Re: are you interested in number theory AND programming David Brown <david.brown@hesbynett.no> - 2020-06-27 17:50 +0200
Re: are you interested in number theory AND programming Boris Dorestand <bdorestand@example.com> - 2020-06-27 13:42 -0300
Re: are you interested in number theory AND programming syed owais <syedanwarowais5@gmail.com> - 2020-07-04 18:44 -0700
Re: are you interested in number theory AND programming syed owais <syedanwarowais5@gmail.com> - 2020-07-09 19:51 -0700
Re: are you interested in number theory AND programming James Dow Allen <jdallen2000@yahoo.com> - 2020-07-10 05:32 -0700
Re: are you interested in number theory AND programming syed owais <syedanwarowais5@gmail.com> - 2020-07-10 09:03 -0700
Re: are you interested in number theory AND programming Julio Di Egidio <julio@diegidio.name> - 2020-06-26 06:02 -0700
Re: are you interested in number theory AND programming James Dow Allen <jdallen2000@yahoo.com> - 2020-06-26 01:58 -0700
Re: are you interested in number theory AND programming David Brown <david.brown@hesbynett.no> - 2020-06-26 11:14 +0200
Re: are you interested in number theory AND programming Richard Damon <Richard@Damon-Family.org> - 2020-06-26 13:10 -0400
Re: are you interested in number theory AND programming Julio Di Egidio <julio@diegidio.name> - 2020-06-26 06:12 -0700
Re: are you interested in number theory AND programming David Brown <david.brown@hesbynett.no> - 2020-06-13 23:28 +0200
csiph-web