Cody

Solution 1309530

Submitted on 22 Oct 2017 by Philipp Doblhofer
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
base=4;nstart=2;nend=6;y_correct=62; assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

b = 1 0 p = 4 ans = 4 b = 1 1 p = 5 ans = 5 b = 1 0 0 p = 16 ans = 16 b = 1 0 1 p = 17 ans = 17 b = 1 1 0 p = 20 ans = 20

2   Pass
base=5;nstart=1;nend=1000;y_correct=1193853250; assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

b = 1 p = 1 ans = 1 b = 1 0 p = 5 ans = 5 b = 1 1 p = 6 ans = 6 b = 1 0 0 p = 25 ans = 25 b = 1 0 1 p = 26 ans = 26 b = 1 1 0 p = 30 ans = 30 b = 1 1 1 p = 31 ans = 31 b = 1 0 0 0 p = 125 ans = 125 b = 1 0 0 1 p = 126 ans = 126 b = 1 0 1 0 p = 130 ans = 130 b = 1 0 1 1 p = 131 ans = 131 b = 1 1 0 0 p = 150 ans = 150 b = 1 1 0 1 p = 151 ans = 151 b = 1 1 1 0 p = 155 ans = 155 b = 1 1 1 1 p = 156 ans = 156 b = 1 0 0 0 0 p = 625 ans = 625 b = 1 0 0 0 1 p = 626 ans = 626 b = 1 0 0 1 0 p = 630 ans = 630 b = 1 0 0 1 1 p = 631 ans = 631 b = 1 0 1 0 0 p = 650 ans = 650 b = 1 0 1 0 1 p = 651 ans = 651 b = 1 0 1 1 0 p = 655 ans = 655 b = 1 0 1 1 1 p = 656 ans = 656 b = 1 1 0 0 0 p = 750 ans = 750 b = 1 1 0 0 1 p = 751 ans = 751 b = 1 1 0 1 0 p = 755 ans = 755 b = 1 1 0 1 1 p = 756 ans = 756 b = 1 1 1 0 0 p = 775 ans = 775 b = 1 1 1 0 1 p = 776 ans = 776 b = 1 1 1 1 0 p = 780 ans = 780 b = 1 1 1 1 1 p = 781 ans = 781 b = 1 0 0 0 0 0 p = 3125 ans = 3125 b = 1 0 0 0 0 1 p = 3126 ans = 3126 b = 1 0 0 0 1 0 p = 3130 ans = 3130 b = 1 0 0 0 1 1 p = 3131 ans = 3131 b = 1 0 0 1 0 0 p = 3150 ans = 3150 b = 1 0 0 1 0 1 p = 3151 ans = 3151 b = 1 0 0 1 1 0 p = 3155 ans = 3155 b = 1 0 0 1 1 1 p = 3156 ans = 3156 b = 1 0 1 0 0 0 p = 3250 ans = 3250 b = 1 0 1 0 0 1 p = 3251 ans = 3251 b = 1 0 1 0 1 0 p = 3255 ans = 3255 b = 1 0 1 0 1 1 p = 3256 ans = 3256 b = 1 0 1 1 0 0 p = 3275 ans = 3275 b = 1 0 1 1 0 1 p = 3276 ans = 3276 b = 1 0 1 1 1 0 p = 3280 ans = 3280 b = 1 0 1 1 1 1 p = 3281 ans = 3281 b = 1 1 0 0 0 0 p = 3750 ans = 3750 b = 1 1 0 0 0 1 p = 3751 ans = 3751 b = 1 1 0 0 1 0 p = 3755 ans = 3755 b = 1 1 0 0 1 1 p = 3756 ans = 3756 b = 1 1 0 1 0 0 p = 3775 ans = 3775 b = 1 1 0 1 0 1 p = 3776 ans = 3776 b = 1 1 0 1 1 0 p = 3780 ans = 3780 b = 1 1 0 1 1 1 p = 3781 ans = 3781 b = 1 1 1 0 0 0 p = 3875 ans = 3875 b = 1 1 1 0 0 1 p = 3876 ans = 3876 b = 1 1 1 0 1 0 p = 3880 ans = 3880 b = 1 1 1 0 1 1 p = 3881 ans = 3881 b = 1 1 1 1 0 0 p = 3900 ans = 3900 b = 1 1 1 1 0 1 p = 3901 ans = 3901 b = 1 1 1 1 1 0 p = 3905 ans = 3905 b = 1 1 1 1 1 1 p = 3906 ans = 3906 b = 1 0 0 0 0 0 0 p = 15625 ans = 15625 b = 1 0 0 0 0 0 1 p = 15626 ans = 15626 b = 1 0 0 0 0 1 0 p = 15630 ans = 15630 b = 1 0 0 0 0 1 1 p = 15631 ans = 15631 b = 1 0 0 0 1 0 0 p = 15650 ans = 15650 b = 1 0 0 0 1 0 1 p = 15651 ans = 15651 b = 1 0 0 0 1 1 0 p = 15655 ans = 15655 b = 1 0 0 0 1 1 1 p = 15656 ans = 15656 b = 1 0 0 1 0 0 0 p = 15750 ans = 15750 b = 1 0 0 1 0 0 1 p = 15751 ans = 15751 b = 1 0 0 1 0 1 0 p = 15755 ans = 15755 b = 1 0 0 1 0 1 1 p = 15756 ans = 15756 b = 1 0 0 1 1 0 0 p = 15775 ans = 15775 b = 1 0 0 1 1 0 1 p = 15776 ans = 15776 b = 1 0 0 1 1 1 0 p = 15780 ans = 15780 b = 1 0 0 1 1 1 1 p = 15781 ans = 15781 b = 1 0 1 0 0 0 0 p = 16250 ans = 16250 b = 1 0 1 0 0 0 1 p = 16251 ans = 16251 b = 1 0 1 0 0 1 0 p = 16255 ans = 16255 b = 1 0 1 0 0 1 1 p = 16256 ans = 16256 b = 1 0 1 0 1 0 0 p = 16275 ans = 16275 b = 1 0 1 0 1 0 1 p = 16276 ans = 16276 b = 1 0 1 0 1 1 0 p = 16280 ans = 16280 b = 1 0 1 0 1 1 1 p = 16281 ans = 16281 b = 1 0 1 1 0 0 0 p = 16375 ans = 16375 b = 1 0 1 1 0 0 1 p = 16376 ans = 16376 b = 1 0 1 1 0 1 0 p = 16380 ans = 16380 b = 1 0 1 1 0 1 1 p = 16381 ans = 16381 b = 1 0 1 1 1 0 0 p = 16400 ans = 16400 b = 1 0 1 1 1 0 1 p = 16401 ans = 16401 b = 1 0 1 1 1 1 0 p = 16405 ans = 16405 b = 1 0 1 1 1 1 1 p = 16406 ans = 16406 b = 1 1 0 0 0 0 0 p = 18750 ans = 18750 b = 1 1 0 0 0 0 1 p = 18751 ans = 18751 b = 1 1 0 0 0 1 0 p = 18755 ans = 18755 b = 1 1 0 0 0 1 1 p = 18756 ans = 18756 b = 1 1 0 0 1 0 0 p = 18775 ans = 18775 b = 1 1 0 0 1 0 1 p = 18776 ans = 18776 b = 1 1 0 0 1 1 0 p = 18780 ans = 18780 b = 1 1 0 0 1 1 1 p = 18781 ans = 18781 b = 1 1 0 1 0 0 0 p = 18875 ans = 18875 b = 1 1 0 1 0 0 1 p = 18876 ans = 18876 b = 1 1 0 1 0 1 0 p = 18880 ans = 18880 b = 1 1 0 1 0 1 1 p = 18881 ans = 18881 b = 1 1 0 1 1 0 0 p = 18900 ans = 18900 b = 1 1 0 1 1 0 1 p = 18901 ans = 18901 b = 1 1 0 1 1 1 0 p = 18905 ans = 18905 b = 1 1 0 1 1 1 1 p = 18906 ans = 18906 b = 1 1 1 0 0 0 0 p = 19375 ans = 19375 b = 1 1 1 0 0 0 1 p = 19376 ans = 19376 b = 1 1 1 0 0 1 0 p = 19380 ans = 19380 b = 1 1 1 0 0 1 1 p = 19381 ans = 19381 b = 1 1 1 0 1 0 0 p = 19400 ans = 19400 b = 1 1 1 0 1 0 1 p = 19401 ans = 19401 b = 1 1 1 0 1 1 0 p = 19405 ans = 19405 b = 1 1 1 0 1 1 1 p = 19406 ans = 19406 b = 1 1 1 1 0 0 0 p = 19500 ans = 19500 b = 1 1 1 1 0 0 1 p ...

