{"id":287730,"date":"2018-08-16T14:15:31","date_gmt":"2018-08-16T10:15:31","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=287730"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=287730","title":{"rendered":"\u041e \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0432 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0435 \u041a\u043e\u043b\u043b\u0430\u0442\u0446\u0430 ( 3n+1 )"},"content":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/419075\/\" class=\"post__text post__text-html js-mediator-article\">\u041c\u0435\u043d\u044f \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u0430\u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u041a\u043e\u043b\u043b\u0430\u0442\u0446\u0430. \u041e\u043d\u0438 \u043f\u0440\u043e\u0441\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0435 \u0438 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0442\u0440\u0435\u043d\u0438\u0440\u0443\u044e\u0442 \u0433\u043e\u043b\u043e\u0432\u0443, \u0432 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u044b\u0448\u043b\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443.<\/p>\n<p>  \u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e:  <\/p>\n<blockquote><p>\u0411\u0435\u0440\u0451\u043c \u043b\u044e\u0431\u043e\u0435 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e n. \u0415\u0441\u043b\u0438 \u043e\u043d\u043e \u0447\u0451\u0442\u043d\u043e\u0435, \u0442\u043e \u0434\u0435\u043b\u0438\u043c \u0435\u0433\u043e \u043d\u0430 2, \u0430 \u0435\u0441\u043b\u0438 \u043d\u0435\u0447\u0451\u0442\u043d\u043e\u0435, \u0442\u043e \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u043c \u043d\u0430 3 \u0438 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c 1 (\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 3n + 1). \u041d\u0430\u0434 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0442\u0435 \u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p><\/blockquote>\n<p>  \u0413\u0438\u043f\u043e\u0442\u0435\u0437\u0430 \u041a\u043e\u043b\u043b\u0430\u0442\u0446\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u0430\u043a\u043e\u0435 \u0431\u044b \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e n \u043c\u044b \u043d\u0438 \u0432\u0437\u044f\u043b\u0438, \u0440\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0435\u0434\u0438\u043d\u0438\u0446\u0443.<\/p>\n<p>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"javascript\">while (number &gt; 1) { \tif (number % 2 === 0) number = number \/ 2; \telse number = 3 * number +1; } <\/code><\/pre>\n<p><a name=\"habracut\"><\/a><br \/>  \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0432\u043e\u0437\u044c\u043c\u0435\u043c n=5. \u041e\u043d\u043e \u043d\u0435\u0447\u0435\u0442\u043d\u043e\u0435, \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u0434 \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u043c, \u0442\u043e \u0435\u0441\u0442\u044c 3n+1 =&gt; 16. 16 \u2014 \u0447\u0435\u0442\u043d\u043e\u0435, \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u0434 \u0447\u0435\u0442\u043d\u044b\u043c, \u0442\u043e \u0435\u0441\u0442\u044c n \/ 2 =&gt; 8 =&gt; 4 =&gt; 2 =&gt; 1.<br \/>  \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043f\u0440\u0438 n = 5: 16, 8, 4 ,2, 1.<\/p>\n<p>  <i>\u042f \u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043c\u0435\u043d\u044f \u0437\u0430 \u043c\u043e\u044e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0433\u0434\u0435-\u0442\u043e \u043e\u0448\u0438\u0431\u0443\u0441\u044c.<\/i><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u0434\u0435\u043b\u0438\u043c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0432\u0435\u0434<b>\u0435<\/b>\u043d\u0438\u0439 \u043a \u0435\u0434\u0438\u043d\u0438\u0446\u0435 \u0438 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0432\u0435\u0434<b>\u0435<\/b>\u043d\u0438\u0439 \u043a \u0435\u0434\u0438\u043d\u0438\u0446\u0435. \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u044d\u0442\u043e \u0437\u0430 \u0448\u0430\u0433\u0438.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f n = 7:   <\/p>\n<blockquote><p>22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1.<\/p><\/blockquote>\n<p> \u0412\u0441\u0435\u0433\u043e \u0448\u0430\u0433\u043e\u0432 16. \u0410 <b>\u0438\u0441\u0442\u0438\u043d\u043d\u044b\u0445 \u0448\u0430\u0433\u043e\u0432<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e\u0442 \u0432 \u0434\u0440\u0443\u0433\u043e\u0435 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u2013 \u0438\u0445 5:  <\/p>\n<blockquote><p>7, 11, 17, 13, 5.<\/p><\/blockquote>\n<p> <b>\u0418\u0441\u0442\u0438\u043d\u043d\u044b\u043c \u0448\u0430\u0433\u043e\u043c Sa(n)<\/b> \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 <b>3n+1<\/b> \u043d\u0430\u0434 \u0447\u0438\u0441\u043b\u043e\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0435\u0434\u0438\u043d\u0438\u0446\u044b.<\/p>\n<p>  \u0418\u0434\u0435\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:  <\/p>\n<table>\n<tr>\n<th>Sn (0)<\/th>\n<th>Sn (1)<\/th>\n<th>Sn (2)<\/th>\n<th>Sn (3)<\/th>\n<th>Sn (4)<\/th>\n<th>Sn (5)<\/th>\n<th>Sn (6)<\/th>\n<th>Sn (7)<\/th>\n<th>Sn (8)<\/th>\n<th>Sn (9)<\/th>\n<th>Sn (10)<\/th>\n<th>Sn (11)<\/th>\n<th>Sn (12)<\/th>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>5<\/td>\n<td>3<\/td>\n<td>17<\/td>\n<td>11<\/td>\n<td>7<\/td>\n<td>9<\/td>\n<td>25<\/td>\n<td>33<\/td>\n<td>43<\/td>\n<td>57<\/td>\n<td>39<\/td>\n<td>105<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>10<\/td>\n<td>6<\/td>\n<td>34<\/td>\n<td>22<\/td>\n<td>14<\/td>\n<td>18<\/td>\n<td>49<\/td>\n<td>65<\/td>\n<td>86<\/td>\n<td>59<\/td>\n<td>78<\/td>\n<td>203<\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td>20<\/td>\n<td>12<\/td>\n<td>35<\/td>\n<td>23<\/td>\n<td>15<\/td>\n<td>19<\/td>\n<td>50<\/td>\n<td>66<\/td>\n<td>87<\/td>\n<td>114<\/td>\n<td>79<\/td>\n<td>209<\/td>\n<\/tr>\n<tr>\n<td>16<\/td>\n<td>21<\/td>\n<td>13<\/td>\n<td>68<\/td>\n<td>44<\/td>\n<td>28<\/td>\n<td>36<\/td>\n<td>51<\/td>\n<td>67<\/td>\n<td>89<\/td>\n<td>115<\/td>\n<td>153<\/td>\n<td>210<\/td>\n<\/tr>\n<tr>\n<td>32<\/td>\n<td>40<\/td>\n<td>24<\/td>\n<td>69<\/td>\n<td>45<\/td>\n<td>29<\/td>\n<td>37<\/td>\n<td>98<\/td>\n<td>130<\/td>\n<td>182<\/td>\n<td>118<\/td>\n<td>156<\/td>\n<td>211<\/td>\n<\/tr>\n<tr>\n<td>64<\/td>\n<td>42<\/td>\n<td>26<\/td>\n<td>70<\/td>\n<td>46<\/td>\n<td>30<\/td>\n<td>38<\/td>\n<td>99<\/td>\n<td>131<\/td>\n<td>173<\/td>\n<td>119<\/td>\n<td>157<\/td>\n<td>406<\/td>\n<\/tr>\n<tr>\n<td>128<\/td>\n<td>80<\/td>\n<td>48<\/td>\n<td>75<\/td>\n<td>88<\/td>\n<td>56<\/td>\n<td>72<\/td>\n<td>100<\/td>\n<td>132<\/td>\n<td>174<\/td>\n<td>228<\/td>\n<td>158<\/td>\n<td>407<\/td>\n<\/tr>\n<tr>\n<td>256<\/td>\n<td>84<\/td>\n<td>52<\/td>\n<td>136<\/td>\n<td>90<\/td>\n<td>58<\/td>\n<td>74<\/td>\n<td>101<\/td>\n<td>133<\/td>\n<td>177<\/td>\n<td>229<\/td>\n<td>305<\/td>\n<td>409<\/td>\n<\/tr>\n<tr>\n<td>512<\/td>\n<td>85<\/td>\n<td>53<\/td>\n<td>138<\/td>\n<td>92<\/td>\n<td>60<\/td>\n<td>77<\/td>\n<td>102<\/td>\n<td>134<\/td>\n<td>178<\/td>\n<td>230<\/td>\n<td>306<\/td>\n<td>418<\/td>\n<\/tr>\n<\/table>\n<p>  \u0412 \u0442\u0430\u043a\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0443\u0436\u0435 \u043f\u0440\u043e\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u044f\u0434\u043e\u043a, \u0441\u0432\u043e\u044f \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c.<br \/>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0434\u0432\u043e\u0439\u043a\u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u0447\u0435\u0442\u043d\u043e\u0439 \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 \u0434\u0435\u043b\u0435\u043d\u0438\u044e.<br \/>  \u041e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0442 Sa(0) \u0432\u0441\u0435\u0433\u043e 1 \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439.  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4a2\/e9f\/b22\/4a2e9fb226e42c376b62a720e3deb07f.svg\" alt=\"$P(0,k)= 2*2^k.$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u0445 \u0448\u0430\u0433\u043e\u0432 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u0435 \u0441\u0432\u0435\u0434\u0435\u0442\u0441\u044f \u043a \u0435\u0434\u0438\u043d\u0438\u0446\u0435.<br \/>  \u0417\u043d\u0430\u044f \u044d\u0442\u043e, \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432\u0441\u0435 \u0447\u0438\u0441\u043b\u0430, \u043a\u0440\u0430\u0442\u043d\u044b\u0435 \u0434\u0432\u0443\u043c.  <\/p>\n<table>\n<tr>\n<th>Sn (0)<\/th>\n<th>Sn (1)<\/th>\n<th>Sn (2)<\/th>\n<th>Sn (3)<\/th>\n<th>Sn (4)<\/th>\n<th>Sn (5)<\/th>\n<th>Sn (6)<\/th>\n<th>Sn (7)<\/th>\n<th>Sn (8)<\/th>\n<th>Sn (9)<\/th>\n<th>Sn (10)<\/th>\n<th>Sn (11)<\/th>\n<th>Sn (12)<\/th>\n<\/tr>\n<tr>\n<td> <\/td>\n<td>5<\/td>\n<td>3<\/td>\n<td>17<\/td>\n<td>11<\/td>\n<td>7<\/td>\n<td>9<\/td>\n<td>25<\/td>\n<td>33<\/td>\n<td>43<\/td>\n<td>57<\/td>\n<td>39<\/td>\n<td>105<\/td>\n<\/tr>\n<tr>\n<td> <\/td>\n<td>21<\/td>\n<td>13<\/td>\n<td>35<\/td>\n<td>23<\/td>\n<td>15<\/td>\n<td>19<\/td>\n<td>49<\/td>\n<td>65<\/td>\n<td>87<\/td>\n<td>59<\/td>\n<td>79<\/td>\n<td>203<\/td>\n<\/tr>\n<tr>\n<td> <\/td>\n<td>85<\/td>\n<td>53<\/td>\n<td>69<\/td>\n<td>45<\/td>\n<td>29<\/td>\n<td>37<\/td>\n<td>51<\/td>\n<td>67<\/td>\n<td>89<\/td>\n<td>115<\/td>\n<td>153<\/td>\n<td>209<\/td>\n<\/tr>\n<tr>\n<td> <\/td>\n<td>341<\/td>\n<td>113<\/td>\n<td>75<\/td>\n<td>93<\/td>\n<td>61<\/td>\n<td>77<\/td>\n<td>99<\/td>\n<td>131<\/td>\n<td>173<\/td>\n<td>119<\/td>\n<td>157<\/td>\n<td>211<\/td>\n<\/tr>\n<tr>\n<td> <\/td>\n<td>1365<\/td>\n<td>213<\/td>\n<td>141<\/td>\n<td>181<\/td>\n<td>117<\/td>\n<td>81<\/td>\n<td>101<\/td>\n<td>133<\/td>\n<td>177<\/td>\n<td>229<\/td>\n<td>305<\/td>\n<td>407<\/td>\n<\/tr>\n<\/table>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u0443\u0436\u0435 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0443\u043b\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c, \u043e\u0434\u043d\u0430\u043a\u043e \u043e\u043d\u0430 \u0435\u0441\u0442\u044c. \u0421\u0435\u0439\u0447\u0430\u0441 \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u2014 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439. \u041d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0446\u0438\u0444\u0440\u043e\u0439 \u043f\u043e\u0441\u043b\u0435 5 \u0441\u0442\u043e\u0438\u0442 21, \u0430 \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0451 85.<br \/>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 <b>Sa(1)<\/b> \u2013 \u044d\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c <a href=\"https:\/\/oeis.org\/A002450\">A002450<\/a> (0, 1, 5, 21, 85, 341, 1365, 5461, 21845, 87381\u2026 ). \u041e\u043d\u0430 \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b6e\/93e\/83e\/b6e93e83edbecae560ae3d6e450515a7.svg\" alt=\"$P(k)={4^k- 1\\over 3}.$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u042d\u0442\u0443 \u0436\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cc5\/f7b\/7b1\/cc5f7b7b18536804c0eaf5a3c8ca5ccf.svg\" alt=\"$P(k)= 4k_0+1,\u043f\u0440\u0438 \\ k_0=1.$\" data-tex=\"display\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/be0\/c22\/3f3\/be0c223f3f15b76f370fe14c143673c4.svg\" alt=\"$P(1) = 4*1+1 = 5;$\" data-tex=\"inline\"><\/math><br \/>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d02\/2d8\/c0f\/d022d8c0ff648949391abd25b5c0f26a.svg\" alt=\"$P(5) = 4*5+1 = 21;$\" data-tex=\"inline\"><\/math><br \/>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f32\/fb7\/dc3\/f32fb7dc39fc74d18113a47efb6f84e1.svg\" alt=\"$P(21) = 4*21+1 = 85;$\" data-tex=\"inline\"><\/math><br \/>  \u0418 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435\u2026<\/p>\n<p>  \u0420\u044f\u0434 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0448\u0430\u0433\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d, \u0445\u043e\u0442\u044f \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438. \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0448\u0430\u0433\u0443 \u0434\u0432\u0430. \u0424\u043e\u0440\u043c\u0443\u043b\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u0448\u0430\u0433\u0443 2 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u0438\u0437 \u043d\u0435\u0447\u0435\u0442\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b.<br \/>  \u0417\u043d\u0430\u044f, \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3c1\/b16\/e3e\/3c1b16e3ea1e5faa985ca3e0f935b527.svg\" alt=\"$3n+1$\" data-tex=\"inline\"><\/math> \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u043c\u043e\u0436\u043d\u043e \u044d\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/03d\/07c\/d70\/03d07cd70eebb35588b82e47c57f79d2.svg\" alt=\"$2^{2\\alpha}$\" data-tex=\"inline\"><\/math>, \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/723\/4a5\/2ba\/7234a52ba041cdb09b9328a047048fb2.svg\" alt=\"$\\alpha$\" data-tex=\"inline\"><\/math>\u2013 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u0439.  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e6f\/dea\/f00\/e6fdeaf00bac312ea231eccc09a55996.svg\" alt=\"$P(k)={3n+1\\over2^{2\\alpha}};\\\\ 2^{2\\alpha}P(k)=3n+1;\\\\ 3n= 2^{2\\alpha}P(k)-1;$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0438\u0434:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e55\/164\/c25\/e55164c257ff10080b8582f8e60e8c66.svg\" alt=\"$n(P(k),\\alpha)={2^{2\\alpha}P(k)-1\\over3};$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u0432\u0432\u0435\u0434\u0435\u043c \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0443 \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7fd\/b73\/0d9\/7fdb730d916a98c0ad71826e0bc706bf.svg\" alt=\"$\\beta$\" data-tex=\"inline\"><\/math>, \u043a\u0430\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4b5\/62e\/92d\/4b562e92d1af12f7881762d9c1a26afe.svg\" alt=\"$2^{2\\alpha+\\beta}$\" data-tex=\"inline\"><\/math>, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0430 \u043d\u0435 \u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e 3 \u043d\u0430 3.  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bb4\/585\/223\/bb45852230d0c2392126f14aae6728ec.svg\" alt=\"$n(P(k),\\alpha,\\beta)={2^{2\\alpha+\\beta}P(k)-1\\over3};$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0444\u043e\u0440\u043c\u0443\u043b\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u0430\u043b\u044c\u0444\u0430 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0434\u043b\u044f \u043f\u043e\u0434\u0440\u044f\u0434 \u0438\u0434\u0443\u0449\u0438\u0445 5 \u0430\u043b\u044c\u0444:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/964\/33d\/689\/96433d689a6c4b6d914232ec53f22d3e.svg\" alt=\"$n(5,\\alpha,\\beta)={2^{2\\alpha+\\beta}*5-1\\over3};$\" data-tex=\"display\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/423\/f4c\/b7f\/423f4cb7f7bb58f1ab21de035027dfb2.svg\" alt=\"$n(5,0,1)=(2^{0+1}*5-1)\/3=3.$\" data-tex=\"inline\"><\/math><br \/>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/474\/05a\/09f\/47405a09fe477ef2d88e747f4f72efb5.svg\" alt=\"$n(5,1,1)=(2^{2+1}*5-1) \/3=13.$\" data-tex=\"inline\"><\/math><br \/>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/914\/d65\/b42\/914d65b42b82522905c092609a4ba020.svg\" alt=\"$n(5,2,1)=(2^5*5-1)\/3=53.$\" data-tex=\"inline\"><\/math><br \/>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2c4\/f58\/007\/2c4f580073888ff757571ae464a2f84d.svg\" alt=\"$n(5,3,1)=(2^7*5-1)\/3=213.$\" data-tex=\"inline\"><\/math><br \/>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/04f\/15e\/5f3\/04f15e5f372be4a23071a385e7be4dbc.svg\" alt=\"$n(5,4,1)=(2^9*5-1)\/3=853.$\" data-tex=\"inline\"><\/math><\/p>\n<p>  \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0448\u0430\u0433\u0430. \u041e\u0434\u043d\u0430\u043a\u043e, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e 113 \u043d\u0435\u0442 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043b\u0430\u0441\u044c <b>\u043e\u0442 5<\/b>. <\/p>\n<p>  <b>n = 113<\/b> \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435:<br \/>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8fd\/ea5\/f62\/8fdea5f62aa05ee3dc4a9b373072bee3.svg\" alt=\"$n(85,0,2)=(2^{0+2}*85-1)\/3=113.$\" data-tex=\"inline\"><\/math><\/p>\n<p>  \u041f\u043e\u0434\u044b\u0442\u043e\u0436\u0438\u043c:  <\/p>\n<blockquote><p>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/441\/c3b\/35e\/441c3b35e6c3878b411b109be788b5aa.svg\" alt=\"$Sa(n+1)$\" data-tex=\"inline\"><\/math> \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d5a\/a19\/247\/d5aa19247a193c2d8c8a98b2998d7b86.svg\" alt=\"$n(P(k),\\alpha,\\beta)$\" data-tex=\"inline\"><\/math> \u043e\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5d0\/941\/68a\/5d094168a8c1b1dde3a74b8fc4f24aa4.svg\" alt=\"$Sa(n)$\" data-tex=\"inline\"><\/math>.<\/p><\/blockquote>\n<p>\u0422\u043e\u0433\u0434\u0430 \u0437\u043d\u0430\u044f \u044d\u0442\u043e \u2013 \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0443\u0431\u0440\u0430\u0432 \u0432\u0441\u0435 \u043f\u043e\u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043a\u0440\u0430\u0442\u043d\u044b\u0435 \u0430\u043b\u044c\u0444\u0430.  <\/p>\n<table>\n<tr>\n<th>Sn (0)<\/th>\n<th>Sn (1)<\/th>\n<th>Sn (2)<\/th>\n<th>Sn (3)<\/th>\n<th>Sn (4)<\/th>\n<th>Sn (5)<\/th>\n<th>Sn (6)<\/th>\n<th>Sn (7) &#8230;<\/th>\n<\/tr>\n<tr>\n<td> <\/td>\n<td>5<\/td>\n<td>3<\/td>\n<td>17<\/td>\n<td>11<\/td>\n<td>7<\/td>\n<td>9<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<tr>\n<td> <\/td>\n<td> <\/td>\n<td>113<\/td>\n<td>75<\/td>\n<td>201<\/td>\n<td>267<\/td>\n<td>715<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<tr>\n<td> <\/td>\n<td> <\/td>\n<td>227<\/td>\n<td>151<\/td>\n<td>401<\/td>\n<td>1073<\/td>\n<td>1425<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<\/table>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0432\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b0a\/166\/ffe\/b0a166ffed1f4fb2f1c9ae3cd4d9c662.svg\" alt=\"$Sa(2)$\" data-tex=\"inline\"><\/math> \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u044e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3b9\/d2e\/225\/3b9d2e2255f6c7b9e8d4ec2eef4982eb.svg\" alt=\"$Sa(3)$\" data-tex=\"inline\"><\/math> \u0434\u043b\u044f \u0430\u043b\u044c\u0444\u0430 \u043e\u0442 0 \u0434\u043e 4.  <\/p>\n<table>\n<tr>\n<th>P(k)=3<\/th>\n<th>P(k)=113<\/th>\n<th>P(k)=227<\/th>\n<\/tr>\n<tr>\n<td> <b>3 \u043e\u0442 \u03b1=0 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   \u041d\u0438\u0447\u0435\u0433\u043e<\/p>\n<p>   <b>13 \u043e\u0442 \u03b1=1 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   17<br \/>   69<br \/>   277<br \/>   1109<br \/>   4437<\/p>\n<p>   <b> 53 \u043e\u0442 \u03b1=2 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   35<br \/>   141<br \/>   565<br \/>   2261<br \/>   9045<\/p>\n<p>   <b> 213 \u043e\u0442 \u03b1=3 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   \u041d\u0438\u0447\u0435\u0433\u043e<\/p>\n<p>   <b>853 \u043e\u0442 \u03b1=4 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   1137<br \/>   4549<br \/>   18197<br \/>   72789<br \/>   291157<\/p>\n<\/td>\n<td> <b>113 \u043e\u0442 \u03b1=0 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   75<br \/>   301<br \/>   1205<br \/>   4821<br \/>   19285<\/p>\n<p>   <b>453 \u043e\u0442 \u03b1=1 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   \u041d\u0438\u0447\u0435\u0433\u043e<\/p>\n<p>   <b>1813 \u043e\u0442 \u03b1=2 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   2417<br \/>   9669<br \/>   38677<br \/>   154709<br \/>   618837<\/p>\n<p>   <b>7253 \u043e\u0442 \u03b1=3 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   4835<br \/>   19341<br \/>   77365<br \/>   309461<br \/>   1237845<\/p>\n<p>   <b>29013 \u043e\u0442 \u03b1=4 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   \u041d\u0438\u0447\u0435\u0433\u043e<\/p>\n<\/td>\n<td> <b>227 \u043e\u0442 \u03b1=0 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   151<br \/>   605<br \/>   2421<br \/>   9685<br \/>   38741<\/p>\n<p>   <b>909 \u043e\u0442 \u03b1=1 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   \u041d\u0438\u0447\u0435\u0433\u043e<\/p>\n<p>   <b>3637 \u043e\u0442 \u03b1=2 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   4849<br \/>   19397<br \/>   77589<br \/>   310357<br \/>   1241429<\/p>\n<p>   <b>14549 \u043e\u0442 \u03b1=3 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   9699<br \/>   38797<br \/>   155189<br \/>   620757<br \/>   2483029<\/p>\n<p>   <b>58197 \u043e\u0442 \u03b1=4 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442:<\/b><br \/>   \u041d\u0438\u0447\u0435\u0433\u043e<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p>  \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0432 \u044d\u0442\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0442 Sa(3):  <\/p>\n<blockquote><p>17, 35, 69, 75, 141, 151, 277, 301, 565, 605, 1109, 1137, 1205, 2261, 2275, 2417, 2421, 4437, 4549, 4821, 4835, 4849, 9045, 9101, 9669, 9685, 9699, 17749, 18197, 19285, 19341, 19397, 19417\u2026<\/p><\/blockquote>\n<p>\u041f\u0440\u0438\u0447\u0435\u043c \u0443\u0431\u0440\u0430\u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/053\/1f2\/2c1\/0531f22c1105064b985a44c766f06bdc.svg\" alt=\"$\\alpha&gt;0$\" data-tex=\"inline\"><\/math>, \u043f\u043e\u043b\u0443\u0447\u0438\u043c:  <\/p>\n<blockquote><p>17, 75, 151 \u2026<\/p><\/blockquote>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b67\/ed8\/ce4\/b67ed8ce453ad29b2066fb5b1513e2a8.svg\" alt=\"$n(P(k),\\beta)={2^\\beta P(k)-1\\over3};$\" data-tex=\"display\"><\/math><\/p>\n<p>  <b>\u041f\u043e\u0447\u0435\u043c\u0443 \u0433\u0434\u0435-\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9da\/ea6\/a95\/9daea6a95290efea5bab2fe8d71a2bd4.svg\" alt=\"$\\beta=2$\" data-tex=\"inline\"><\/math>, \u0430 \u0433\u0434\u0435-\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0b2\/ec2\/69e\/0b2ec269e1e17af65215248d94033bd5.svg\" alt=\"$\\beta=1$\" data-tex=\"inline\"><\/math>? <\/b><\/p>\n<p>  \u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u0441\u043d\u043e\u0432\u0430 \u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 A002450. \u0415\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c:<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e3d\/728\/d0a\/e3d728d0a8ec522eba83f12b3a41c590.svg\" alt=\"$P(m)=(4^3m- 1)\/3$\" data-tex=\"inline\"><\/math> \u2013 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439.<br \/>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/25f\/9ab\/5c1\/25f9ab5c16d84d2df1aecd711c9131db.svg\" alt=\"$P(m)=(4^{3m+1}- 1)\/3$\" data-tex=\"inline\"><\/math> \u2013 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9da\/ea6\/a95\/9daea6a95290efea5bab2fe8d71a2bd4.svg\" alt=\"$\\beta=2$\" data-tex=\"inline\"><\/math>.<br \/>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/eec\/4e2\/006\/eec4e2006d8098f78d5248a5d18195c4.svg\" alt=\"$P(m)=(4^{3m+2}- 1)\/3$\" data-tex=\"inline\"><\/math> \u2013 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0b2\/ec2\/69e\/0b2ec269e1e17af65215248d94033bd5.svg\" alt=\"$\\beta=1$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0432\u0441\u0435\u0433\u043e 3 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0443 \u0447\u0438\u0441\u043b\u0430.<br \/>  \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435, \u0442\u043e:  <\/p>\n<blockquote><p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c8f\/aea\/c84\/c8faeac84db3ac0f2b9db54c32974626.svg\" alt=\"$n(\\gamma,\\alpha,\\beta)$\" data-tex=\"inline\"><\/math>, \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fbc\/f2a\/da4\/fbcf2ada4d2c9c0d4c2e64f59ffe82c0.svg\" alt=\"$\\gamma$\" data-tex=\"inline\"><\/math> \u2014 \u043b\u044e\u0431\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043a\u0440\u0430\u0442\u043d\u043e\u0435 3, \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u043f\u0443\u0441\u0442\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u2a02.  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/394\/544\/7fc\/3945447fc82f15301f4597a7d2f6dfc3.svg\" alt=\"$A(n(\\gamma),\\alpha,\\beta)=\u2a02.$\" data-tex=\"display\"><\/math><\/p>\n<\/blockquote>\n<blockquote><p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5c0\/d0a\/7c7\/5c0d0a7c72f2a256e5f303edab81c5d7.svg\" alt=\"$n(\\lambda,\\alpha,\\beta)$\" data-tex=\"inline\"><\/math>, \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b1b\/c57\/ea8\/b1bc57ea859ea7d6505ec3a3ae9be2f6.svg\" alt=\"$\\lambda$\" data-tex=\"inline\"><\/math> \u2014 \u043b\u044e\u0431\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u0440\u043e\u0436\u0434\u0435\u043d\u043d\u043e\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fbc\/f2a\/da4\/fbcf2ada4d2c9c0d4c2e64f59ffe82c0.svg\" alt=\"$\\gamma$\" data-tex=\"inline\"><\/math>, \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9da\/ea6\/a95\/9daea6a95290efea5bab2fe8d71a2bd4.svg\" alt=\"$\\beta=2$\" data-tex=\"inline\"><\/math> \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0447\u0438\u0441\u0435\u043b K \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b N.  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/55b\/f4e\/b8c\/55bf4eb8cc1d1a80a7bf811c207a870a.svg\" alt=\"$K(n(P(\\gamma),\\alpha,2))\u2286 N.$\" data-tex=\"display\"><\/math><\/p>\n<\/blockquote>\n<blockquote><p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/455\/37e\/759\/45537e7593ded4a0d78f93eea239e4dc.svg\" alt=\"$n(P(\\lambda),\\alpha,\\beta)$\" data-tex=\"inline\"><\/math>, \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0b2\/ec2\/69e\/0b2ec269e1e17af65215248d94033bd5.svg\" alt=\"$\\beta=1$\" data-tex=\"inline\"><\/math> \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0447\u0438\u0441\u0435\u043b L \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b N.  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/691\/64d\/b98\/69164db98c9b37388ae2cf8751a68509.svg\" alt=\"$L(n(P(\\lambda),\\alpha,1))\u2286 N.$\" data-tex=\"display\"><\/math><\/p>\n<\/blockquote>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0441\u0442\u0438 \u043a \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0440\u043e\u0433\u043e\u0439 \u0438 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0435.<\/p>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u0430\u043a \u0438 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0435 \u041a\u043e\u043b\u043b\u0430\u0442\u0446\u0430. <br \/>  \u041e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u043e\u0434\u043d\u0430 \u0434\u0435\u0442\u0430\u043b\u044c. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043d\u0430\u043c\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043e\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0445 \u0448\u0430\u0433\u043e\u0432.<\/p>\n<p>  \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u0445:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bb4\/585\/223\/bb45852230d0c2392126f14aae6728ec.svg\" alt=\"$n(P(k),\\alpha,\\beta)={2^{2\\alpha+\\beta}P(k)-1\\over3};$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u0445, \u043d\u0443\u0436\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0447\u0435\u0442\u043d\u044b\u0445. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0444\u043e\u0440\u043c\u0443\u043b\u0443:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4a2\/e9f\/b22\/4a2e9fb226e42c376b62a720e3deb07f.svg\" alt=\"$P(0,k)= 2*2^k.$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/87f\/7c7\/c81\/87f7c7c8145b4fe408781416602aa692.svg\" alt=\"$n(P(k),\\alpha,\\beta,\\epsilon)={2^{2\\alpha+\\beta}P(k)-1\\over3}*2^\\epsilon.$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:   <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f93\/d9e\/c0c\/f93d9ec0c82342995f94f42202c2a470.svg\" alt=\"$n(k,\\alpha,\\beta,\\epsilon)=2^\\epsilon{2^{2\\alpha+\\beta}(4k+1)-1\\over3};$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043b\u044e\u0431\u0430\u044f k \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0440\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.   <\/p>\n<blockquote><p>\u0421\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u043b\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435, \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0435 \u0438\u0437 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043a \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e5b\/665\/652\/e5b6656525e2c1d827721c76aaa6412e.svg\" alt=\"$n(k)$\" data-tex=\"inline\"><\/math>?  <\/p><\/blockquote>\n<p> \u0415\u0441\u043b\u0438 \u0442\u0430\u043a, \u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u041a\u043e\u043b\u043b\u0430\u0442\u0446 \u0431\u044b\u043b \u043f\u0440\u0430\u0432.<\/p>\n<p>  \u041f\u043e\u0434 \u0444\u0438\u043d\u0430\u043b \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 javascript:<\/p>\n<pre><code class=\"javascript\">function collatsSequence(     number,     sequenceLength,     alpha,     epsilon ) {      \/\/ \u041c\u0430\u0441\u0441\u0438\u0432 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043e\u0442 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0433\u043e \u0448\u0430\u0433\u0430,     \/\/ \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0433\u043e number     let set = [];      \/\/ \u0421\u0432\u043e\u0434\u0438\u043c \u043a \u043d\u0435\u0447\u0435\u0442\u043d\u043e\u043c\u0443     while (number % 2 === 0) number \/= 2;      \/\/ \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438,      \/\/ \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043e\u0442 number, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044f\u0441\u044c sequenceLength     for (let k = 0; k &lt; sequenceLength; k++) {          \/\/ \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 alpha         for (let a = 0; a &lt; alpha; a++) {              \/\/ \u041f\u0443\u0441\u0442\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e, \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c             if (number % 3 === 0) break;              \/\/ \u0420\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u043b\u044f beta = 1             let numWithBeta = (number * 2 ** (2 * a + 1) - 1) \/ 3;              \/\/ \u0415\u0441\u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u043d\u0435 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 3 \u043f\u0440\u0438 beta === 1             \/\/ \u0442\u043e\u0433\u0434\u0430 \u0442\u043e\u0447\u043d\u043e \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 3 \u043f\u0440\u0438 beta === 2             if (Math.floor(numWithBeta) !== numWithBeta)                  \/\/ \u0420\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u043b\u044f beta = 2                 numWithBeta = (number * 2 ** (2 * a + 2) - 1) \/ 3;              \/\/ \u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0447\u0435\u0442\u043d\u044b\u043c\u0438 \u0434\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u0430 epsilon             for (let e = 0; e &lt; epsilon; e++)                 set.push(numWithBeta * 2 ** e);          }          \/\/ \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438         number = number * 4 + 1;     }      return set;  }  console.log(     collatsSequence(5, 5, 2, 2) );  \/\/ [ 3, 6, 13, 26, 113, 226, 453, 906, 227, 454, 909, 1818 ] <\/code><\/pre>\n<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/419075\/\"> https:\/\/habr.com\/post\/419075\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/419075\/\" class=\"post__text post__text-html js-mediator-article\">\u041c\u0435\u043d\u044f \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u0430\u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u041a\u043e\u043b\u043b\u0430\u0442\u0446\u0430. \u041e\u043d\u0438 \u043f\u0440\u043e\u0441\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0435 \u0438 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0442\u0440\u0435\u043d\u0438\u0440\u0443\u044e\u0442 \u0433\u043e\u043b\u043e\u0432\u0443, \u0432 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u044b\u0448\u043b\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443.<\/p>\n<p>  \u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e:  <\/p>\n<blockquote><p>\u0411\u0435\u0440\u0451\u043c \u043b\u044e\u0431\u043e\u0435 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e n. \u0415\u0441\u043b\u0438 \u043e\u043d\u043e \u0447\u0451\u0442\u043d\u043e\u0435, \u0442\u043e \u0434\u0435\u043b\u0438\u043c \u0435\u0433\u043e \u043d\u0430 2, \u0430 \u0435\u0441\u043b\u0438 \u043d\u0435\u0447\u0451\u0442\u043d\u043e\u0435, \u0442\u043e \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u043c \u043d\u0430 3 \u0438 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c 1 (\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 3n + 1). \u041d\u0430\u0434 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0442\u0435 \u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p><\/blockquote>\n<p>  \u0413\u0438\u043f\u043e\u0442\u0435\u0437\u0430 \u041a\u043e\u043b\u043b\u0430\u0442\u0446\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u0430\u043a\u043e\u0435 \u0431\u044b \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e n \u043c\u044b \u043d\u0438 \u0432\u0437\u044f\u043b\u0438, \u0440\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0435\u0434\u0438\u043d\u0438\u0446\u0443.<\/p>\n<p>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"javascript\">while (number &gt; 1) { \tif (number % 2 === 0) number = number \/ 2; \telse number = 3 * number +1; } <\/code><\/pre>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-287730","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=287730"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287730\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=287730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=287730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=287730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}