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

 How about 138? (Posted on 2018-05-10)
Let us define a sequence S(N): a1= N,
an= sum of all factors of an-1, excluding an-1 itself. Most sequences either converge or begin to repeat.

S(12) → 12,16,15,9,4,3,1,1,1...
S(6) → 6,6,6,6,...
S(220) → 220,284,220,284,220,284,...
Try to evaluate S(50), S(80), S(99).

WILL IT CONVERGE TO 1,1,1,...?

 No Solution Yet Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution | Comment 1 of 4
Below is a list of all the sequences for n through 300 except for n=276, whose sequence includes numbers that exceed the capacity of visual basic (needed more than 15 digits).

Using the list to answer the questions:

S(50) = 50, 43, 1, 1, ...
S(80) = 80, 106, 56, 64, 63, 41, 1, 1, ...
S(99) = 99, 57, 23, 1, 1, ...

S(138) does in fact converge to 1,1,...:

138, 150, 222, 234, 312, 528, 960, 2088, 3762, 5598, 6570, 10746, 13254, 13830, 19434, 20886, 21606, 25098, 26742, 26754, 40446, 63234, 77406, 110754, 171486, 253458, 295740, 647748, 1077612, 1467588, 1956812, 2109796, 1889486, 953914, 668966, 353578, 176792, 254128, 308832, 502104, 753216, 1240176, 2422288, 2697920, 3727264, 3655076, 2760844, 2100740, 2310856, 2455544, 3212776, 3751064, 3282196, 2723020, 3035684, 2299240, 2988440, 5297320, 8325080, 11222920, 15359480, 19199440, 28875608, 25266172, 19406148, 26552604, 40541052, 54202884, 72270540, 147793668, 228408732, 348957876, 508132204, 404465636, 303708376, 290504024, 312058216, 294959384, 290622016, 286081174, 151737434, 75868720, 108199856, 101437396, 76247552, 76099654, 42387146, 21679318, 12752594, 7278382, 3660794, 1855066, 927536, 932464, 1013592, 1546008, 2425752, 5084088, 8436192, 13709064, 20563656, 33082104, 57142536, 99483384, 245978376, 487384824, 745600776, 1118401224, 1677601896, 2538372504, 4119772776, 8030724504, 14097017496, 21148436904, 40381357656, 60572036544, 100039354704, 179931895322, 94685963278, 51399021218, 28358080762, 18046051430, 17396081338, 8698040672, 8426226964, 6319670230, 5422685354, 3217383766, 1739126474, 996366646, 636221402, 318217798, 195756362, 101900794, 54202694, 49799866, 24930374, 17971642, 11130830, 8904682, 4913018, 3126502, 1574810, 1473382, 736694, 541162, 312470, 249994, 127286, 69898, 34952, 34708, 26038, 13994, 7000, 11720, 14740, 19532, 16588, 18692, 14026, 7016, 6154, 3674, 2374, 1190, 1402, 704, 820, 944, 916, 694, 350, 394, 200, 265, 59, 1, 1, ...

The prime numbers of course all immediately converge to 1,1,..., and the vast majority of the others do. I looked for more that converged, to, say 6,6,..., and found that 25 does so, as well as 95, 119 and 143, each of which do go through 25 on their way to 6,6.

28 also repeats immediately but at least within the limits of the list nothing else goes through 28. As to what happens to 276, that's anyone's guess; I think it gets bigger and bigger forever, based on some experiments using UBASIC, but making some guesses there as to whether certain numbers are prime. Also I don't know if anything goes through a cycle like that for 220 and 284.

