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

Home > Just Math
Explore a diophantine equation (Posted on 2023-08-14) Difficulty: 2 of 5
Given:

2xy+3x+2y=42

  1. Provide all solutions, allowing non-negative values only.
  2. What two-digit numbers can replace 42, so that there will still be non negative solutions for the bolded equation?

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution | Comment 2 of 6 |
Solution to part I:
Factor the expression.
2xy + 2y + 3x = 42
2y(x+1) + 3(x+1) = 45
(x+1)(2y+3) = 45
  A  *   B   =  N+3
A  B   (x,y)  (x,y) for -A*-B
1  45  (0,21)   (-2,-24)
3  15  (2,6)    (-4,-9)
5  9   (4,3)    (-6,-6)
9  5   (8,1)    (-10,-4)
15 3   (14,0)   (-16,-3)
45 1   (44,-1)  (-46,-2)
 
(0,21)(2,6)(4,3)(8,1)(14,0)

Solution to part II:  
In general, considering the factors to be in ordered pairs, 
If 2-digit N replaces 42, then 
(x+1)(2y+3) = N+3

N is from 10 to 99 (2-digit number)
So N+3 is from 13 to 102
(the n in my code is really N+3)


N+3 [x,y]  N 
13 [0, 5] 10
14 [1, 2] 11
15 [0, 6] 12
15 [2, 1] 12
15 [4, 0] 12
17 [0, 7] 14
18 [1, 3] 15
18 [5, 0] 15
19 [0, 8] 16
20 [3, 1] 17
21 [0, 9] 18
21 [2, 2] 18
21 [6, 0] 18
22 [1, 4] 19
23 [0, 10] 20
24 [7, 0] 21
25 [0, 11] 22
25 [4, 1] 22
26 [1, 5] 23
27 [0, 12] 24
27 [2, 3] 24
27 [8, 0] 24
28 [3, 2] 25
29 [0, 13] 26
30 [1, 6] 27
30 [5, 1] 27
30 [9, 0] 27
31 [0, 14] 28
33 [0, 15] 30
33 [2, 4] 30
33 [10, 0] 30
34 [1, 7] 31
35 [0, 16] 32
35 [4, 2] 32
35 [6, 1] 32
36 [3, 3] 33
36 [11, 0] 33
37 [0, 17] 34
38 [1, 8] 35
39 [0, 18] 36
39 [2, 5] 36
39 [12, 0] 36
40 [7, 1] 37
41 [0, 19] 38
42 [1, 9] 39
42 [5, 2] 39
42 [13, 0] 39
43 [0, 20] 40
44 [3, 4] 41
45 [0, 21] 42
45 [2, 6] 42
45 [4, 3] 42
45 [8, 1] 42
45 [14, 0] 42
46 [1, 10] 43
47 [0, 22] 44
48 [15, 0] 45
49 [0, 23] 46
49 [6, 2] 46
50 [1, 11] 47
50 [9, 1] 47
51 [0, 24] 48
51 [2, 7] 48
51 [16, 0] 48
52 [3, 5] 49
53 [0, 25] 50
54 [1, 12] 51
54 [5, 3] 51
54 [17, 0] 51
55 [0, 26] 52
55 [4, 4] 52
55 [10, 1] 52
56 [7, 2] 53
57 [0, 27] 54
57 [2, 8] 54
57 [18, 0] 54
58 [1, 13] 55
59 [0, 28] 56
60 [3, 6] 57
60 [11, 1] 57
60 [19, 0] 57
61 [0, 29] 58
62 [1, 14] 59
63 [0, 30] 60
63 [2, 9] 60
63 [6, 3] 60
63 [8, 2] 60
63 [20, 0] 60
65 [0, 31] 62
65 [4, 5] 62
65 [12, 1] 62
66 [1, 15] 63
66 [5, 4] 63
66 [21, 0] 63
67 [0, 32] 64
68 [3, 7] 65
69 [0, 33] 66
69 [2, 10] 66
69 [22, 0] 66
70 [1, 16] 67
70 [9, 2] 67
70 [13, 1] 67
71 [0, 34] 68
72 [7, 3] 69
72 [23, 0] 69
73 [0, 35] 70
74 [1, 17] 71
75 [0, 36] 72
75 [2, 11] 72
75 [4, 6] 72
75 [14, 1] 72
75 [24, 0] 72
76 [3, 8] 73
77 [0, 37] 74
77 [6, 4] 74
77 [10, 2] 74
78 [1, 18] 75
78 [5, 5] 75
78 [25, 0] 75
79 [0, 38] 76
80 [15, 1] 77
81 [0, 39] 78
81 [2, 12] 78
81 [8, 3] 78
81 [26, 0] 78
82 [1, 19] 79
83 [0, 40] 80
84 [3, 9] 81
84 [11, 2] 81
84 [27, 0] 81
85 [0, 41] 82
85 [4, 7] 82
85 [16, 1] 82
86 [1, 20] 83
87 [0, 42] 84
87 [2, 13] 84
87 [28, 0] 84
88 [7, 4] 85
89 [0, 43] 86
90 [1, 21] 87
90 [5, 6] 87
90 [9, 3] 87
90 [17, 1] 87
90 [29, 0] 87
91 [0, 44] 88
91 [6, 5] 88
91 [12, 2] 88
92 [3, 10] 89
93 [0, 45] 90
93 [2, 14] 90
93 [30, 0] 90
94 [1, 22] 91
95 [0, 46] 92
95 [4, 8] 92
95 [18, 1] 92
96 [31, 0] 93
97 [0, 47] 94
98 [1, 23] 95
98 [13, 2] 95
99 [0, 48] 96
99 [2, 15] 96
99 [8, 4] 96
99 [10, 3] 96
99 [32, 0] 96
100 [3, 11] 97
100 [19, 1] 97
101 [0, 49] 98
102 [1, 24] 99
102 [5, 7] 99
102 [33, 0] 99

2-digit numbers that work
[10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]
There are 87 of these, including 42

--------------
def factorPairs(n):
    ans = []
    for i in range(1,n+1):
        if (n/i)%1 == 0:
            ans.append([i,int(n/i)])
    return ans

nlist = []  
print('N+3 [x,y]  N ')      
for n in range(13,103):  # comment out one of these lines
# for n in range(45,46):  # comment out one of these lines
    for pair in factorPairs(n):
        y = (pair[1] - 3)/2
        if y%1 != 0:
            continue
        x = pair[0] - 1
        if x<0 or y<0:
            continue
        y = int(y)
        print(n, [x,y], 2*x*y+3*x+2*y )
        if n-3 not in nlist:
            nlist.append(n-3)
print(nlist )
print(len(nlist))
        

  Posted by Larry on 2023-08-14 10:24:03
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 (10)
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