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

Home > Probability
How would you bet? (Posted on 2011-02-13) Difficulty: 2 of 5
What is the probability that a randomly chosen three-digit number (000 to 999 inclusive) is eligible to appear at the end of a seventh power of an integer?

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 2

DEFDBL A-Z
DIM had(999)

CLS
FOR n = 0 TO 999
  prod = n
  FOR i = 1 TO 6
    prod = (prod * n) MOD 1000
  NEXT
  had(prod) = 1
NEXT
FOR i = 0 TO 999
  IF had(i) THEN PRINT RIGHT$("000" + LTRIM$(STR$(i)), 3) + " "; : ct = ct + 1
NEXT
PRINT : PRINT

PRINT ct

finds 505 such 3-digit numbers:

000 001 003 007 008 009 011 013 016 017 019 021 023 024 027 029 031 032 033 037
039 041 043 047 048 049 051 053 056 057 059 061 063 064 067 069 071 072 073 077
079 081 083 087 088 089 091 093 096 097 099 101 103 104 107 109 111 112 113 117
119 121 123 125 127 128 129 131 133 136 137 139 141 143 144 147 149 151 152 153
157 159 161 163 167 168 169 171 173 176 177 179 181 183 184 187 189 191 192 193
197 199 201 203 207 208 209 211 213 216 217 219 221 223 224 227 229 231 232 233
237 239 241 243 247 248 249 251 253 256 257 259 261 263 264 267 269 271 272 273
277 279 281 283 287 288 289 291 293 296 297 299 301 303 304 307 309 311 312 313
317 319 321 323 327 328 329 331 333 336 337 339 341 343 344 347 349 351 352 353
357 359 361 363 367 368 369 371 373 375 376 377 379 381 383 384 387 389 391 392
393 397 399 401 403 407 408 409 411 413 416 417 419 421 423 424 427 429 431 432
433 437 439 441 443 447 448 449 451 453 456 457 459 461 463 464 467 469 471 472
473 477 479 481 483 487 488 489 491 493 496 497 499 501 503 504 507 509 511 512
513 517 519 521 523 527 528 529 531 533 536 537 539 541 543 544 547 549 551 552
553 557 559 561 563 567 568 569 571 573 576 577 579 581 583 584 587 589 591 592
593 597 599 601 603 607 608 609 611 613 616 617 619 621 623 624 625 627 629 631
632 633 637 639 641 643 647 648 649 651 653 656 657 659 661 663 664 667 669 671
672 673 677 679 681 683 687 688 689 691 693 696 697 699 701 703 704 707 709 711
712 713 717 719 721 723 727 728 729 731 733 736 737 739 741 743 744 747 749 751
752 753 757 759 761 763 767 768 769 771 773 776 777 779 781 783 784 787 789 791
792 793 797 799 801 803 807 808 809 811 813 816 817 819 821 823 824 827 829 831
832 833 837 839 841 843 847 848 849 851 853 856 857 859 861 863 864 867 869 871
872 873 875 877 879 881 883 887 888 889 891 893 896 897 899 901 903 904 907 909
911 912 913 917 919 921 923 927 928 929 931 933 936 937 939 941 943 944 947 949
951 952 953 957 959 961 963 967 968 969 971 973 976 977 979 981 983 984 987 989
991 992 993 997 999

which makes the probability 0.505.


  Posted by Charlie on 2011-02-14 01:36:48
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