Sisyphus sequence: Difference between revisions
→{{header|Ruby}}: Off by one
(→{{header|Ruby}}: Off by one) |
|||
Line 976:
puts "\nThese numbers under #{count_until} do not occur in the first #{limit} terms:"
puts ((1...count_until).to_a - counter.keys).join ", "
freq, nums = counter.group_by{|k, v| v}.max
Line 1,001:
These numbers under 250 do not occur in the first 100000000 terms:
36, 72, 97, 107, 115, 127, 144, 167, 194, 211, 214, 230, 232
These numbers under 250 occur most frequent (7 times) in the first 100000000 terms:
|