the numbers output by the following Perl script are easy to mentally multiply by any 1-digit number 0 1 2 3 4 5 6 7 8 9:
perl -lwe '$c=0; for(0..1999){ next unless/^[0-9]([0-1]|0+[1-9])*$/; print; ++$c; END{ print"(count=$c)"}}'
0 1 2 3 4 5 6 7 8 9 10 11 20 21 30 31 40 41 50 51 60 61 70 71 80 81 90 91 100 101 102 103 104 105 106 107 108 109 110 111 200 201 202 203 204 205 206 207 208 209 210 211 300 301 302 303 304 305 306 307 308 309 310 311 400 401 402 403 404 405 406 407 408 409 410 411 500 501 502 503 504 505 506 507 508 509 510 511 600 601 602 603 604 605 606 607 608 609 610 611 700 701 702 703 704 705 706 707 708 709 710 711 800 801 802 803 804 805 806 807 808 809 810 811 900 901 902 903 904 905 906 907 908 909 910 911 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1020 1021 1030 1031 1040 1041 1050 1051 1060 1061 1070 1071 1080 1081 1090 1091 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 (count=176)
although some of the multiplications induce carries, they carry into a zero, so it is easy.
modify the subexpression [0-1] in the regular expression to [0-2] to get the larger set of numbers for which it is easy to multiply by 0 1 2 3 4:
perl -lwe '$c=0; for(0..1999){ next unless/^[0-9]([0-2]|0+[1-9])*$/; print; ++$c; END{ print"(count=$c)"}}'
0 1 2 3 4 5 6 7 8 9 10 11 12 20 21 22 30 31 32 40 41 42 50 51 52 60 61 62 70 71 72 80 81 82 90 91 92 100 101 102 103 104 105 106 107 108 109 110 111 112 120 121 122 200 201 202 203 204 205 206 207 208 209 210 211 212 220 221 222 300 301 302 303 304 305 306 307 308 309 310 311 312 320 321 322 400 401 402 403 404 405 406 407 408 409 410 411 412 420 421 422 500 501 502 503 504 505 506 507 508 509 510 511 512 520 521 522 600 601 602 603 604 605 606 607 608 609 610 611 612 620 621 622 700 701 702 703 704 705 706 707 708 709 710 711 712 720 721 722 800 801 802 803 804 805 806 807 808 809 810 811 812 820 821 822 900 901 902 903 904 905 906 907 908 909 910 911 912 920 921 922 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1020 1021 1022 1030 1031 1032 1040 1041 1042 1050 1051 1052 1060 1061 1062 1070 1071 1072 1080 1081 1082 1090 1091 1092 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1120 1121 1122 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1220 1221 1222 (count=250)
modify to [0-3] to get numbers easy to multiply by 0 1 2 3: (count=356) up to 1999
modify to [0-4] to get numbers easy to multiply 0 1 2: (count=500) up to 1999
open problems: generate these lists in order directly, not using filtering. create a regex that that does not require backtracking.
what is the asymptotic density? probably something involving sqrt.
investigate numbers on a list divisible by other numbers on the list. numbers form connections to other numbers, a directed graph. it also feels a little like the word problem in computer science.
products yielding numbers with small digits might be useful for further connections in the graph:
102 = 2 * 3 * 17
110 = 2 * 5 * 11
111 = 3 * 37
112 = 2^4 * 7
120 = 2^3 * 3 * 5
121 = 11^2
122 = 2 * 61
200 = 2^3 * 5^2
201 = 3 * 67
202 = 2 * 101
210 = 2 * 3 * 5 * 7
212 = 2^2 * 53
220 = 2^2 * 5 * 11
221 = 13 * 17
222 = 2 * 3 * 37
future post piqwhqfy on 221 and 102.
"easy" assumes you have the 10x10 multiplication table memorized. what if you had more?
No comments:
Post a Comment