1, 1, 1
2, 1, 1
3, 1, 1
4, 3, 1, 1
5, 1, 1
6, 6, 6
7, 1, 1
8, 7, 1, 1
9, 4, 3, 1, 1
10, 8, 7, 1, 1
11, 1, 1
12, 16, 15, 9, 4, 3, 1, 1
13, 1, 1
14, 10, 8, 7, 1, 1
15, 9, 4, 3, 1, 1
16, 15, 9, 4, 3, 1, 1
17, 1, 1
18, 21, 11, 1, 1
19, 1, 1
20, 22, 14, 10, 8, 7, 1, 1
21, 11, 1, 1
22, 14, 10, 8, 7, 1, 1
23, 1, 1
24, 36, 55, 17, 1, 1
25, 6, 6
26, 16, 15, 9, 4, 3, 1, 1
27, 13, 1, 1
28, 28, 28
29, 1, 1
30, 42, 54, 66, 78, 90, 144, 259, 45, 33, 15, 9, 4, 3, 1, 1
31, 1, 1
32, 31, 1, 1
33, 15, 9, 4, 3, 1, 1
34, 20, 22, 14, 10, 8, 7, 1, 1
35, 13, 1, 1
36, 55, 17, 1, 1
37, 1, 1
38, 22, 14, 10, 8, 7, 1, 1
39, 17, 1, 1
40, 50, 43, 1, 1
41, 1, 1
42, 54, 66, 78, 90, 144, 259, 45, 33, 15, 9, 4, 3, 1, 1
43, 1, 1
44, 40, 50, 43, 1, 1
45, 33, 15, 9, 4, 3, 1, 1
46, 26, 16, 15, 9, 4, 3, 1, 1
47, 1, 1
48, 76, 64, 63, 41, 1, 1
49, 8, 7, 1, 1
50, 43, 1, 1
51, 21, 11, 1, 1
52, 46, 26, 16, 15, 9, 4, 3, 1, 1
53, 1, 1
54, 66, 78, 90, 144, 259, 45, 33, 15, 9, 4, 3, 1, 1
55, 17, 1, 1
56, 64, 63, 41, 1, 1
57, 23, 1, 1
58, 32, 31, 1, 1
59, 1, 1
60, 108, 172, 136, 134, 70, 74, 40, 50, 43, 1, 1
61, 1, 1
62, 34, 20, 22, 14, 10, 8, 7, 1, 1
63, 41, 1, 1
64, 63, 41, 1, 1
65, 19, 1, 1
66, 78, 90, 144, 259, 45, 33, 15, 9, 4, 3, 1, 1
67, 1, 1
68, 58, 32, 31, 1, 1
69, 27, 13, 1, 1
70, 74, 40, 50, 43, 1, 1
71, 1, 1
72, 123, 45, 33, 15, 9, 4, 3, 1, 1
73, 1, 1
74, 40, 50, 43, 1, 1
75, 49, 8, 7, 1, 1
76, 64, 63, 41, 1, 1
77, 19, 1, 1
78, 90, 144, 259, 45, 33, 15, 9, 4, 3, 1, 1
79, 1, 1
80, 106, 56, 64, 63, 41, 1, 1
81, 40, 50, 43, 1, 1
82, 44, 40, 50, 43, 1, 1
83, 1, 1
84, 140, 196, 203, 37, 1, 1
85, 23, 1, 1
86, 46, 26, 16, 15, 9, 4, 3, 1, 1
87, 33, 15, 9, 4, 3, 1, 1
88, 92, 76, 64, 63, 41, 1, 1
89, 1, 1
90, 144, 259, 45, 33, 15, 9, 4, 3, 1, 1
91, 21, 11, 1, 1
92, 76, 64, 63, 41, 1, 1
93, 35, 13, 1, 1
94, 50, 43, 1, 1
95, 25, 6, 6
96, 156, 236, 184, 176, 196, 203, 37, 1, 1
97, 1, 1
98, 73, 1, 1
99, 57, 23, 1, 1
100, 117, 65, 19, 1, 1
101, 1, 1
102, 114, 126, 186, 198, 270, 450, 759, 393, 135, 105, 87, 33, 15, 9, 4, 3, 1, 1
103, 1, 1
104, 106, 56, 64, 63, 41, 1, 1
105, 87, 33, 15, 9, 4, 3, 1, 1
106, 56, 64, 63, 41, 1, 1
107, 1, 1
108, 172, 136, 134, 70, 74, 40, 50, 43, 1, 1
109, 1, 1
110, 106, 56, 64, 63, 41, 1, 1
111, 41, 1, 1
112, 136, 134, 70, 74, 40, 50, 43, 1, 1
113, 1, 1
114, 126, 186, 198, 270, 450, 759, 393, 135, 105, 87, 33, 15, 9, 4, 3, 1, 1
115, 29, 1, 1
116, 94, 50, 43, 1, 1
117, 65, 19, 1, 1
118, 62, 34, 20, 22, 14, 10, 8, 7, 1, 1
119, 25, 6, 6
120, 240, 504, 1056, 1968, 3240, 7650, 14112, 32571, 27333, 12161, 1, 1
121, 12, 16, 15, 9, 4, 3, 1, 1
122, 64, 63, 41, 1, 1
123, 45, 33, 15, 9, 4, 3, 1, 1
124, 100, 117, 65, 19, 1, 1
125, 31, 1, 1
126, 186, 198, 270, 450, 759, 393, 135, 105, 87, 33, 15, 9, 4, 3, 1, 1
127, 1, 1
128, 127, 1, 1
129, 47, 1, 1
130, 122, 64, 63, 41, 1, 1
131, 1, 1
132, 204, 300, 568, 512, 511, 81, 40, 50, 43, 1, 1
133, 27, 13, 1, 1
134, 70, 74, 40, 50, 43, 1, 1
135, 105, 87, 33, 15, 9, 4, 3, 1, 1
136, 134, 70, 74, 40, 50, 43, 1, 1
137, 1, 1
138, 150, 222, 234, 312, 528, 960, 2088, 3762, 5598, 6570, 10746, 13254, 13830, 19434, 20886, 21606, 25098, 26742, 26754, 40446, 63234, 77406, 110754, 171486, 253458, 295740, 647748, 1077612, 1467588, 1956812, 2109796, 1889486, 953914, 668966, 353578, 176792, 254128, 308832, 502104, 753216, 1240176, 2422288, 2697920, 3727264, 3655076, 2760844, 2100740, 2310856, 2455544, 3212776, 3751064, 3282196, 2723020, 3035684, 2299240, 2988440, 5297320, 8325080, 11222920, 15359480, 19199440, 28875608, 25266172, 19406148, 26552604, 40541052, 54202884, 72270540, 147793668, 228408732, 348957876, 508132204, 404465636, 303708376, 290504024, 312058216, 294959384, 290622016, 286081174, 151737434, 75868720, 108199856, 101437396, 76247552, 76099654, 42387146, 21679318, 12752594, 7278382, 3660794, 1855066, 927536, 932464, 1013592, 1546008, 2425752, 5084088, 8436192, 13709064, 20563656, 33082104, 57142536, 99483384, 245978376, 487384824, 745600776, 1118401224, 1677601896, 2538372504, 4119772776, 8030724504, 14097017496, 21148436904, 40381357656, 60572036544, 100039354704, 179931895322, 94685963278, 51399021218, 28358080762, 18046051430, 17396081338, 8698040672, 8426226964, 6319670230, 5422685354, 3217383766, 1739126474, 996366646, 636221402, 318217798, 195756362, 101900794, 54202694, 49799866, 24930374, 17971642, 11130830, 8904682, 4913018, 3126502, 1574810, 1473382, 736694, 541162, 312470, 249994, 127286, 69898, 34952, 34708, 26038, 13994, 7000, 11720, 14740, 19532, 16588, 18692, 14026, 7016, 6154, 3674, 2374, 1190, 1402, 704, 820, 944, 916, 694, 350, 394, 200, 265, 59, 1, 1
139, 1, 1
140, 196, 203, 37, 1, 1
141, 51, 21, 11, 1, 1
142, 74, 40, 50, 43, 1, 1
143, 25, 6, 6
144, 259, 45, 33, 15, 9, 4, 3, 1, 1
145, 35, 13, 1, 1
146, 76, 64, 63, 41, 1, 1
147, 81, 40, 50, 43, 1, 1
148, 118, 62, 34, 20, 22, 14, 10, 8, 7, 1, 1
149, 1, 1
150, 222, 234, 312, 528, 960, 2088, 3762, 5598, 6570, 10746, 13254, 13830, 19434, 20886, 21606, 25098, 26742, 26754, 40446, 63234, 77406, 110754, 171486, 253458, 295740, 647748, 1077612, 1467588, 1956812, 2109796, 1889486, 953914, 668966, 353578, 176792, 254128, 308832, 502104, 753216, 1240176, 2422288, 2697920, 3727264, 3655076, 2760844, 2100740, 2310856, 2455544, 3212776, 3751064, 3282196, 2723020, 3035684, 2299240, 2988440, 5297320, 8325080, 11222920, 15359480, 19199440, 28875608, 25266172, 19406148, 26552604, 40541052, 54202884, 72270540, 147793668, 228408732, 348957876, 508132204, 404465636, 303708376, 290504024, 312058216, 294959384, 290622016, 286081174, 151737434, 75868720, 108199856, 101437396, 76247552, 76099654, 42387146, 21679318, 12752594, 7278382, 3660794, 1855066, 927536, 932464, 1013592, 1546008, 2425752, 5084088, 8436192, 13709064, 20563656, 33082104, 57142536, 99483384, 245978376, 487384824, 745600776, 1118401224, 1677601896, 2538372504, 4119772776, 8030724504, 14097017496, 21148436904, 40381357656, 60572036544, 100039354704, 179931895322, 94685963278, 51399021218, 28358080762, 18046051430, 17396081338, 8698040672, 8426226964, 6319670230, 5422685354, 3217383766, 1739126474, 996366646, 636221402, 318217798, 195756362, 101900794, 54202694, 49799866, 24930374, 17971642, 11130830, 8904682, 4913018, 3126502, 1574810, 1473382, 736694, 541162, 312470, 249994, 127286, 69898, 34952, 34708, 26038, 13994, 7000, 11720, 14740, 19532, 16588, 18692, 14026, 7016, 6154, 3674, 2374, 1190, 1402, 704, 820, 944, 916, 694, 350, 394, 200, 265, 59, 1, 1
151, 1, 1
152, 148, 118, 62, 34, 20, 22, 14, 10, 8, 7, 1, 1
153, 81, 40, 50, 43, 1, 1
154, 134, 70, 74, 40, 50, 43, 1, 1
155, 37, 1, 1
156, 236, 184, 176, 196, 203, 37, 1, 1
157, 1, 1
158, 82, 44, 40, 50, 43, 1, 1
159, 57, 23, 1, 1
160, 218, 112, 136, 134, 70, 74, 40, 50, 43, 1, 1
161, 31, 1, 1
162, 201, 71, 1, 1
163, 1, 1
164, 130, 122, 64, 63, 41, 1, 1
165, 123, 45, 33, 15, 9, 4, 3, 1, 1
166, 86, 46, 26, 16, 15, 9, 4, 3, 1, 1
167, 1, 1
168, 312, 528, 960, 2088, 3762, 5598, 6570, 10746, 13254, 13830, 19434, 20886, 21606, 25098, 26742, 26754, 40446, 63234, 77406, 110754, 171486, 253458, 295740, 647748, 1077612, 1467588, 1956812, 2109796, 1889486, 953914, 668966, 353578, 176792, 254128, 308832, 502104, 753216, 1240176, 2422288, 2697920, 3727264, 3655076, 2760844, 2100740, 2310856, 2455544, 3212776, 3751064, 3282196, 2723020, 3035684, 2299240, 2988440, 5297320, 8325080, 11222920, 15359480, 19199440, 28875608, 25266172, 19406148, 26552604, 40541052, 54202884, 72270540, 147793668, 228408732, 348957876, 508132204, 404465636, 303708376, 290504024, 312058216, 294959384, 290622016, 286081174, 151737434, 75868720, 108199856, 101437396, 76247552, 76099654, 42387146, 21679318, 12752594, 7278382, 3660794, 1855066, 927536, 932464, 1013592, 1546008, 2425752, 5084088, 8436192, 13709064, 20563656, 33082104, 57142536, 99483384, 245978376, 487384824, 745600776, 1118401224, 1677601896, 2538372504, 4119772776, 8030724504, 14097017496, 21148436904, 40381357656, 60572036544, 100039354704, 179931895322, 94685963278, 51399021218, 28358080762, 18046051430, 17396081338, 8698040672, 8426226964, 6319670230, 5422685354, 3217383766, 1739126474, 996366646, 636221402, 318217798, 195756362, 101900794, 54202694, 49799866, 24930374, 17971642, 11130830, 8904682, 4913018, 3126502, 1574810, 1473382, 736694, 541162, 312470, 249994, 127286, 69898, 34952, 34708, 26038, 13994, 7000, 11720, 14740, 19532, 16588, 18692, 14026, 7016, 6154, 3674, 2374, 1190, 1402, 704, 820, 944, 916, 694, 350, 394, 200, 265, 59, 1, 1
169, 14, 10, 8, 7, 1, 1
170, 154, 134, 70, 74, 40, 50, 43, 1, 1
171, 89, 1, 1
172, 136, 134, 70, 74, 40, 50, 43, 1, 1
173, 1, 1
174, 186, 198, 270, 450, 759, 393, 135, 105, 87, 33, 15, 9, 4, 3, 1, 1
175, 73, 1, 1
176, 196, 203, 37, 1, 1
177, 63, 41, 1, 1
178, 92, 76, 64, 63, 41, 1, 1
179, 1, 1
180, 366, 378, 582, 594, 846, 1026, 1374, 1386, 2358, 2790, 4698, 6192, 11540, 12736, 12664, 11096, 11104, 10820, 11944, 10466, 5236, 6860, 9940, 14252, 14308, 15218, 10894, 6746, 3376, 3196, 2852, 2524, 1900, 2440, 3140, 3496, 3704, 3256, 3584, 4600, 6560, 9316, 8072, 7078, 3542, 3370, 2714, 1606, 1058, 601, 1, 1
181, 1, 1
182, 154, 134, 70, 74, 40, 50, 43, 1, 1
183, 65, 19, 1, 1
184, 176, 196, 203, 37, 1, 1
185, 43, 1, 1
186, 198, 270, 450, 759, 393, 135, 105, 87, 33, 15, 9, 4, 3, 1, 1
187, 29, 1, 1
188, 148, 118, 62, 34, 20, 22, 14, 10, 8, 7, 1, 1
189, 131, 1, 1
190, 170, 154, 134, 70, 74, 40, 50, 43, 1, 1
191, 1, 1
192, 316, 244, 190, 170, 154, 134, 70, 74, 40, 50, 43, 1, 1
193, 1, 1
194, 100, 117, 65, 19, 1, 1
195, 141, 51, 21, 11, 1, 1
196, 203, 37, 1, 1
197, 1, 1
198, 270, 450, 759, 393, 135, 105, 87, 33, 15, 9, 4, 3, 1, 1
199, 1, 1
200, 265, 59, 1, 1
201, 71, 1, 1
202, 104, 106, 56, 64, 63, 41, 1, 1
203, 37, 1, 1
204, 300, 568, 512, 511, 81, 40, 50, 43, 1, 1
205, 47, 1, 1
206, 106, 56, 64, 63, 41, 1, 1
207, 105, 87, 33, 15, 9, 4, 3, 1, 1
208, 226, 116, 94, 50, 43, 1, 1
209, 31, 1, 1
210, 366, 378, 582, 594, 846, 1026, 1374, 1386, 2358, 2790, 4698, 6192, 11540, 12736, 12664, 11096, 11104, 10820, 11944, 10466, 5236, 6860, 9940, 14252, 14308, 15218, 10894, 6746, 3376, 3196, 2852, 2524, 1900, 2440, 3140, 3496, 3704, 3256, 3584, 4600, 6560, 9316, 8072, 7078, 3542, 3370, 2714, 1606, 1058, 601, 1, 1
211, 1, 1
212, 166, 86, 46, 26, 16, 15, 9, 4, 3, 1, 1
213, 75, 49, 8, 7, 1, 1
214, 110, 106, 56, 64, 63, 41, 1, 1
215, 49, 8, 7, 1, 1
216, 384, 636, 876, 1196, 1156, 993, 335, 73, 1, 1
217, 39, 17, 1, 1
218, 112, 136, 134, 70, 74, 40, 50, 43, 1, 1
219, 77, 19, 1, 1
220, 284, 220, 284
221, 31, 1, 1
222, 234, 312, 528, 960, 2088, 3762, 5598, 6570, 10746, 13254, 13830, 19434, 20886, 21606, 25098, 26742, 26754, 40446, 63234, 77406, 110754, 171486, 253458, 295740, 647748, 1077612, 1467588, 1956812, 2109796, 1889486, 953914, 668966, 353578, 176792, 254128, 308832, 502104, 753216, 1240176, 2422288, 2697920, 3727264, 3655076, 2760844, 2100740, 2310856, 2455544, 3212776, 3751064, 3282196, 2723020, 3035684, 2299240, 2988440, 5297320, 8325080, 11222920, 15359480, 19199440, 28875608, 25266172, 19406148, 26552604, 40541052, 54202884, 72270540, 147793668, 228408732, 348957876, 508132204, 404465636, 303708376, 290504024, 312058216, 294959384, 290622016, 286081174, 151737434, 75868720, 108199856, 101437396, 76247552, 76099654, 42387146, 21679318, 12752594, 7278382, 3660794, 1855066, 927536, 932464, 1013592, 1546008, 2425752, 5084088, 8436192, 13709064, 20563656, 33082104, 57142536, 99483384, 245978376, 487384824, 745600776, 1118401224, 1677601896, 2538372504, 4119772776, 8030724504, 14097017496, 21148436904, 40381357656, 60572036544, 100039354704, 179931895322, 94685963278, 51399021218, 28358080762, 18046051430, 17396081338, 8698040672, 8426226964, 6319670230, 5422685354, 3217383766, 1739126474, 996366646, 636221402, 318217798, 195756362, 101900794, 54202694, 49799866, 24930374, 17971642, 11130830, 8904682, 4913018, 3126502, 1574810, 1473382, 736694, 541162, 312470, 249994, 127286, 69898, 34952, 34708, 26038, 13994, 7000, 11720, 14740, 19532, 16588, 18692, 14026, 7016, 6154, 3674, 2374, 1190, 1402, 704, 820, 944, 916, 694, 350, 394, 200, 265, 59, 1, 1
223, 1, 1
224, 280, 440, 640, 890, 730, 602, 454, 230, 202, 104, 106, 56, 64, 63, 41, 1, 1
225, 178, 92, 76, 64, 63, 41, 1, 1
226, 116, 94, 50, 43, 1, 1
227, 1, 1
228, 332, 256, 255, 177, 63, 41, 1, 1
229, 1, 1
230, 202, 104, 106, 56, 64, 63, 41, 1, 1
231, 153, 81, 40, 50, 43, 1, 1
232, 218, 112, 136, 134, 70, 74, 40, 50, 43, 1, 1
233, 1, 1
234, 312, 528, 960, 2088, 3762, 5598, 6570, 10746, 13254, 13830, 19434, 20886, 21606, 25098, 26742, 26754, 40446, 63234, 77406, 110754, 171486, 253458, 295740, 647748, 1077612, 1467588, 1956812, 2109796, 1889486, 953914, 668966, 353578, 176792, 254128, 308832, 502104, 753216, 1240176, 2422288, 2697920, 3727264, 3655076, 2760844, 2100740, 2310856, 2455544, 3212776, 3751064, 3282196, 2723020, 3035684, 2299240, 2988440, 5297320, 8325080, 11222920, 15359480, 19199440, 28875608, 25266172, 19406148, 26552604, 40541052, 54202884, 72270540, 147793668, 228408732, 348957876, 508132204, 404465636, 303708376, 290504024, 312058216, 294959384, 290622016, 286081174, 151737434, 75868720, 108199856, 101437396, 76247552, 76099654, 42387146, 21679318, 12752594, 7278382, 3660794, 1855066, 927536, 932464, 1013592, 1546008, 2425752, 5084088, 8436192, 13709064, 20563656, 33082104, 57142536, 99483384, 245978376, 487384824, 745600776, 1118401224, 1677601896, 2538372504, 4119772776, 8030724504, 14097017496, 21148436904, 40381357656, 60572036544, 100039354704, 179931895322, 94685963278, 51399021218, 28358080762, 18046051430, 17396081338, 8698040672, 8426226964, 6319670230, 5422685354, 3217383766, 1739126474, 996366646, 636221402, 318217798, 195756362, 101900794, 54202694, 49799866, 24930374, 17971642, 11130830, 8904682, 4913018, 3126502, 1574810, 1473382, 736694, 541162, 312470, 249994, 127286, 69898, 34952, 34708, 26038, 13994, 7000, 11720, 14740, 19532, 16588, 18692, 14026, 7016, 6154, 3674, 2374, 1190, 1402, 704, 820, 944, 916, 694, 350, 394, 200, 265, 59, 1, 1
235, 53, 1, 1
236, 184, 176, 196, 203, 37, 1, 1
237, 83, 1, 1
238, 194, 100, 117, 65, 19, 1, 1
239, 1, 1
240, 504, 1056, 1968, 3240, 7650, 14112, 32571, 27333, 12161, 1, 1
241, 1, 1
242, 157, 1, 1
243, 121, 12, 16, 15, 9, 4, 3, 1, 1
244, 190, 170, 154, 134, 70, 74, 40, 50, 43, 1, 1
245, 97, 1, 1
246, 258, 270, 450, 759, 393, 135, 105, 87, 33, 15, 9, 4, 3, 1, 1
247, 33, 15, 9, 4, 3, 1, 1
248, 232, 218, 112, 136, 134, 70, 74, 40, 50, 43, 1, 1
249, 87, 33, 15, 9, 4, 3, 1, 1
250, 218, 112, 136, 134, 70, 74, 40, 50, 43, 1, 1
251, 1, 1
252, 476, 532, 588, 1008, 2216, 1954, 980, 1414, 1034, 694, 350, 394, 200, 265, 59, 1, 1
253, 35, 13, 1, 1
254, 130, 122, 64, 63, 41, 1, 1
255, 177, 63, 41, 1, 1
256, 255, 177, 63, 41, 1, 1
257, 1, 1
258, 270, 450, 759, 393, 135, 105, 87, 33, 15, 9, 4, 3, 1, 1
259, 45, 33, 15, 9, 4, 3, 1, 1
260, 328, 302, 154, 134, 70, 74, 40, 50, 43, 1, 1
261, 129, 47, 1, 1
262, 134, 70, 74, 40, 50, 43, 1, 1
263, 1, 1
264, 456, 744, 1176, 2244, 3804, 5100, 10524, 14060, 17860, 22460, 24748, 20612, 15466, 11894, 6946, 3998, 2002, 2030, 2290, 1850, 1684, 1270, 1034, 694, 350, 394, 200, 265, 59, 1, 1
265, 59, 1, 1
266, 214, 110, 106, 56, 64, 63, 41, 1, 1
267, 93, 35, 13, 1, 1
268, 208, 226, 116, 94, 50, 43, 1, 1
269, 1, 1
270, 450, 759, 393, 135, 105, 87, 33, 15, 9, 4, 3, 1, 1
271, 1, 1
272, 286, 218, 112, 136, 134, 70, 74, 40, 50, 43, 1, 1
273, 175, 73, 1, 1
274, 140, 196, 203, 37, 1, 1
275, 97, 1, 1
276, 396, 696, 1104, 1872, 3770, 3790, 3050, 2716, 2772, 5964, 10164, 19628, 19684, 22876, 26404, 30044, 33796, 38780, 54628, 54684, 111300, 263676, 465668, 465724, 465780, 1026060, 2325540, 5335260, 11738916, 23117724, 45956820, 121129260, 266485716, 558454764, 1092873236, 1470806764, 1471882804, 1642613196, 2737688884, 2740114636, 2791337780, 4946860492, 4946860548, 9344070652, 9344070708, 15573451404, 27078171764, 27284104204, 27410152084, 27410152140, 76787720100, 220578719452, 254903331620, 361672366300, 603062136740, 921203207260, 1381419996068, 1395444575644, 1395478688996, 1395546402460, 2069258468900, 3065057872156, 3277068463844, 3429776547484, 3597527970596, 4028517592540, 5641400009252, 5641400009308, 5641400009364, 9709348326636, 16331909651988, 31948891146732, 54770416120644, 100509779504316, 208751080955844, 388416032284476, 749365894850244,*****
277, 1, 1
278, 142, 74, 40, 50, 43, 1, 1
279, 137, 1, 1
280, 440, 640, 890, 730, 602, 454, 230, 202, 104, 106, 56, 64, 63, 41, 1, 1
281, 1, 1
282, 294, 390, 618, 630, 1242, 1638, 2730, 5334, 6954, 7926, 7938, 12753, 7267, 785, 163, 1, 1
283, 1, 1
284, 220, 284, 220
285, 195, 141, 51, 21, 11, 1, 1
286, 218, 112, 136, 134, 70, 74, 40, 50, 43, 1, 1
287, 49, 8, 7, 1, 1
288, 531, 249, 87, 33, 15, 9, 4, 3, 1, 1
289, 18, 21, 11, 1, 1
290, 250, 218, 112, 136, 134, 70, 74, 40, 50, 43, 1, 1
291, 101, 1, 1
292, 226, 116, 94, 50, 43, 1, 1
293, 1, 1
294, 390, 618, 630, 1242, 1638, 2730, 5334, 6954, 7926, 7938, 12753, 7267, 785, 163, 1, 1
295, 65, 19, 1, 1
296, 274, 140, 196, 203, 37, 1, 1
297, 183, 65, 19, 1, 1
298, 152, 148, 118, 62, 34, 20, 22, 14, 10, 8, 7, 1, 1
299, 37, 1, 1
300, 568, 512, 511, 81, 40, 50, 43, 1, 1

