Home > Just Math
Two happy ends (Posted on 2011-03-07) |
|
Consider a series of numbers, defined as follows: Starting with any natural number, each member is a sum of the squares of the previous member`s digits.
Prove : The series always reaches either a stuck-on-one sequence: 1,1,1… or a closed loop of the following 8 numbers: 145,42,20,4,16,37,58,89, ...
Ex1: 12345,55,50,25,29,85,89,145….. etc
Ex2: 66,72,53,34,25,29,85,89,145…
Ex3: 91,10,1,1,1…..
solution
|
| Comment 2 of 11 |
|
This program:
DEFDBL A-Z CLS FOR n = 1 TO 999 ns = n DO s$ = LTRIM$(STR$(ns)) t = 0 FOR i = 1 TO LEN(s$) t = t + VAL(MID$(s$, i, 1)) * VAL(MID$(s$, i, 1)) NEXT ns = t IF ns = 4 OR ns = 1 THEN PRINT USING "### # "; n; ns; IF n MOD 400 = 0 THEN DO: LOOP UNTIL INKEY$ > "" EXIT DO END IF LOOP NEXT
verifies that for all natural numbers of three or fewer digits, the process does indeed lead to either the repeating 1's or the cycle that includes the 4, and reports which of these is the case: 1 1 2 4 3 4 4 4 5 4 6 4 7 1 8 4 9 4 10 1 11 4 12 4 13 1 14 4 15 4 16 4 17 4 18 4 19 1 20 4 21 4 22 4 23 1 24 4 25 4 26 4 27 4 28 1 29 4 30 4 31 1 32 1 33 4 34 4 35 4 36 4 37 4 38 4 39 4 40 4 41 4 42 4 43 4 44 1 45 4 46 4 47 4 48 4 49 1 50 4 51 4 52 4 53 4 54 4 55 4 56 4 57 4 58 4 59 4 60 4 61 4 62 4 63 4 64 4 65 4 66 4 67 4 68 1 69 4 70 1 71 4 72 4 73 4 74 4 75 4 76 4 77 4 78 4 79 1 80 4 81 4 82 1 83 4 84 4 85 4 86 1 87 4 88 4 89 4 90 4 91 1 92 4 93 4 94 1 95 4 96 4 97 1 98 4 99 4 100 1 101 4 102 4 103 1 104 4 105 4 106 4 107 4 108 4 109 1 110 4 111 4 112 4 113 4 114 4 115 4 116 4 117 4 118 4 119 4 120 4 121 4 122 4 123 4 124 4 125 4 126 4 127 4 128 4 129 1 130 1 131 4 132 4 133 1 134 4 135 4 136 4 137 4 138 4 139 1 140 4 141 4 142 4 143 4 144 4 145 4 146 4 147 4 148 4 149 4 150 4 151 4 152 4 153 4 154 4 155 4 156 4 157 4 158 4 159 4 160 4 161 4 162 4 163 4 164 4 165 4 166 4 167 1 168 4 169 4 170 4 171 4 172 4 173 4 174 4 175 4 176 1 177 4 178 4 179 4 180 4 181 4 182 4 183 4 184 4 185 4 186 4 187 4 188 1 189 4 190 1 191 4 192 1 193 1 194 4 195 4 196 4 197 4 198 4 199 4 200 4 201 4 202 4 203 1 204 4 205 4 206 4 207 4 208 1 209 4 210 4 211 4 212 4 213 4 214 4 215 4 216 4 217 4 218 4 219 1 220 4 221 4 222 4 223 4 224 4 225 4 226 1 227 4 228 4 229 4 230 1 231 4 232 4 233 4 234 4 235 4 236 1 237 4 238 4 239 1 240 4 241 4 242 4 243 4 244 4 245 4 246 4 247 4 248 4 249 4 250 4 251 4 252 4 253 4 254 4 255 4 256 4 257 4 258 4 259 4 260 4 261 4 262 1 263 1 264 4 265 4 266 4 267 4 268 4 269 4 270 4 271 4 272 4 273 4 274 4 275 4 276 4 277 4 278 4 279 4 280 1 281 4 282 4 283 4 284 4 285 4 286 4 287 4 288 4 289 4 290 4 291 1 292 4 293 1 294 4 295 4 296 4 297 4 298 4 299 4 300 4 301 1 302 1 303 4 304 4 305 4 306 4 307 4 308 4 309 4 310 1 311 4 312 4 313 1 314 4 315 4 316 4 317 4 318 4 319 1 320 1 321 4 322 4 323 4 324 4 325 4 326 1 327 4 328 4 329 1 330 4 331 1 332 4 333 4 334 4 335 4 336 4 337 4 338 1 339 4 340 4 341 4 342 4 343 4 344 4 345 4 346 4 347 4 348 4 349 4 350 4 351 4 352 4 353 4 354 4 355 4 356 1 357 4 358 4 359 4 360 4 361 4 362 1 363 4 364 4 365 1 366 4 367 1 368 1 369 4 370 4 371 4 372 4 373 4 374 4 375 4 376 1 377 4 378 4 379 1 380 4 381 4 382 4 383 1 384 4 385 4 386 1 387 4 388 4 389 4 390 4 391 1 392 1 393 4 394 4 395 4 396 4 397 1 398 4 399 4 400 4 401 4 402 4 403 4 404 1 405 4 406 4 407 4 408 4 409 1 410 4 411 4 412 4 413 4 414 4 415 4 416 4 417 4 418 4 419 4 420 4 421 4 422 4 423 4 424 4 425 4 426 4 427 4 428 4 429 4 430 4 431 4 432 4 433 4 434 4 435 4 436 4 437 4 438 4 439 4 440 1 441 4 442 4 443 4 444 4 445 4 446 1 447 4 448 4 449 4 450 4 451 4 452 4 453 4 454 4 455 4 456 4 457 4 458 4 459 4 460 4 461 4 462 4 463 4 464 1 465 4 466 4 467 4 468 4 469 1 470 4 471 4 472 4 473 4 474 4 475 4 476 4 477 4 478 1 479 4 480 4 481 4 482 4 483 4 484 4 485 4 486 4 487 1 488 4 489 4 490 1 491 4 492 4 493 4 494 4 495 4 496 1 497 4 498 4 499 4 500 4 501 4 502 4 503 4 504 4 505 4 506 4 507 4 508 4 509 4 510 4 511 4 512 4 513 4 514 4 515 4 516 4 517 4 518 4 519 4 520 4 521 4 522 4 523 4 524 4 525 4 526 4 527 4 528 4 529 4 530 4 531 4 532 4 533 4 534 4 535 4 536 1 537 4 538 4 539 4 540 4 541 4 542 4 543 4 544 4 545 4 546 4 547 4 548 4 549 4 550 4 551 4 552 4 553 4 554 4 555 4 556 1 557 4 558 4 559 4 560 4 561 4 562 4 563 1 564 4 565 1 566 1 567 4 568 4 569 4 570 4 571 4 572 4 573 4 574 4 575 4 576 4 577 4 578 4 579 4 580 4 581 4 582 4 583 4 584 4 585 4 586 4 587 4 588 4 589 4 590 4 591 4 592 4 593 4 594 4 595 4 596 4 597 4 598 4 599 4 600 4 601 4 602 4 603 4 604 4 605 4 606 4 607 4 608 1 609 4 610 4 611 4 612 4 613 4 614 4 615 4 616 4 617 1 618 4 619 4 620 4 621 4 622 1 623 1 624 4 625 4 626 4 627 4 628 4 629 4 630 4 631 4 632 1 633 4 634 4 635 1 636 4 637 1 638 1 639 4 640 4 641 4 642 4 643 4 644 1 645 4 646 4 647 4 648 4 649 1 650 4 651 4 652 4 653 1 654 4 655 1 656 1 657 4 658 4 659 4 660 4 661 4 662 4 663 4 664 4 665 1 666 4 667 4 668 4 669 4 670 4 671 1 672 4 673 1 674 4 675 4 676 4 677 4 678 4 679 4 680 1 681 4 682 4 683 1 684 4 685 4 686 4 687 4 688 4 689 4 690 4 691 4 692 4 693 4 694 1 695 4 696 4 697 4 698 4 699 4 700 1 701 4 702 4 703 4 704 4 705 4 706 4 707 4 708 4 709 1 710 4 711 4 712 4 713 4 714 4 715 4 716 1 717 4 718 4 719 4 720 4 721 4 722 4 723 4 724 4 725 4 726 4 727 4 728 4 729 4 730 4 731 4 732 4 733 4 734 4 735 4 736 1 737 4 738 4 739 1 740 4 741 4 742 4 743 4 744 4 745 4 746 4 747 4 748 1 749 4 750 4 751 4 752 4 753 4 754 4 755 4 756 4 757 4 758 4 759 4 760 4 761 1 762 4 763 1 764 4 765 4 766 4 767 4 768 4 769 4 770 4 771 4 772 4 773 4 774 4 775 4 776 4 777 4 778 4 779 4 780 4 781 4 782 4 783 4 784 1 785 4 786 4 787 4 788 4 789 4 790 1 791 4 792 4 793 1 794 4 795 4 796 4 797 4 798 4 799 4 800 4 801 4 802 1 803 4 804 4 805 4 806 1 807 4 808 4 809 4 810 4 811 4 812 4 813 4 814 4 815 4 816 4 817 4 818 1 819 4 820 1 821 4 822 4 823 4 824 4 825 4 826 4 827 4 828 4 829 4 830 4 831 4 832 4 833 1 834 4 835 4 836 1 837 4 838 4 839 4 840 4 841 4 842 4 843 4 844 4 845 4 846 4 847 1 848 4 849 4 850 4 851 4 852 4 853 4 854 4 855 4 856 4 857 4 858 4 859 4 860 1 861 4 862 4 863 1 864 4 865 4 866 4 867 4 868 4 869 4 870 4 871 4 872 4 873 4 874 1 875 4 876 4 877 4 878 4 879 4 880 4 881 1 882 4 883 4 884 4 885 4 886 4 887 4 888 1 889 4 890 4 891 4 892 4 893 4 894 4 895 4 896 4 897 4 898 4 899 1 900 4 901 1 902 4 903 4 904 1 905 4 906 4 907 1 908 4 909 4 910 1 911 4 912 1 913 1 914 4 915 4 916 4 917 4 918 4 919 4 920 4 921 1 922 4 923 1 924 4 925 4 926 4 927 4 928 4 929 4 930 4 931 1 932 1 933 4 934 4 935 4 936 4 937 1 938 4 939 4 940 1 941 4 942 4 943 4 944 4 945 4 946 1 947 4 948 4 949 4 950 4 951 4 952 4 953 4 954 4 955 4 956 4 957 4 958 4 959 4 960 4 961 4 962 4 963 4 964 1 965 4 966 4 967 4 968 4 969 4 970 1 971 4 972 4 973 1 974 4 975 4 976 4 977 4 978 4 979 4 980 4 981 4 982 4 983 4 984 4 985 4 986 4 987 4 988 4 989 1 990 4 991 4 992 4 993 4 994 4 995 4 996 4 997 4 998 1 999 4
The highest total of squares of digits that can be achieved with a 4-digit number is 4*81 = 324, which is a 3-digit number, and so all 4-digit numbers eventually fall into this set. Similarly for all natural numbers with larger numbers of digits, the sum of the squares of the digits has fewer digits than the number itself and therefore the series continues on to this set presented here.
|
Posted by Charlie
on 2011-03-07 15:15:40 |
|
|
Please log in:
Forums (1)
Newest Problems
Random Problem
FAQ |
About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On
Chatterbox:
|