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

Home > Numbers > Sequences
Go back or double (Posted on 2016-07-25) Difficulty: 2 of 5
1,2,4,3,6,5,10,7,14,8,16,9,18,11,22,12,24...

This sequence has simple rules with a major hint in the title.

Part 1) Determine the rule to extend the sequence.

Part 2) Find, with no aids beyond a simple calculator, the 1000th term of this sequence.

No Solution Yet Submitted by Jer    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
re: An uncertain shorthand for part II | Comment 4 of 5 |
(In reply to An uncertain shorthand for part II by armando)

That checks out with the disallowed computer method:

DefDbl A-Z
Dim crlf$, used(2000)


Private Sub Form_Load()
 Form1.Visible = True
 
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 used(1) = 1
 used(2) = 1
 used(3) = 1
 used(4) = 1
 used(5) = 1
 used(6) = 1

 Text1.Text = Text1.Text & "1 2 4 3 6 5"

 oldVal = 5
 For i = 7 To 1024
   newVal = 0
   If i Mod 2 = 1 Then
     newVal = 2 * oldVal
   Else
     For j = 1 To oldVal
       If used(j) = 0 Then
         newVal = j: Exit For
       End If
     Next
     If newVal = 0 Then
       Text1.Text = Text1.Text & crlf & "stopped prematurely" & crlf
       Exit For
     End If
   End If
   Text1.Text = Text1.Text & Str(newVal)
   oldVal = newVal
   used(newVal) = 1
   If i Mod 10 = 0 Then Text1.Text = Text1.Text & crlf
 Next
 
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub



First 1000 terms:

 1 2 4 3 6 5 10 7 14 8
 16 9 18 11 22 12 24 13 26 15
 30 17 34 19 38 20 40 21 42 23
 46 25 50 27 54 28 56 29 58 31
 62 32 64 33 66 35 70 36 72 37
 74 39 78 41 82 43 86 44 88 45
 90 47 94 48 96 49 98 51 102 52
 104 53 106 55 110 57 114 59 118 60
 120 61 122 63 126 65 130 67 134 68
 136 69 138 71 142 73 146 75 150 76
 152 77 154 79 158 80 160 81 162 83
 166 84 168 85 170 87 174 89 178 91
 182 92 184 93 186 95 190 97 194 99
 198 100 200 101 202 103 206 105 210 107
 214 108 216 109 218 111 222 112 224 113
 226 115 230 116 232 117 234 119 238 121
 242 123 246 124 248 125 250 127 254 128
 256 129 258 131 262 132 264 133 266 135
 270 137 274 139 278 140 280 141 282 143
 286 144 288 145 290 147 294 148 296 149
 298 151 302 153 306 155 310 156 312 157
 314 159 318 161 322 163 326 164 328 165
 330 167 334 169 338 171 342 172 344 173
 346 175 350 176 352 177 354 179 358 180
 360 181 362 183 366 185 370 187 374 188
 376 189 378 191 382 192 384 193 386 195
 390 196 392 197 394 199 398 201 402 203
 406 204 408 205 410 207 414 208 416 209
 418 211 422 212 424 213 426 215 430 217
 434 219 438 220 440 221 442 223 446 225
 450 227 454 228 456 229 458 231 462 233
 466 235 470 236 472 237 474 239 478 240
 480 241 482 243 486 244 488 245 490 247
 494 249 498 251 502 252 504 253 506 255
 510 257 514 259 518 260 520 261 522 263
 526 265 530 267 534 268 536 269 538 271
 542 272 544 273 546 275 550 276 552 277
 554 279 558 281 562 283 566 284 568 285
 570 287 574 289 578 291 582 292 584 293
 586 295 590 297 594 299 598 300 600 301
 602 303 606 304 608 305 610 307 614 308
 616 309 618 311 622 313 626 315 630 316
 632 317 634 319 638 320 640 321 642 323
 646 324 648 325 650 327 654 329 658 331
 662 332 664 333 666 335 670 336 672 337
 674 339 678 340 680 341 682 343 686 345
 690 347 694 348 696 349 698 351 702 353
 706 355 710 356 712 357 714 359 718 361
 722 363 726 364 728 365 730 367 734 368
 736 369 738 371 742 372 744 373 746 375
 750 377 754 379 758 380 760 381 762 383
 766 385 770 387 774 388 776 389 778 391
 782 393 786 395 790 396 792 397 794 399
 798 400 800 401 802 403 806 404 808 405
 810 407 814 409 818 411 822 412 824 413
 826 415 830 417 834 419 838 420 840 421
 842 423 846 425 850 427 854 428 856 429
 858 431 862 432 864 433 866 435 870 436
 872 437 874 439 878 441 882 443 886 444
 888 445 890 447 894 448 896 449 898 451
 902 452 904 453 906 455 910 457 914 459
 918 460 920 461 922 463 926 464 928 465
 930 467 934 468 936 469 938 471 942 473
 946 475 950 476 952 477 954 479 958 481
 962 483 966 484 968 485 970 487 974 489
 978 491 982 492 984 493 986 495 990 496
 992 497 994 499 998 500 1000 501 1002 503
 1006 505 1010 507 1014 508 1016 509 1018 511
 1022 512 1024 513 1026 515 1030 516 1032 517
 1034 519 1038 521 1042 523 1046 524 1048 525
 1050 527 1054 528 1056 529 1058 531 1062 532
 1064 533 1066 535 1070 537 1074 539 1078 540
 1080 541 1082 543 1086 545 1090 547 1094 548
 1096 549 1098 551 1102 553 1106 555 1110 556
 1112 557 1114 559 1118 560 1120 561 1122 563
 1126 564 1128 565 1130 567 1134 569 1138 571
 1142 572 1144 573 1146 575 1150 576 1152 577
 1154 579 1158 580 1160 581 1162 583 1166 585
 1170 587 1174 588 1176 589 1178 591 1182 592
 1184 593 1186 595 1190 596 1192 597 1194 599
 1198 601 1202 603 1206 604 1208 605 1210 607
 1214 609 1218 611 1222 612 1224 613 1226 615
 1230 617 1234 619 1238 620 1240 621 1242 623
 1246 624 1248 625 1250 627 1254 628 1256 629
 1258 631 1262 633 1266 635 1270 636 1272 637
 1274 639 1278 641 1282 643 1286 644 1288 645
 1290 647 1294 649 1298 651 1302 652 1304 653
 1306 655 1310 656 1312 657 1314 659 1318 660
 1320 661 1322 663 1326 665 1330 667 1334 668
 1336 669 1338 671 1342 673 1346 675 1350 676
 1352 677 1354 679 1358 681 1362 683 1366 684
 1368 685 1370 687 1374 688 1376 689 1378 691
 1382 692 1384 693 1386 695 1390 697 1394 699
 1398 700 1400 701 1402 703 1406 704 1408 705
 1410 707 1414 708 1416 709 1418 711 1422 713
 1426 715 1430 716 1432 717 1434 719 1438 720
 1440 721 1442 723 1446 724 1448 725 1450 727
 1454 729 1458 731 1462 732 1464 733 1466 735
 1470 737 1474 739 1478 740 1480 741 1482 743
 1486 745 1490 747 1494 748 1496 749 1498 751
 
 then going on to 1024th entry:
 
  1502 752 1504 753 1506 755 1510 756 1512 757
  1514 759 1518 761 1522 763 1526 764 1528 765
  1530 767 1534 768

  Posted by Charlie on 2016-07-26 15:04:35
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information