5 kill "ancegypt.txt":open "ancegypt.txt" for output as #2
10 for Tot=2 to 10000
20 for A=1 to int(Tot/3)
30 for B=A+1 to int((Tot-A)/2)
40 C=Tot-A-B
50 F=1//A+1//B+1//C
60 if num(F)=1 or num(F)=2 or num(F)=4 then
65 :if gcd(gcd(A,B),C)=1 then
70 :print 1//A;1//B;1//C,F
75 :print #2,1//A;1//B;1//C,F
80 next
90 next
100 next
produces the following list of x, y, z and the sum of 1/x + 1/y + 1/z. If the numerator of the sum is 1 or 2, multiply both numerator and denominator by 4 or 2 respectively to get a fraction whose numerator is 4. Each can be generalized as per Jer's comment.
The first example is 1/a + 1/(2a) + 1/(2a) = 4/(2a) in Jer's notation.
1 1/2 1/2 2
1/2 1/3 1/6 1
1 1/6 1/6 4/3
1 1/4 1/12 4/3
1/2 1/5 1/10 4/5
1/3 1/4 1/12 2/3
1/3 1/6 1/14 4/7
1/4 1/9 1/12 4/9
1/2 1/10 1/15 2/3
1/3 1/10 1/15 1/2
1/2 1/9 1/18 2/3
1/4 1/5 1/20 1/2
1/4 1/12 1/15 2/5
1/6 1/10 1/15 1/3
1/3 1/8 1/24 1/2
1/5 1/12 1/20 1/3
1/9 1/10 1/18 4/15
1/10 1/12 1/15 1/4
1/5 1/6 1/30 2/5
1/6 1/14 1/21 2/7
1/10 1/15 1/18 2/9
1/12 1/15 1/20 1/5
1/4 1/12 1/33 4/11
1/2 1/7 1/42 2/3
1/3 1/7 1/42 1/2
1/4 1/21 1/28 1/3
1/5 1/20 1/28 2/7
1/6 1/7 1/42 1/3
1/6 1/14 1/35 4/15
1/6 1/21 1/28 1/4
1/4 1/11 1/44 4/11
1/5 1/9 1/45 1/3
1/7 1/10 1/42 4/15
1/10 1/14 1/35 1/5
1/7 1/12 1/42 1/4
1/12 1/21 1/28 1/6
1/14 1/15 1/35 1/6
1/2 1/21 1/42 4/7
1/3 1/24 1/40 2/5
1/7 1/18 1/42 2/9
1/10 1/15 1/42 4/21
1/5 1/24 1/40 4/15
1/20 1/21 1/28 2/15
1/7 1/8 1/56 2/7
1/15 1/21 1/35 1/7
1/21 1/24 1/28 1/8
1/4 1/15 1/60 1/3
1/7 1/30 1/42 1/5
1/14 1/30 1/35 2/15
1/15 1/24 1/40 2/15
1/2 1/18 1/63 4/7
1/3 1/20 1/60 2/5
1/20 1/28 1/35 4/35
1/8 1/21 1/56 4/21
1/21 1/24 1/40 4/35
1/21 1/28 1/36 1/9
1/5 1/36 1/45 1/4
1/5 1/14 1/70 2/7
1/8 1/9 1/72 1/4
1/14 1/35 1/40 1/8
1/10 1/15 1/66 2/11
1/14 1/18 1/63 1/7
1/24 1/35 1/40 2/21
1/6 1/38 1/57 4/19
1/10 1/26 1/65 2/13
1/20 1/21 1/60 4/35
1/20 1/36 1/45 1/10
1/21 1/28 1/52 4/39
1/3 1/10 1/90 4/9
1/5 1/28 1/70 1/4
1/7 1/30 1/70 4/21
1/9 1/10 1/90 2/9
1/21 1/28 1/60 1/10
1/24 1/40 1/45 4/45
1/5 1/18 1/90 4/15
1/15 1/35 1/63 1/9
1/7 1/42 1/66 2/11
1/18 1/35 1/63 1/10
1/20 1/44 1/55 1/11
1/21 1/30 1/70 2/21
1/4 1/44 1/77 2/7
1/6 1/17 1/102 4/17
1/36 1/44 1/45 4/55
1/6 1/11 1/110 4/15
1/6 1/22 1/99 2/9
1/6 1/55 1/66 1/5
1/10 1/27 1/90 4/27
1/12 1/15 1/100 4/25
1/15 1/28 1/84 4/35
1/15 1/52 1/60 4/39
1/8 1/33 1/88 1/6
1/9 1/22 1/99 1/6
1/6 1/30 1/95 4/19
1/6 1/50 1/75 1/5
1/10 1/11 1/110 1/5
1/10 1/55 1/66 2/15
1/12 1/51 1/68 2/17
1/21 1/33 1/77 1/11
1/35 1/40 1/56 1/14
1/5 1/8 1/120 1/3
1/12 1/33 1/88 1/8
1/11 1/15 1/110 1/6
1/15 1/55 1/66 1/10
1/9 1/56 1/72 1/7
1/12 1/20 1/105 1/7
1/12 1/25 1/100 2/15
1/14 1/35 1/90 1/9
1/18 1/22 1/99 1/9
1/18 1/55 1/66 4/45
1/24 1/40 1/75 2/25
1/20 1/55 1/66 1/12
1/21 1/44 1/77 1/12
1/8 1/15 1/120 1/5
1/15 1/48 1/80 1/10
1/18 1/35 1/90 2/21
1/18 1/50 1/75 4/45
1/35 1/45 1/63 1/15
1/24 1/33 1/88 1/12
1/15 1/22 1/110 4/33
1/5 1/24 1/120 1/4
1/9 1/14 1/126 4/21
1/14 1/30 1/105 4/35
1/24 1/40 1/85 4/51
1/28 1/44 1/77 1/14
1/4 1/7 1/140 2/5
1/11 1/30 1/110 2/15
1/22 1/30 1/99 4/45
1/30 1/55 1/66 1/15
1/39 1/52 1/60 4/65
1/20 1/28 1/105 2/21
1/8 1/56 1/91 2/13
1/11 1/12 1/132 2/11
1/7 1/10 1/140 1/4
1/10 1/42 1/105 2/15
1/22 1/36 1/99 1/12
1/36 1/44 1/77 4/63
1/11 1/40 1/110 1/8
1/18 1/26 1/117 4/39
1/33 1/40 1/88 1/15
1/36 1/45 1/80 1/16
1/10 1/15 1/138 4/23
1/16 1/35 1/112 1/10
1/30 1/38 1/95 4/57
1/30 1/63 1/70 4/63
1/42 1/55 1/66 2/35
1/45 1/55 1/66 1/18
1/7 1/20 1/140 1/5
1/20 1/42 1/105 1/12
1/24 1/39 1/104 1/13
1/35 1/42 1/90 4/63
1/42 1/50 1/75 2/35
1/22 1/70 1/77 4/55
1/25 1/44 1/100 4/55
1/33 1/48 1/88 1/16
1/50 1/55 1/66 4/75
1/4 1/13 1/156 1/3
1/30 1/33 1/110 4/55
1/30 1/65 1/78 4/65
1/45 1/48 1/80 1/18
1/6 1/13 1/156 1/4
1/6 1/39 1/130 1/5
1/6 1/78 1/91 4/21
1/22 1/54 1/99 2/27
1/7 1/78 1/91 1/6
1/30 1/70 1/77 2/33
1/52 1/60 1/65 2/39
1/3 1/44 1/132 4/11
1/4 1/35 1/140 2/7
1/10 1/39 1/130 2/15
1/10 1/65 1/104 1/8
1/18 1/63 1/98 4/49
1/35 1/60 1/84 2/35
1/36 1/44 1/99 2/33
1/6 1/70 1/105 4/21
1/12 1/13 1/156 1/6
1/12 1/52 1/117 1/9
1/21 1/28 1/132 1/11
1/55 1/60 1/66 1/20
1/14 1/78 1/91 2/21
1/15 1/39 1/130 1/10
1/22 1/63 1/99 1/14
1/14 1/38 1/133 2/19
1/42 1/66 1/77 4/77
1/7 1/42 1/138 4/23
1/18 1/39 1/130 4/45
1/18 1/52 1/117 1/12
1/35 1/40 1/112 1/16
1/35 1/63 1/90 1/18
1/13 1/20 1/156 2/15
1/20 1/39 1/130 1/12
1/21 1/78 1/91 1/14
1/11 1/70 1/110 4/35
1/15 1/66 1/110 1/11
1/22 1/26 1/143 1/11
1/44 1/70 1/77 1/20
1/55 1/66 1/70 1/21
1/56 1/63 1/72 1/21
1/13 1/24 1/156 1/8
1/18 1/85 1/90 4/51
1/24 1/65 1/104 1/15
1/33 1/72 1/88 1/18
1/5 1/72 1/120 2/9
1/28 1/52 1/117 4/63
1/42 1/50 1/105 4/75
1/3 1/42 1/154 4/11
1/7 1/24 1/168 4/21
1/10 1/90 1/99 4/33
1/24 1/40 1/135 2/27
1/30 1/39 1/130 1/15
1/30 1/78 1/91 2/35
1/5 1/70 1/126 2/9
1/55 1/70 1/77 1/22
1/9 1/70 1/126 2/15
1/13 1/36 1/156 1/9
1/36 1/52 1/117 1/18
1/44 1/77 1/84 1/21
1/7 1/60 1/140 1/6
1/11 1/42 1/154 4/33
1/5 1/34 1/170 4/17
1/9 1/20 1/180 1/6
1/13 1/14 1/182 2/13
1/20 1/84 1/105 1/14
1/40 1/65 1/104 1/20
1/60 1/65 1/84 4/91
1/11 1/90 1/110 1/9
1/15 1/70 1/126 4/45
1/22 1/90 1/99 1/15
1/35 1/36 1/140 4/63
1/39 1/42 1/130 2/35
1/42 1/78 1/91 1/21
1/55 1/66 1/90 2/45
1/39 1/45 1/130 1/18
1/45 1/52 1/117 1/20
1/8 1/23 1/184 4/23
1/28 1/68 1/119 1/17
1/39 1/50 1/130 4/75
1/21 1/60 1/140 1/14
1/36 1/45 1/140 2/35
1/33 1/88 1/104 2/39
1/56 1/78 1/91 1/24
1/2 1/15 1/210 4/7
1/35 1/80 1/112 1/20
1/13 1/60 1/156 1/10
1/21 1/28 1/180 4/45
1/24 1/40 1/165 4/55
1/33 1/42 1/154 2/33
1/39 1/60 1/130 1/20
1/52 1/60 1/117 2/45
1/60 1/65 1/104 1/24
1/8 1/105 1/120 1/7
1/14 1/39 1/182 4/39
1/26 1/66 1/143 2/33
1/55 1/66 1/114 4/95
1/14 1/15 1/210 1/7
1/14 1/35 1/190 2/19
1/30 1/95 1/114 1/19
1/39 1/70 1/130 1/21
1/50 1/75 1/114 4/95
1/70 1/78 1/91 4/105
1/10 1/66 1/165 4/33
1/33 1/88 1/120 1/20
1/45 1/70 1/126 2/45
1/52 1/72 1/117 1/24
1/55 1/66 1/120 1/24
1/4 1/108 1/135 4/15
1/5 1/22 1/220 1/4
1/7 1/100 1/140 4/25
1/22 1/99 1/126 4/63
1/55 1/72 1/120 4/99
1/4 1/105 1/140 4/15
1/7 1/54 1/189 1/6
1/6 1/35 1/210 1/5
1/8 1/27 1/216 1/6
1/26 1/30 1/195 1/13
1/30 1/51 1/170 1/17
1/35 1/90 1/126 1/21
1/55 1/70 1/126 4/99
1/56 1/91 1/104 1/26
1/8 1/56 1/189 4/27
1/10 1/18 1/225 4/25
1/10 1/90 1/153 2/17
1/13 1/84 1/156 2/21
1/28 1/45 1/180 4/63
1/78 1/84 1/91 1/28
1/11 1/14 1/231 1/6
1/12 1/105 1/140 1/10
1/14 1/54 1/189 2/21
1/15 1/110 1/132 1/12
1/65 1/88 1/104 2/55
1/70 1/77 1/110 2/55
1/3 1/16 1/240 2/5
1/39 1/90 1/130 2/45
1/5 1/16 1/240 4/15
1/11 1/21 1/231 1/7
1/18 1/35 1/210 4/45
1/18 1/63 1/182 1/13
1/20 1/63 1/180 1/14
1/20 1/108 1/135 1/15
1/21 1/77 1/165 1/15
1/22 1/45 1/198 4/55
1/22 1/99 1/144 1/16
1/14 1/22 1/231 4/33
1/18 1/25 1/225 1/10
1/26 1/99 1/143 1/18
1/9 1/26 1/234 2/13
1/13 1/48 1/208 4/39
1/24 1/77 1/168 2/33
1/44 1/60 1/165 1/22
1/45 1/80 1/144 1/24
1/15 1/16 1/240 2/15
1/15 1/96 1/160 1/12
1/21 1/75 1/175 1/15
1/28 1/63 1/180 2/35
1/55 1/66 1/150 1/25
1/78 1/91 1/102 4/119
1/78 1/91 1/105 1/30
1/16 1/21 1/240 4/35
1/21 1/32 1/224 1/12
1/21 1/112 1/144 4/63
1/34 1/90 1/153 4/85
1/35 1/77 1/165 1/21
1/52 1/108 1/117 1/27
1/70 1/102 1/105 4/119
1/35 1/63 1/180 1/20
1/6 1/110 1/165 2/11
1/36 1/105 1/140 2/45
1/56 1/105 1/120 1/28
1/60 1/65 1/156 1/26
1/27 1/40 1/216 1/15
1/39 1/114 1/130 4/95
1/40 1/108 1/135 1/24
1/12 1/15 1/260 2/13
1/40 1/95 1/152 4/95
1/44 1/45 1/198 1/20
1/33 1/88 1/168 1/21
1/39 1/120 1/130 1/24
1/44 1/77 1/168 1/24
1/65 1/104 1/120 1/30
1/16 1/35 1/240 2/21
1/35 1/112 1/144 2/45
1/55 1/66 1/170 2/51
1/45 1/117 1/130 1/26
1/4 1/85 1/204 4/15
1/18 1/50 1/225 2/25
1/68 1/85 1/140 4/119
1/6 1/34 1/255 1/5
1/6 1/51 1/238 4/21
1/6 1/102 1/187 2/11
1/39 1/48 1/208 2/39
1/42 1/99 1/154 4/99
1/52 1/117 1/126 1/28
1/78 1/91 1/126 2/63
1/7 1/51 1/238 1/6
1/9 1/136 1/153 1/8
1/45 1/55 1/198 1/22
1/10 1/34 1/255 2/15
1/10 1/119 1/170 4/35
1/12 1/123 1/164 4/41
1/20 1/124 1/155 2/31
1/33 1/57 1/209 1/19
1/54 1/56 1/189 1/24
1/90 1/99 1/110 1/33
1/12 1/68 1/221 4/39
1/12 1/85 1/204 1/10
1/13 1/132 1/156 1/11
1/16 1/45 1/240 4/45
1/45 1/80 1/176 4/99
1/45 1/112 1/144 4/105
1/60 1/77 1/165 1/28
1/14 1/51 1/238 2/21
1/42 1/58 1/203 4/87
1/15 1/34 1/255 1/10
1/15 1/85 1/204 1/12
1/11 1/63 1/231 1/9
1/16 1/17 1/272 1/8
1/60 1/84 1/161 4/115
1/18 1/34 1/255 4/45
1/20 1/34 1/255 1/12
1/20 1/85 1/204 1/15
1/21 1/51 1/238 1/14
1/11 1/110 1/190 2/19
1/14 1/66 1/231 1/11
1/22 1/102 1/187 2/33
1/35 1/115 1/161 1/23
1/55 1/80 1/176 2/55
1/56 1/119 1/136 4/119
1/70 1/77 1/165 1/30
1/24 1/136 1/153 1/18
1/54 1/70 1/189 4/105
1/63 1/70 1/180 1/28
1/70 1/117 1/126 2/65
1/55 1/66 1/195 1/26
1/28 1/119 1/170 1/20
1/42 1/65 1/210 4/91
1/42 1/105 1/170 2/51
1/44 1/77 1/196 2/49
1/56 1/72 1/189 1/27
1/30 1/34 1/255 1/15
1/30 1/51 1/238 2/35
1/30 1/85 1/204 1/20
1/30 1/119 1/170 1/21
1/39 1/130 1/150 1/25
1/63 1/112 1/144 2/63
1/33 1/102 1/187 1/22
1/15 1/98 1/210 4/49
1/26 1/143 1/154 4/77
1/48 1/80 1/195 1/26
1/63 1/78 1/182 4/117
1/78 1/91 1/154 1/33
1/21 1/28 1/276 2/23
1/36 1/85 1/204 2/45
1/36 1/136 1/153 1/24
1/85 1/90 1/153 1/34
1/5 1/54 1/270 2/9
1/9 1/72 1/248 4/31
1/10 1/29 1/290 4/29
1/40 1/85 1/204 1/24
1/65 1/104 1/160 1/32
1/16 1/75 1/240 2/25
1/30 1/70 1/231 4/77
1/34 1/42 1/255 2/35
1/42 1/51 1/238 1/21
1/42 1/119 1/170 4/105
1/55 1/66 1/210 4/105
1/70 1/126 1/135 4/135
1/77 1/88 1/168 1/33
1/34 1/45 1/255 1/18
1/36 1/92 1/207 1/23
1/88 1/104 1/143 4/143
1/12 1/65 1/260 4/39
1/17 1/48 1/272 1/12
1/84 1/92 1/161 2/69
1/34 1/50 1/255 4/75
1/39 1/130 1/170 2/51
1/16 1/85 1/240 4/51
1/17 1/18 1/306 2/17
1/21 1/96 1/224 1/16
1/52 1/68 1/221 1/26
1/100 1/108 1/135 2/75
1/55 1/102 1/187 1/30
1/51 1/56 1/238 1/24
1/56 1/136 1/153 2/63
1/9 1/104 1/234 1/8
1/27 1/104 1/216 2/39
1/77 1/105 1/165 1/35
1/102 1/119 1/126 4/153
1/6 1/49 1/294 4/21
1/13 1/156 1/180 4/45
1/24 1/40 1/285 4/57
1/30 1/145 1/174 4/87
1/34 1/60 1/255 1/20
1/52 1/117 1/180 1/30
1/60 1/85 1/204 1/30
1/10 1/98 1/245 4/35
1/15 1/78 1/260 1/12
1/33 1/56 1/264 4/77
1/33 1/88 1/232 4/87
1/45 1/110 1/198 2/55
1/78 1/110 1/165 4/143
1/12 1/147 1/196 2/21
1/66 1/102 1/187 1/33
1/99 1/112 1/144 2/77
1/8 1/39 1/312 2/13
1/9 1/35 1/315 1/7
1/21 1/65 1/273 1/15
1/34 1/70 1/255 1/21
1/35 1/90 1/234 4/91
1/35 1/114 1/210 4/95
1/51 1/70 1/238 4/105
1/70 1/119 1/170 1/35
1/99 1/117 1/143 1/39
1/42 1/154 1/165 2/55
1/72 1/136 1/153 1/36
1/20 1/28 1/315 4/45
P.S. The program was stopped before it reached the programmed limit.
Edited on February 13, 2015, 3:21 pm
|
Posted by Charlie
on 2015-02-13 15:20:11 |