Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 4ee7c30d57
Fetching contributors…

Cannot retrieve contributors at this time

14 lines (11 sloc) 0.22 kB
require 'oeis'
def digit_sum(n)
if n < 10
n
else
n % 10 + digit_sum(n / 10)
end
end
res = OEIS::search(1.upto(30).map { |n| digit_sum(n) })
puts "#{res.id}: #{res.title}"
puts res.sequence[0..30].inspect
Jump to Line
Something went wrong with that request. Please try again.