Numbers whose binary and ternary digit sums are prime: Difference between revisions

(Added Wren)
Line 124:
 
see "working..." + nl
see "Numbers < 200 whose binary and ternary digit sums are prime:" + nl
 
decList = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
baseList = ["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"]
 
num = 0
limit = 200
 
Line 142 ⟶ 144:
next
if isprime(sumBin) and isprime(sumTer)
num = num + 1
see "" + num + ". {" + n + "," + strBin + ":" + sumBin + "," + strTer + ":" + sumTer + "}" + nl
ok
next
 
see "Found " + num + " such numbers" + nl
see "done..." + nl
 
Line 167 ⟶ 171:
<pre style="height:24em">
working...
Numbers < 200 whose binary and ternary digit sums are prime:
{5,101:2,12:3}
1. {65,110101:2,2012:23}
2. {76,111110:32,2120:32}
3. {107,1010111:23,10121:23}
4. {1110,10111010:32,102101:32}
5. {1211,11001011:23,110102:23}
6. {1312,11011100:32,111110:32}
7. {1713,100011101:23,122111:53}
8. {1817,1001010001:2,200122:25}
9. {1918,1001110010:32,201200:32}
10. {2119,1010110011:3,210201:3}
11. {2521,1100110101:3,221210:53}
12. {2825,1110011001:3,1001221:25}
13. {3128,1111111100:53,10111001:32}
14. {3331,10000111111:25,10201011:3}
15. {3533,100011100001:32,10221020:53}
16. {3635,100100100011:23,11001022:25}
17. {3736,100101100100:32,11011100:32}
18. {4137,101001100101:3,11121101:53}
19. {4741,101111101001:53,12021112:5}
20. {4947,110001101111:35,12111202:5}
21. {5549,110111110001:53,20011211:35}
22. {5955,111011110111:5,20122001:53}
23. {6159,111101111011:5,20212012:5}
24. {6561,1000001111101:25,21022021:5}
25. {6765,10000111000001:32,21112102:5}
26. {6967,10001011000011:3,21202111:5}
27. {7369,10010011000101:3,22012120:5}
28. {7973,10011111001001:53,22212201:75}
29. {8279,10100101001111:35,100012221:27}
30. {8482,10101001010010:3,1001010001:2}
31. {8784,10101111010100:53,1002010010:32}
32. {9187,10110111010111:5,1010110020:3}
33. {9391,10111011011011:5,1011010101:3}
34. {9793,11000011011101:35,1012110110:53}
35. {10397,11001111100001:53,1021110121:5}
36. {107103,11010111100111:5,1022210211:75}
37. {109107,11011011101011:5,1100110222:37}
38. {115109,11100111101101:5,1102111001:53}
39. {117115,11101011110011:5,1110011021:35}
40. {121117,11110011110101:5,1111111100:53}
41. {127121,11111111111001:75,1120111111:5}
42. {129127,100000011111111:27,1121011201:5}
43. {131129,1000001110000001:32,1121211210:75}
44. {133131,1000010110000011:3,1122111212:7}
45. {137133,1000100110000101:3,1200211221:57}
46. {143137,1000111110001001:53,1202212002:75}
47. {145143,1001000110001111:35,1210112022:57}
48. {151145,1001011110010001:53,1212112101:75}
49. {155151,1001101110010111:5,1220212121:7}
50. {157155,1001110110011011:5,1221112202:7}
51. {162157,1010001010011101:35,2000012211:27}
52. {167162,1010011110100010:53,2001220000:52}
53. {171167,1010101110100111:5,2010020012:35}
54. {173171,1010110110101011:5,2010220100:53}
55. {179173,1011001110101101:5,2012220102:75}
56. {181179,1011010110110011:5,2020120122:57}
57. {185181,1011100110110101:5,2021220201:75}
58. {191185,1011111110111001:75,2100220212:57}
59. {193191,1100000110111111:37,2101121002:5}
60. {199193,1100011111000001:53,2110121011:5}
61. {199,11000111:5,21101:5}
Found 61 such numbers
done...
</pre>
2,468

edits