Anaprimes: Difference between revisions
Content added Content deleted
(Added Sidef) |
m (→{{header|Sidef}}: sort the groups before printing) |
||
Line 1,121: | Line 1,121: | ||
var m = G.map{.len}.max |
var m = G.map{.len}.max |
||
printf("Largest group of anaprimes before %s: %s members.\n", commify(10**k), m) |
printf("Largest group of anaprimes before %s: %s members.\n", commify(10**k), m) |
||
G.grep { .len == m }.each {|group| |
G.grep { .len == m }.sort.each {|group| |
||
say "First: #{group.head} Last: #{group.tail}" |
say "First: #{group.head} Last: #{group.tail}" |
||
} |
} |
||
Line 1,130: | Line 1,130: | ||
Largest group of anaprimes before 1,000: 4 members. |
Largest group of anaprimes before 1,000: 4 members. |
||
First: 149 Last: 941 |
First: 149 Last: 941 |
||
⚫ | |||
First: 179 Last: 971 |
First: 179 Last: 971 |
||
⚫ | |||
Largest group of anaprimes before 10,000: 11 members. |
Largest group of anaprimes before 10,000: 11 members. |
||
⚫ | |||
First: 1237 Last: 7321 |
First: 1237 Last: 7321 |
||
⚫ | |||
Largest group of anaprimes before 100,000: 39 members. |
Largest group of anaprimes before 100,000: 39 members. |