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