3   Pass
base=3;nstart=1;nend=1000;y_correct=14438162; assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

b = 1 p = 1 ans = 1 b = 1 0 p = 3 ans = 3 b = 1 1 p = 4 ans = 4 b = 1 0 0 p = 9 ans = 9 b = 1 0 1 p = 10 ans = 10 b = 1 1 0 p = 12 ans = 12 b = 1 1 1 p = 13 ans = 13 b = 1 0 0 0 p = 27 ans = 27 b = 1 0 0 1 p = 28 ans = 28 b = 1 0 1 0 p = 30 ans = 30 b = 1 0 1 1 p = 31 ans = 31 b = 1 1 0 0 p = 36 ans = 36 b = 1 1 0 1 p = 37 ans = 37 b = 1 1 1 0 p = 39 ans = 39 b = 1 1 1 1 p = 40 ans = 40 b = 1 0 0 0 0 p = 81 ans = 81 b = 1 0 0 0 1 p = 82 ans = 82 b = 1 0 0 1 0 p = 84 ans = 84 b = 1 0 0 1 1 p = 85 ans = 85 b = 1 0 1 0 0 p = 90 ans = 90 b = 1 0 1 0 1 p = 91 ans = 91 b = 1 0 1 1 0 p = 93 ans = 93 b = 1 0 1 1 1 p = 94 ans = 94 b = 1 1 0 0 0 p = 108 ans = 108 b = 1 1 0 0 1 p = 109 ans = 109 b = 1 1 0 1 0 p = 111 ans = 111 b = 1 1 0 1 1 p = 112 ans = 112 b = 1 1 1 0 0 p = 117 ans = 117 b = 1 1 1 0 1 p = 118 ans = 118 b = 1 1 1 1 0 p = 120 ans = 120 b = 1 1 1 1 1 p = 121 ans = 121 b = 1 0 0 0 0 0 p = 243 ans = 243 b = 1 0 0 0 0 1 p = 244 ans = 244 b = 1 0 0 0 1 0 p = 246 ans = 246 b = 1 0 0 0 1 1 p = 247 ans = 247 b = 1 0 0 1 0 0 p = 252 ans = 252 b = 1 0 0 1 0 1 p = 253 ans = 253 b = 1 0 0 1 1 0 p = 255 ans = 255 b = 1 0 0 1 1 1 p = 256 ans = 256 b = 1 0 1 0 0 0 p = 270 ans = 270 b = 1 0 1 0 0 1 p = 271 ans = 271 b = 1 0 1 0 1 0 p = 273 ans = 273 b = 1 0 1 0 1 1 p = 274 ans = 274 b = 1 0 1 1 0 0 p = 279 ans = 279 b = 1 0 1 1 0 1 p = 280 ans = 280 b = 1 0 1 1 1 0 p = 282 ans = 282 b = 1 0 1 1 1 1 p = 283 ans = 283 b = 1 1 0 0 0 0 p = 324 ans = 324 b = 1 1 0 0 0 1 p = 325 ans = 325 b = 1 1 0 0 1 0 p = 327 ans = 327 b = 1 1 0 0 1 1 p = 328 ans = 328 b = 1 1 0 1 0 0 p = 333 ans = 333 b = 1 1 0 1 0 1 p = 334 ans = 334 b = 1 1 0 1 1 0 p = 336 ans = 336 b = 1 1 0 1 1 1 p = 337 ans = 337 b = 1 1 1 0 0 0 p = 351 ans = 351 b = 1 1 1 0 0 1 p = 352 ans = 352 b = 1 1 1 0 1 0 p = 354 ans = 354 b = 1 1 1 0 1 1 p = 355 ans = 355 b = 1 1 1 1 0 0 p = 360 ans = 360 b = 1 1 1 1 0 1 p = 361 ans = 361 b = 1 1 1 1 1 0 p = 363 ans = 363 b = 1 1 1 1 1 1 p = 364 ans = 364 b = 1 0 0 0 0 0 0 p = 729 ans = 729 b = 1 0 0 0 0 0 1 p = 730 ans = 730 b = 1 0 0 0 0 1 0 p = 732 ans = 732 b = 1 0 0 0 0 1 1 p = 733 ans = 733 b = 1 0 0 0 1 0 0 p = 738 ans = 738 b = 1 0 0 0 1 0 1 p = 739 ans = 739 b = 1 0 0 0 1 1 0 p = 741 ans = 741 b = 1 0 0 0 1 1 1 p = 742 ans = 742 b = 1 0 0 1 0 0 0 p = 756 ans = 756 b = 1 0 0 1 0 0 1 p = 757 ans = 757 b = 1 0 0 1 0 1 0 p = 759 ans = 759 b = 1 0 0 1 0 1 1 p = 760 ans = 760 b = 1 0 0 1 1 0 0 p = 765 ans = 765 b = 1 0 0 1 1 0 1 p = 766 ans = 766 b = 1 0 0 1 1 1 0 p = 768 ans = 768 b = 1 0 0 1 1 1 1 p = 769 ans = 769 b = 1 0 1 0 0 0 0 p = 810 ans = 810 b = 1 0 1 0 0 0 1 p = 811 ans = 811 b = 1 0 1 0 0 1 0 p = 813 ans = 813 b = 1 0 1 0 0 1 1 p = 814 ans = 814 b = 1 0 1 0 1 0 0 p = 819 ans = 819 b = 1 0 1 0 1 0 1 p = 820 ans = 820 b = 1 0 1 0 1 1 0 p = 822 ans = 822 b = 1 0 1 0 1 1 1 p = 823 ans = 823 b = 1 0 1 1 0 0 0 p = 837 ans = 837 b = 1 0 1 1 0 0 1 p = 838 ans = 838 b = 1 0 1 1 0 1 0 p = 840 ans = 840 b = 1 0 1 1 0 1 1 p = 841 ans = 841 b = 1 0 1 1 1 0 0 p = 846 ans = 846 b = 1 0 1 1 1 0 1 p = 847 ans = 847 b = 1 0 1 1 1 1 0 p = 849 ans = 849 b = 1 0 1 1 1 1 1 p = 850 ans = 850 b = 1 1 0 0 0 0 0 p = 972 ans = 972 b = 1 1 0 0 0 0 1 p = 973 ans = 973 b = 1 1 0 0 0 1 0 p = 975 ans = 975 b = 1 1 0 0 0 1 1 p = 976 ans = 976 b = 1 1 0 0 1 0 0 p = 981 ans = 981 b = 1 1 0 0 1 0 1 p = 982 ans = 982 b = 1 1 0 0 1 1 0 p = 984 ans = 984 b = 1 1 0 0 1 1 1 p = 985 ans = 985 b = 1 1 0 1 0 0 0 p = 999 ans = 999 b = 1 1 0 1 0 0 1 p = 1000 ans = 1000 b = 1 1 0 1 0 1 0 p = 1002 ans = 1002 b = 1 1 0 1 0 1 1 p = 1003 ans = 1003 b = 1 1 0 1 1 0 0 p = 1008 ans = 1008 b = 1 1 0 1 1 0 1 p = 1009 ans = 1009 b = 1 1 0 1 1 1 0 p = 1011 ans = 1011 b = 1 1 0 1 1 1 1 p = 1012 ans = 1012 b = 1 1 1 0 0 0 0 p = 1053 ans = 1053 b = 1 1 1 0 0 0 1 p = 1054 ans = 1054 b = 1 1 1 0 0 1 0 p = 1056 ans = 1056 b = 1 1 1 0 0 1 1 p = 1057 ans = 1057 b = 1 1 1 0 1 0 0 p = 1062 ans = 1062 b = 1 1 1 0 1 0 1 p = 1063 ans = 1063 b = 1 1 1 0 1 1 0 p = 1065 ans = 1065 b = 1 1 1 0 1 1 1 p = 1066 ans = 1066 b = 1 1 1 1 0 0 0 p = 1080 ans = 1080 b = 1 1 1 1 0 0 1 p = 1081 ans = 1081 b = 1 1 1 1 0 1 0 p = 1083 ans = 1083 b = 1 1 1 1 0 1 1 p = 1084 ans = 1084 b = 1 1 1 1 1 0 0 p = 1089 ans = 1089 b = 1 1 1 1 1 0 1 p = 1090 ans = 1090 b = 1 1 1 1 1 1 0 p = 1092 ans = 1092 b = 1 1 1 1 1 1 1 p = 1093 ans = 1093 b = 1 0 0 0 0 0 0 0 p = 2187 ans = 2187 b = 1 0 0 0 0 0 0 1 p = 2188 ans = 2188 b = 1 0 0 0 0 0 1 0 p = 2190 ans = ...