DefDbl A-Z
Dim crlf\$, fct(20, 1), f, tot, prod, n2

Form1.Visible = True
Text1.Text = ""
crlf = Chr(13) + Chr(10)

For n = 1 To 300
s\$ = LTrim(Str(n)) + ","
n2 = n
Do
If n2 = 1 Then
tot = 1
Else
f = factor(n2): tot = 0: prod = 1: rpt = 0
End If
n2 = tot: sa\$ = Str(n2)
If InStr(s, sa + ",") > 0 Then rpt = 1
If Len(sa) > 16 Then
s = s + "*****"
rpt = 1
Else
s = s + sa
End If
If rpt = 0 Then s = s + ","
DoEvents
Loop Until rpt
Text1.Text = Text1.Text & s & crlf
Next n

Text1.Text = Text1.Text & crlf & " done"

End Sub

For i = 0 To fct(wh, 1)
DoEvents
saveProd = prod
prod = prod * fct(wh, 0) ^ i
If wh = f Then
If prod <> n2 Then
tot = tot + prod
End If
Else

End If
prod = saveProd
Next i
End Sub

Function factor(num)
diffCt = 0: good = 1
n = Abs(num): If n > 0 Then limit = Sqr(n) Else limit = 0
If limit <> Int(limit) Then limit = Int(limit + 1)
dv = 2: GoSub DivideIt
dv = 3: GoSub DivideIt
dv = 5: GoSub DivideIt
dv = 7
Do Until dv > limit
GoSub DivideIt: dv = dv + 4 '11
GoSub DivideIt: dv = dv + 2 '13
GoSub DivideIt: dv = dv + 4 '17
GoSub DivideIt: dv = dv + 2 '19
GoSub DivideIt: dv = dv + 4 '23
GoSub DivideIt: dv = dv + 6 '29
GoSub DivideIt: dv = dv + 2 '31
GoSub DivideIt: dv = dv + 6 '37
If INKEY\$ = Chr\$(27) Then s\$ = Chr\$(27): Exit Function
Loop
If n > 1 Then diffCt = diffCt + 1: fct(diffCt, 0) = n: fct(diffCt, 1) = 1
factor = diffCt
Exit Function

DivideIt:
cnt = 0
Do
q = Int(n / dv)
If q * dv = n And n > 0 Then
n = q: cnt = cnt + 1: If n > 0 Then limit = Sqr(n) Else limit = 0
If limit <> Int(limit) Then limit = Int(limit + 1)
Else
Exit Do
End If
Loop
If cnt > 0 Then
diffCt = diffCt + 1
fct(diffCt, 0) = dv
fct(diffCt, 1) = cnt
End If
Return
End Function

 Posted by Charlie on 2018-05-10 14:28:13

 Search: Search body:
Forums (0)