1
2
3
4
5
require "mathn"
def goedel(n)
  prime=Prime.new
  n.to_s.split(//).inject(1){|r,k| r*=prime.next**k.to_i}
end