4   Pass
base=3;nstart=100;nend=1000;y_correct=14397354; assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

b = 1 1 0 0 1 0 0 p = 981 ans = 981 b = 1 1 0 0 1 0 1 p = 982 ans = 982 b = 1 1 0 0 1 1 0 p = 984 ans = 984 b = 1 1 0 0 1 1 1 p = 985 ans = 985 b = 1 1 0 1 0 0 0 p = 999 ans = 999 b = 1 1 0 1 0 0 1 p = 1000 ans = 1000 b = 1 1 0 1 0 1 0 p = 1002 ans = 1002 b = 1 1 0 1 0 1 1 p = 1003 ans = 1003 b = 1 1 0 1 1 0 0 p = 1008 ans = 1008 b = 1 1 0 1 1 0 1 p = 1009 ans = 1009 b = 1 1 0 1 1 1 0 p = 1011 ans = 1011 b = 1 1 0 1 1 1 1 p = 1012 ans = 1012 b = 1 1 1 0 0 0 0 p = 1053 ans = 1053 b = 1 1 1 0 0 0 1 p = 1054 ans = 1054 b = 1 1 1 0 0 1 0 p = 1056 ans = 1056 b = 1 1 1 0 0 1 1 p = 1057 ans = 1057 b = 1 1 1 0 1 0 0 p = 1062 ans = 1062 b = 1 1 1 0 1 0 1 p = 1063 ans = 1063 b = 1 1 1 0 1 1 0 p = 1065 ans = 1065 b = 1 1 1 0 1 1 1 p = 1066 ans = 1066 b = 1 1 1 1 0 0 0 p = 1080 ans = 1080 b = 1 1 1 1 0 0 1 p = 1081 ans = 1081 b = 1 1 1 1 0 1 0 p = 1083 ans = 1083 b = 1 1 1 1 0 1 1 p = 1084 ans = 1084 b = 1 1 1 1 1 0 0 p = 1089 ans = 1089 b = 1 1 1 1 1 0 1 p = 1090 ans = 1090 b = 1 1 1 1 1 1 0 p = 1092 ans = 1092 b = 1 1 1 1 1 1 1 p = 1093 ans = 1093 b = 1 0 0 0 0 0 0 0 p = 2187 ans = 2187 b = 1 0 0 0 0 0 0 1 p = 2188 ans = 2188 b = 1 0 0 0 0 0 1 0 p = 2190 ans = 2190 b = 1 0 0 0 0 0 1 1 p = 2191 ans = 2191 b = 1 0 0 0 0 1 0 0 p = 2196 ans = 2196 b = 1 0 0 0 0 1 0 1 p = 2197 ans = 2197 b = 1 0 0 0 0 1 1 0 p = 2199 ans = 2199 b = 1 0 0 0 0 1 1 1 p = 2200 ans = 2200 b = 1 0 0 0 1 0 0 0 p = 2214 ans = 2214 b = 1 0 0 0 1 0 0 1 p = 2215 ans = 2215 b = 1 0 0 0 1 0 1 0 p = 2217 ans = 2217 b = 1 0 0 0 1 0 1 1 p = 2218 ans = 2218 b = 1 0 0 0 1 1 0 0 p = 2223 ans = 2223 b = 1 0 0 0 1 1 0 1 p = 2224 ans = 2224 b = 1 0 0 0 1 1 1 0 p = 2226 ans = 2226 b = 1 0 0 0 1 1 1 1 p = 2227 ans = 2227 b = 1 0 0 1 0 0 0 0 p = 2268 ans = 2268 b = 1 0 0 1 0 0 0 1 p = 2269 ans = 2269 b = 1 0 0 1 0 0 1 0 p = 2271 ans = 2271 b = 1 0 0 1 0 0 1 1 p = 2272 ans = 2272 b = 1 0 0 1 0 1 0 0 p = 2277 ans = 2277 b = 1 0 0 1 0 1 0 1 p = 2278 ans = 2278 b = 1 0 0 1 0 1 1 0 p = 2280 ans = 2280 b = 1 0 0 1 0 1 1 1 p = 2281 ans = 2281 b = 1 0 0 1 1 0 0 0 p = 2295 ans = 2295 b = 1 0 0 1 1 0 0 1 p = 2296 ans = 2296 b = 1 0 0 1 1 0 1 0 p = 2298 ans = 2298 b = 1 0 0 1 1 0 1 1 p = 2299 ans = 2299 b = 1 0 0 1 1 1 0 0 p = 2304 ans = 2304 b = 1 0 0 1 1 1 0 1 p = 2305 ans = 2305 b = 1 0 0 1 1 1 1 0 p = 2307 ans = 2307 b = 1 0 0 1 1 1 1 1 p = 2308 ans = 2308 b = 1 0 1 0 0 0 0 0 p = 2430 ans = 2430 b = 1 0 1 0 0 0 0 1 p = 2431 ans = 2431 b = 1 0 1 0 0 0 1 0 p = 2433 ans = 2433 b = 1 0 1 0 0 0 1 1 p = 2434 ans = 2434 b = 1 0 1 0 0 1 0 0 p = 2439 ans = 2439 b = 1 0 1 0 0 1 0 1 p = 2440 ans = 2440 b = 1 0 1 0 0 1 1 0 p = 2442 ans = 2442 b = 1 0 1 0 0 1 1 1 p = 2443 ans = 2443 b = 1 0 1 0 1 0 0 0 p = 2457 ans = 2457 b = 1 0 1 0 1 0 0 1 p = 2458 ans = 2458 b = 1 0 1 0 1 0 1 0 p = 2460 ans = 2460 b = 1 0 1 0 1 0 1 1 p = 2461 ans = 2461 b = 1 0 1 0 1 1 0 0 p = 2466 ans = 2466 b = 1 0 1 0 1 1 0 1 p = 2467 ans = 2467 b = 1 0 1 0 1 1 1 0 p = 2469 ans = 2469 b = 1 0 1 0 1 1 1 1 p = 2470 ans = 2470 b = 1 0 1 1 0 0 0 0 p = 2511 ans = 2511 b = 1 0 1 1 0 0 0 1 p = 2512 ans = 2512 b = 1 0 1 1 0 0 1 0 p = 2514 ans = 2514 b = 1 0 1 1 0 0 1 1 p = 2515 ans = 2515 b = 1 0 1 1 0 1 0 0 p = 2520 ans = 2520 b = 1 0 1 1 0 1 0 1 p = 2521 ans = 2521 b = 1 0 1 1 0 1 1 0 p = 2523 ans = 2523 b = 1 0 1 1 0 1 1 1 p = 2524 ans = 2524 b = 1 0 1 1 1 0 0 0 p = 2538 ans = 2538 b = 1 0 1 1 1 0 0 1 p = 2539 ans = 2539 b = 1 0 1 1 1 0 1 0 p = 2541 ans = 2541 b = 1 0 1 1 1 0 1 1 p = 2542 ans = 2542 b = 1 0 1 1 1 1 0 0 p = 2547 ans = 2547 b = 1 0 1 1 1 1 0 1 p = 2548 ans = 2548 b = 1 0 1 1 1 1 1 0 p = 2550 ans = 2550 b = 1 0 1 1 1 1 1 1 p = 2551 ans = 2551 b = 1 1 0 0 0 0 0 0 p = 2916 ans = 2916 b = 1 1 0 0 0 0 0 1 p = 2917 ans = 2917 b = 1 1 0 0 0 0 1 0 p = 2919 ans = 2919 b = 1 1 0 0 0 0 1 1 p = 2920 ans = 2920 b = 1 1 0 0 0 1 0 0 p = 2925 ans = 2925 b = 1 1 0 0 0 1 0 1 p = 2926 ans = 2926 b = 1 1 0 0 0 1 1 0 p = 2928 ans = 2928 b = 1 1 0 0 0 1 1 1 p = 2929 ans = 2929 b = 1 1 0 0 1 0 0 0 p = 2943 ans = 2943 b = 1 1 0 0 1 0 0 1 p = 2944 ans = 2944 b = 1 1 0 0 1 0 1 0 p = 2946 ans = 2946 b = 1 1 0 0 1 0 1 1 p = 2947 ans = 2947 b = 1 1 0 0 1 ...

