Iccanobif primes
var count = 25
var index = 0
for n in (1..Inf) {
var t = n.fib.flip -> is_prob_prime || next
var s = Str(t)
s = "#{s.first(20)}..#{s.last(20)} (#{s.len} digits)" if (s.len>50)
say "#{'%2d' % ++index}: #{s}"
count == index && break
}
Output:
1: 2
2: 3
3: 5
4: 31
5: 43
6: 773
7: 7951
8: 64901
9: 52057
10: 393121
11: 56577108676171
12: 940647607443258103531
13: 5237879497657222310489731409575442761
14: 9026258083384996860449366072142307801963
15: 19900335674812302969..34431012073266446403 (80 digits)
16: 77841137362967479985..52312097783685331923 (104 digits)
17: 37722585901567604188..29174997072830756131 (137 digits)
18: 75736193894876131595..50767238644714305761 (330 digits)
19: 17890336847332837620..13175300695235035913 (406 digits)
20: 92327163101729115305..27061468856047302507 (409 digits)
21: 50420157810698056253..67335124247362214481 (503 digits)
22: 30511012474739380092..69296158361330018201 (888 digits)
23: 46818547042693694555..08664543144645856321 (1020 digits)
24: 87101347853037819884..20128396998865227391 (1122 digits)
25: 17451656022543765336..20100243761843652461 (1911 digits)
Last updated