Each of M and N is a positive integer such that:
LCM(M, M+6) = LCM(N, N+6)
Is M always equal to N? Give reasons for your answer.
The original problem is
here.
clc,clearvars
for n=1:100000
r(n,:)=[n, lcm(n+6,n)];
end
r=sortrows(r,2);
for i=1:length(r)-1
if r(i,2)==r(i+1,2)
fprintf('%d %d\n',r(i,:))
fprintf('%d %d\n\n',r(i+1,:))
end
end
r(1:100,:)
finds no example of inequality between two numbers with the same LCM with the number plus 6, looking at M or N between 1 and 100,000.
The lowest 100 LCM values are shown below, against their unique M or N value.
n LCM (n, n+6)
1 7
2 8
3 9
6 12
4 20
12 36
9 45
5 55
8 56
18 72
10 80
7 91
15 105
24 120
14 140
16 176
30 180
11 187
21 189
13 247
36 252
20 260
27 297
22 308
42 336
17 391
26 416
33 429
48 432
19 475
28 476
54 540
39 585
32 608
60 660
23 667
34 680
45 765
25 775
66 792
38 836
40 920
72 936
51 969
29 1015
78 1092
44 1100
31 1147
46 1196
57 1197
84 1260
50 1400
35 1435
90 1440
63 1449
52 1508
37 1591
96 1632
69 1725
56 1736
102 1836
58 1856
41 1927
75 2025
108 2052
43 2107
62 2108
64 2240
114 2280
81 2349
47 2491
68 2516
120 2520
70 2660
49 2695
87 2697
126 2772
74 2960
132 3036
93 3069
76 3116
53 3127
138 3312
55 3355
80 3440
99 3465
144 3600
82 3608
59 3835
105 3885
150 3900
86 3956
61 4087
88 4136
156 4212
111 4329
92 4508
162 4536
65 4615
94 4700
|
Posted by Charlie
on 2023-10-31 08:35:02 |