5   Pass
base=2;nstart=1;nend=2017;y_correct=2035153; assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

b = 1 p = 1 ans = 1 b = 1 0 p = 2 ans = 2 b = 1 1 p = 3 ans = 3 b = 1 0 0 p = 4 ans = 4 b = 1 0 1 p = 5 ans = 5 b = 1 1 0 p = 6 ans = 6 b = 1 1 1 p = 7 ans = 7 b = 1 0 0 0 p = 8 ans = 8 b = 1 0 0 1 p = 9 ans = 9 b = 1 0 1 0 p = 10 ans = 10 b = 1 0 1 1 p = 11 ans = 11 b = 1 1 0 0 p = 12 ans = 12 b = 1 1 0 1 p = 13 ans = 13 b = 1 1 1 0 p = 14 ans = 14 b = 1 1 1 1 p = 15 ans = 15 b = 1 0 0 0 0 p = 16 ans = 16 b = 1 0 0 0 1 p = 17 ans = 17 b = 1 0 0 1 0 p = 18 ans = 18 b = 1 0 0 1 1 p = 19 ans = 19 b = 1 0 1 0 0 p = 20 ans = 20 b = 1 0 1 0 1 p = 21 ans = 21 b = 1 0 1 1 0 p = 22 ans = 22 b = 1 0 1 1 1 p = 23 ans = 23 b = 1 1 0 0 0 p = 24 ans = 24 b = 1 1 0 0 1 p = 25 ans = 25 b = 1 1 0 1 0 p = 26 ans = 26 b = 1 1 0 1 1 p = 27 ans = 27 b = 1 1 1 0 0 p = 28 ans = 28 b = 1 1 1 0 1 p = 29 ans = 29 b = 1 1 1 1 0 p = 30 ans = 30 b = 1 1 1 1 1 p = 31 ans = 31 b = 1 0 0 0 0 0 p = 32 ans = 32 b = 1 0 0 0 0 1 p = 33 ans = 33 b = 1 0 0 0 1 0 p = 34 ans = 34 b = 1 0 0 0 1 1 p = 35 ans = 35 b = 1 0 0 1 0 0 p = 36 ans = 36 b = 1 0 0 1 0 1 p = 37 ans = 37 b = 1 0 0 1 1 0 p = 38 ans = 38 b = 1 0 0 1 1 1 p = 39 ans = 39 b = 1 0 1 0 0 0 p = 40 ans = 40 b = 1 0 1 0 0 1 p = 41 ans = 41 b = 1 0 1 0 1 0 p = 42 ans = 42 b = 1 0 1 0 1 1 p = 43 ans = 43 b = 1 0 1 1 0 0 p = 44 ans = 44 b = 1 0 1 1 0 1 p = 45 ans = 45 b = 1 0 1 1 1 0 p = 46 ans = 46 b = 1 0 1 1 1 1 p = 47 ans = 47 b = 1 1 0 0 0 0 p = 48 ans = 48 b = 1 1 0 0 0 1 p = 49 ans = 49 b = 1 1 0 0 1 0 p = 50 ans = 50 b = 1 1 0 0 1 1 p = 51 ans = 51 b = 1 1 0 1 0 0 p = 52 ans = 52 b = 1 1 0 1 0 1 p = 53 ans = 53 b = 1 1 0 1 1 0 p = 54 ans = 54 b = 1 1 0 1 1 1 p = 55 ans = 55 b = 1 1 1 0 0 0 p = 56 ans = 56 b = 1 1 1 0 0 1 p = 57 ans = 57 b = 1 1 1 0 1 0 p = 58 ans = 58 b = 1 1 1 0 1 1 p = 59 ans = 59 b = 1 1 1 1 0 0 p = 60 ans = 60 b = 1 1 1 1 0 1 p = 61 ans = 61 b = 1 1 1 1 1 0 p = 62 ans = 62 b = 1 1 1 1 1 1 p = 63 ans = 63 b = 1 0 0 0 0 0 0 p = 64 ans = 64 b = 1 0 0 0 0 0 1 p = 65 ans = 65 b = 1 0 0 0 0 1 0 p = 66 ans = 66 b = 1 0 0 0 0 1 1 p = 67 ans = 67 b = 1 0 0 0 1 0 0 p = 68 ans = 68 b = 1 0 0 0 1 0 1 p = 69 ans = 69 b = 1 0 0 0 1 1 0 p = 70 ans = 70 b = 1 0 0 0 1 1 1 p = 71 ans = 71 b = 1 0 0 1 0 0 0 p = 72 ans = 72 b = 1 0 0 1 0 0 1 p = 73 ans = 73 b = 1 0 0 1 0 1 0 p = 74 ans = 74 b = 1 0 0 1 0 1 1 p = 75 ans = 75 b = 1 0 0 1 1 0 0 p = 76 ans = 76 b = 1 0 0 1 1 0 1 p = 77 ans = 77 b = 1 0 0 1 1 1 0 p = 78 ans = 78 b = 1 0 0 1 1 1 1 p = 79 ans = 79 b = 1 0 1 0 0 0 0 p = 80 ans = 80 b = 1 0 1 0 0 0 1 p = 81 ans = 81 b = 1 0 1 0 0 1 0 p = 82 ans = 82 b = 1 0 1 0 0 1 1 p = 83 ans = 83 b = 1 0 1 0 1 0 0 p = 84 ans = 84 b = 1 0 1 0 1 0 1 p = 85 ans = 85 b = 1 0 1 0 1 1 0 p = 86 ans = 86 b = 1 0 1 0 1 1 1 p = 87 ans = 87 b = 1 0 1 1 0 0 0 p = 88 ans = 88 b = 1 0 1 1 0 0 1 p = 89 ans = 89 b = 1 0 1 1 0 1 0 p = 90 ans = 90 b = 1 0 1 1 0 1 1 p = 91 ans = 91 b = 1 0 1 1 1 0 0 p = 92 ans = 92 b = 1 0 1 1 1 0 1 p = 93 ans = 93 b = 1 0 1 1 1 1 0 p = 94 ans = 94 b = 1 0 1 1 1 1 1 p = 95 ans = 95 b = 1 1 0 0 0 0 0 p = 96 ans = 96 b = 1 1 0 0 0 0 1 p = 97 ans = 97 b = 1 1 0 0 0 1 0 p = 98 ans = 98 b = 1 1 0 0 0 1 1 p = 99 ans = 99 b = 1 1 0 0 1 0 0 p = 100 ans = 100 b = 1 1 0 0 1 0 1 p = 101 ans = 101 b = 1 1 0 0 1 1 0 p = 102 ans = 102 b = 1 1 0 0 1 1 1 p = 103 ans = 103 b = 1 1 0 1 0 0 0 p = 104 ans = 104 b = 1 1 0 1 0 0 1 p = 105 ans = 105 b = 1 1 0 1 0 1 0 p = 106 ans = 106 b = 1 1 0 1 0 1 1 p = 107 ans = 107 b = 1 1 0 1 1 0 0 p = 108 ans = 108 b = 1 1 0 1 1 0 1 p = 109 ans = 109 b = 1 1 0 1 1 1 0 p = 110 ans = 110 b = 1 1 0 1 1 1 1 p = 111 ans = 111 b = 1 1 1 0 0 0 0 p = 112 ans = 112 b = 1 1 1 0 0 0 1 p = 113 ans = 113 b = 1 1 1 0 0 1 0 p = 114 ans = 114 b = 1 1 1 0 0 1 1 p = 115 ans = 115 b = 1 1 1 0 1 0 0 p = 116 ans = 116 b = 1 1 1 0 1 0 1 p = 117 ans = 117 b = 1 1 1 0 1 1 0 p = 118 ans = 118 b = 1 1 1 0 1 1 1 p = 119 ans = 119 b = 1 1 1 1 0 0 0 p = 120 ans = 120 b = 1 1 1 1 0 0 1 p = 121 ans = 121 b = 1 1 1 1 0 1 0 p = 122 ans = 122 b = 1 1 1 1 0 1 1 p = 123 ans = 123 b = 1 1 1 1 1 0 0 p = 124 ans = 124 b = 1 1 1 1 1 0 1 p = 125 ans = 125 b = 1 1 1 1 1 1 0 p = 126 ans = 126 b = 1 1 1 1 1 1 1 p = 127 ans = 127 b = 1 0 0 0 0 0 0 0 p = 128 ans = 128 b = 1 0 0 0 0 0 0 1 p = 129 ans = 129 b = 1 0 0 0 0 0 1 0 p = 130 ans = 130 b = 1 0 0 0 0 0 1 1 p = 131 ans = 131 b = 1 0 0 0 0 1 0 0 p = 132 ans = 132 b = 1 0 0 0 0 1 0 1 p = 133 ans = 133 b = 1 0 0 0 0 1 ...

6   Pass
base=7;nstart=1234;nend=2345;y_correct=843569026324; assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

b = 1 0 0 1 1 0 1 0 0 1 0 p = 283418849 ans = 283418849 b = 1 0 0 1 1 0 1 0 0 1 1 p = 283418850 ans = 283418850 b = 1 0 0 1 1 0 1 0 1 0 0 p = 283418891 ans = 283418891 b = 1 0 0 1 1 0 1 0 1 0 1 p = 283418892 ans = 283418892 b = 1 0 0 1 1 0 1 0 1 1 0 p = 283418898 ans = 283418898 b = 1 0 0 1 1 0 1 0 1 1 1 p = 283418899 ans = 283418899 b = 1 0 0 1 1 0 1 1 0 0 0 p = 283419185 ans = 283419185 b = 1 0 0 1 1 0 1 1 0 0 1 p = 283419186 ans = 283419186 b = 1 0 0 1 1 0 1 1 0 1 0 p = 283419192 ans = 283419192 b = 1 0 0 1 1 0 1 1 0 1 1 p = 283419193 ans = 283419193 b = 1 0 0 1 1 0 1 1 1 0 0 p = 283419234 ans = 283419234 b = 1 0 0 1 1 0 1 1 1 0 1 p = 283419235 ans = 283419235 b = 1 0 0 1 1 0 1 1 1 1 0 p = 283419241 ans = 283419241 b = 1 0 0 1 1 0 1 1 1 1 1 p = 283419242 ans = 283419242 b = 1 0 0 1 1 1 0 0 0 0 0 p = 283433248 ans = 283433248 b = 1 0 0 1 1 1 0 0 0 0 1 p = 283433249 ans = 283433249 b = 1 0 0 1 1 1 0 0 0 1 0 p = 283433255 ans = 283433255 b = 1 0 0 1 1 1 0 0 0 1 1 p = 283433256 ans = 283433256 b = 1 0 0 1 1 1 0 0 1 0 0 p = 283433297 ans = 283433297 b = 1 0 0 1 1 1 0 0 1 0 1 p = 283433298 ans = 283433298 b = 1 0 0 1 1 1 0 0 1 1 0 p = 283433304 ans = 283433304 b = 1 0 0 1 1 1 0 0 1 1 1 p = 283433305 ans = 283433305 b = 1 0 0 1 1 1 0 1 0 0 0 p = 283433591 ans = 283433591 b = 1 0 0 1 1 1 0 1 0 0 1 p = 283433592 ans = 283433592 b = 1 0 0 1 1 1 0 1 0 1 0 p = 283433598 ans = 283433598 b = 1 0 0 1 1 1 0 1 0 1 1 p = 283433599 ans = 283433599 b = 1 0 0 1 1 1 0 1 1 0 0 p = 283433640 ans = 283433640 b = 1 0 0 1 1 1 0 1 1 0 1 p = 283433641 ans = 283433641 b = 1 0 0 1 1 1 0 1 1 1 0 p = 283433647 ans = 283433647 b = 1 0 0 1 1 1 0 1 1 1 1 p = 283433648 ans = 283433648 b = 1 0 0 1 1 1 1 0 0 0 0 p = 283435649 ans = 283435649 b = 1 0 0 1 1 1 1 0 0 0 1 p = 283435650 ans = 283435650 b = 1 0 0 1 1 1 1 0 0 1 0 p = 283435656 ans = 283435656 b = 1 0 0 1 1 1 1 0 0 1 1 p = 283435657 ans = 283435657 b = 1 0 0 1 1 1 1 0 1 0 0 p = 283435698 ans = 283435698 b = 1 0 0 1 1 1 1 0 1 0 1 p = 283435699 ans = 283435699 b = 1 0 0 1 1 1 1 0 1 1 0 p = 283435705 ans = 283435705 b = 1 0 0 1 1 1 1 0 1 1 1 p = 283435706 ans = 283435706 b = 1 0 0 1 1 1 1 1 0 0 0 p = 283435992 ans = 283435992 b = 1 0 0 1 1 1 1 1 0 0 1 p = 283435993 ans = 283435993 b = 1 0 0 1 1 1 1 1 0 1 0 p = 283435999 ans = 283435999 b = 1 0 0 1 1 1 1 1 0 1 1 p = 283436000 ans = 283436000 b = 1 0 0 1 1 1 1 1 1 0 0 p = 283436041 ans = 283436041 b = 1 0 0 1 1 1 1 1 1 0 1 p = 283436042 ans = 283436042 b = 1 0 0 1 1 1 1 1 1 1 0 p = 283436048 ans = 283436048 b = 1 0 0 1 1 1 1 1 1 1 1 p = 283436049 ans = 283436049 b = 1 0 1 0 0 0 0 0 0 0 0 p = 288240050 ans = 288240050 b = 1 0 1 0 0 0 0 0 0 0 1 p = 288240051 ans = 288240051 b = 1 0 1 0 0 0 0 0 0 1 0 p = 288240057 ans = 288240057 b = 1 0 1 0 0 0 0 0 0 1 1 p = 288240058 ans = 288240058 b = 1 0 1 0 0 0 0 0 1 0 0 p = 288240099 ans = 288240099 b = 1 0 1 0 0 0 0 0 1 0 1 p = 288240100 ans = 288240100 b = 1 0 1 0 0 0 0 0 1 1 0 p = 288240106 ans = 288240106 b = 1 0 1 0 0 0 0 0 1 1 1 p = 288240107 ans = 288240107 b = 1 0 1 0 0 0 0 1 0 0 0 p = 288240393 ans = 288240393 b = 1 0 1 0 0 0 0 1 0 0 1 p = 288240394 ans = 288240394 b = 1 0 1 0 0 0 0 1 0 1 0 p = 288240400 ans = 288240400 b = 1 0 1 0 0 0 0 1 0 1 1 p = 288240401 ans = 288240401 b = 1 0 1 0 0 0 0 1 1 0 0 p = 288240442 ans = 288240442 b = 1 0 1 0 0 0 0 1 1 0 1 p = 288240443 ans = 288240443 b = 1 0 1 0 0 0 0 1 1 1 0 p = 288240449 ans = 288240449 b = 1 0 1 0 0 0 0 1 1 1 1 p = 288240450 ans = 288240450 b = 1 0 1 0 0 0 1 0 0 0 0 p = 288242451 ans = 288242451 b = 1 0 1 0 0 0 1 0 0 0 1 p = 288242452 ans = 288242452 b = 1 0 1 0 0 0 1 0 0 1 0 p = 288242458 ans = 288242458 b = 1 0 1 0 0 0 1 0 0 1 1 p = 288242459 ans = 288242459 b = 1 0 1 0 0 0 1 0 1 0 0 p = 288242500 ans = 288242500 b = 1 0 1 0 0 0 1 0 1 0 1 p = 288242501 ans = 288242501 b = 1 0 1 0 0 0 1 0 1 1 0 p = 288242507 ans = 288242507 b = 1 0 1 0 0 0 1 0 1 1 1 p = 288242508 ans = 288242508 b = 1 0 1 0 0 0 1 1 0 0 0 p = 288242794 ans = 288242794 b = 1 0 1 0 0 0 1 1 0 0 1 p = 288242795 ans = 288242795 b = 1 0 1 0 0 0 1 1 0 1 0 p = 288242801 ans = 288242801 b = 1 0 1 0 0 0 1 1 0 1 1 p = 288242802 ans = 288242802 b = 1 0 1 0 0 0 1 1 1 0 0 p = 288242843 ans = 288242843 b = 1 0 1 0 0 0 1 1 1 0 1 p = 288242844 ans = 288242844 b = 1 0 1 0 0 0 1 1 1 1 0 p = 288242850 ans = 288242850 b = 1 0 1 0 0 0 1 1 1 1 1 p = 288242851 ans = 288242851 b = 1 0 1 0 0 1 0 0 0 0 0 p = 288256857 ans = 288256857 b = 1 0 1 0 0 1 0 0 0 0 1 p = 288256858 ans = 288256858 b = 1 0 1 0 0 1 0 0 0 1 0 p = 288256864 ans = 288256864 b = 1 0 1 0 0 1 0 0 0 1 1 p = 288256865 ans = 288256865 b = 1 0 1 0 0 1 0 0 1 0 0 p = 288256906 ans = 288256906 b = 1 0 1 0 0 1 0 0 1 0 1 p = 288256907 ans = 288256907 b = 1 0 1 0 0 1 0 0 1 1 0 p = 288256913 ans = 288256913 b = 1 0 1 0 0 1 0 0 1 1 1 p = 288256914 ans = 288256914 b = 1 0 1 ...

7   Pass
base=7;nstart=1;nend=10;y_correct=1265; assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

b = 1 p = 1 ans = 1 b = 1 0 p = 7 ans = 7 b = 1 1 p = 8 ans = 8 b = 1 0 0 p = 49 ans = 49 b = 1 0 1 p = 50 ans = 50 b = 1 1 0 p = 56 ans = 56 b = 1 1 1 p = 57 ans = 57 b = 1 0 0 0 p = 343 ans = 343 b = 1 0 0 1 p = 344 ans = 344 b = 1 0 1 0 p = 350 ans = 350

8   Pass
nstart=1;nend=50; junk=arrayfun(@(base) sum_distinct_powers(base,nstart,nend),2:10); y_correct=[1275 7120 26365 75000 178591 374560 714465 1266280 2116675]; assert(isequal(junk,y_correct))

b = 1 p = 1 ans = 1 b = 1 0 p = 2 ans = 2 b = 1 1 p = 3 ans = 3 b = 1 0 0 p = 4 ans = 4 b = 1 0 1 p = 5 ans = 5 b = 1 1 0 p = 6 ans = 6 b = 1 1 1 p = 7 ans = 7 b = 1 0 0 0 p = 8 ans = 8 b = 1 0 0 1 p = 9 ans = 9 b = 1 0 1 0 p = 10 ans = 10 b = 1 0 1 1 p = 11 ans = 11 b = 1 1 0 0 p = 12 ans = 12 b = 1 1 0 1 p = 13 ans = 13 b = 1 1 1 0 p = 14 ans = 14 b = 1 1 1 1 p = 15 ans = 15 b = 1 0 0 0 0 p = 16 ans = 16 b = 1 0 0 0 1 p = 17 ans = 17 b = 1 0 0 1 0 p = 18 ans = 18 b = 1 0 0 1 1 p = 19 ans = 19 b = 1 0 1 0 0 p = 20 ans = 20 b = 1 0 1 0 1 p = 21 ans = 21 b = 1 0 1 1 0 p = 22 ans = 22 b = 1 0 1 1 1 p = 23 ans = 23 b = 1 1 0 0 0 p = 24 ans = 24 b = 1 1 0 0 1 p = 25 ans = 25 b = 1 1 0 1 0 p = 26 ans = 26 b = 1 1 0 1 1 p = 27 ans = 27 b = 1 1 1 0 0 p = 28 ans = 28 b = 1 1 1 0 1 p = 29 ans = 29 b = 1 1 1 1 0 p = 30 ans = 30 b = 1 1 1 1 1 p = 31 ans = 31 b = 1 0 0 0 0 0 p = 32 ans = 32 b = 1 0 0 0 0 1 p = 33 ans = 33 b = 1 0 0 0 1 0 p = 34 ans = 34 b = 1 0 0 0 1 1 p = 35 ans = 35 b = 1 0 0 1 0 0 p = 36 ans = 36 b = 1 0 0 1 0 1 p = 37 ans = 37 b = 1 0 0 1 1 0 p = 38 ans = 38 b = 1 0 0 1 1 1 p = 39 ans = 39 b = 1 0 1 0 0 0 p = 40 ans = 40 b = 1 0 1 0 0 1 p = 41 ans = 41 b = 1 0 1 0 1 0 p = 42 ans = 42 b = 1 0 1 0 1 1 p = 43 ans = 43 b = 1 0 1 1 0 0 p = 44 ans = 44 b = 1 0 1 1 0 1 p = 45 ans = 45 b = 1 0 1 1 1 0 p = 46 ans = 46 b = 1 0 1 1 1 1 p = 47 ans = 47 b = 1 1 0 0 0 0 p = 48 ans = 48 b = 1 1 0 0 0 1 p = 49 ans = 49 b = 1 1 0 0 1 0 p = 50 ans = 50 b = 1 p = 1 ans = 1 b = 1 0 p = 3 ans = 3 b = 1 1 p = 4 ans = 4 b = 1 0 0 p = 9 ans = 9 b = 1 0 1 p = 10 ans = 10 b = 1 1 0 p = 12 ans = 12 b = 1 1 1 p = 13 ans = 13 b = 1 0 0 0 p = 27 ans = 27 b = 1 0 0 1 p = 28 ans = 28 b = 1 0 1 0 p = 30 ans = 30 b = 1 0 1 1 p = 31 ans = 31 b = 1 1 0 0 p = 36 ans = 36 b = 1 1 0 1 p = 37 ans = 37 b = 1 1 1 0 p = 39 ans = 39 b = 1 1 1 1 p = 40 ans = 40 b = 1 0 0 0 0 p = 81 ans = 81 b = 1 0 0 0 1 p = 82 ans = 82 b = 1 0 0 1 0 p = 84 ans = 84 b = 1 0 0 1 1 p = 85 ans = 85 b = 1 0 1 0 0 p = 90 ans = 90 b = 1 0 1 0 1 p = 91 ans = 91 b = 1 0 1 1 0 p = 93 ans = 93 b = 1 0 1 1 1 p = 94 ans = 94 b = 1 1 0 0 0 p = 108 ans = 108 b = 1 1 0 0 1 p = 109 ans = 109 b = 1 1 0 1 0 p = 111 ans = 111 b = 1 1 0 1 1 p = 112 ans = 112 b = 1 1 1 0 0 p = 117 ans = 117 b = 1 1 1 0 1 p = 118 ans = 118 b = 1 1 1 1 0 p = 120 ans = 120 b = 1 1 1 1 1 p = 121 ans = 121 b = 1 0 0 0 0 0 p = 243 ans = 243 b = 1 0 0 0 0 1 p = 244 ans = 244 b = 1 0 0 0 1 0 p = 246 ans = 246 b = 1 0 0 0 1 1 p = 247 ans = 247 b = 1 0 0 1 0 0 p = 252 ans = 252 b = 1 0 0 1 0 1 p = 253 ans = 253 b = 1 0 0 1 1 0 p = 255 ans = 255 b = 1 0 0 1 1 1 p = 256 ans = 256 b = 1 0 1 0 0 0 p = 270 ans = 270 b = 1 0 1 0 0 1 p = 271 ans = 271 b = 1 0 1 0 1 0 p = 273 ans = 273 b = 1 0 1 0 1 1 p = 274 ans = 274 b = 1 0 1 1 0 0 p = 279 ans = 279 b = 1 0 1 1 0 1 p = 280 ans = 280 b = 1 0 1 1 1 0 p = 282 ans = 282 b = 1 0 1 1 1 1 p = 283 ans = 283 b = 1 1 0 0 0 0 p = 324 ans = 324 b = 1 1 0 0 0 1 p = 325 ans = 325 b = 1 1 0 0 1 0 p = 327 ans = 327 b = 1 p = 1 ans = 1 b = 1 0 p = 4 ans = 4 b = 1 1 p = 5 ans = 5 b = 1 0 0 p = 16 ans = 16 b = 1 0 1 p = 17 ans = 17 b = 1 1 0 p = 20 ans = 20 b = 1 1 1 p = 21 ans = 21 b = 1 0 0 0 p = 64 ans = 64 b = 1 0 0 1 p = 65 ans = 65 b = 1 0 1 0 p = 68 ans = 68 b = 1 0 1 1 p = 69 ans = 69 b = 1 1 0 0 p = 80 ans = 80 b = 1 1 0 1 p = 81 ans = 81 b = 1 1 1 0 p = 84 ans = 84 b = 1 1 1 1 p = 85 ans = 85 b = 1 0 0 0 0 p = 256 ans = 256 b = 1 0 0 0 1 p = 257 ans = 257 b = 1 0 0 1 0 p = 260 ans = 260 b = 1 0 0 1 1 p = 261 ans = 261 b = 1 0 1 0 0 p = 272 ans = 272 b = 1 0 1 0 1 p = 273 ans = 273 b = 1 0 1 1 0 p = 276 ans = 276 b = 1 0 1 1 1 p = 277 ans = 277 b = 1 1 0 0 0 p = 320 ans = 320 b = 1 1 0 0 1 p = 321 ans = 321 b = 1 1 0 1 0 p = 324 ans = 324 b = 1 1 0 1 1 p = 325 ans = 325 b = 1 1 1 0 0 p = 336 ans = 336 b = 1 1 1 0 1 p = 337 ans = 337 b = 1 1 1 1 0 p = 340 ans = 340 b = 1 1 1 1 1 p = 341 ans = 341 b = 1 0 0 0 0 0 p = 1024 ans = 1024 b = 1 0 0 0 0 1 p = 1025 ans = 1025 b = 1 0 0 0 1 0 p = 1028 ans = 1028 b = 1 0 0 0 1 1 p = 1029 ans = 1029 b = 1 0 0 1 0 0 p = 1040 ans = 1040 b = 1 0 0 1 0 1 p = 1041 ans = 1041 b = 1 0 0 1 1 0 p = 1044 ans = 1044 b = 1 0 0 1 1 1 p = 1045 ans = 1045 b = 1 0 1 0 0 0 p = 1088 ans = 1088 b = 1 0 1 0 0 1 p = 1089 ans = 1089 b = 1 0 1 0 1 0 p = 1092 ans = 1092 b = 1 0 1 0 1 1 p = 1093 ans = 1093 b = 1 0 1 1 0 0 p = 1104 ans = 1104 b = 1 0 1 1 0 1 p = 1105 ans = 1105 b = 1 0 1 1 1 0 p = 1108 ans = 1108 b = 1 0 1 1 1 1 ...