Skip to main content
3 of 7
deleted 3 characters in body
a spaghetto
  • 11.3k
  • 3
  • 46
  • 82

#Ruby, 122 77 bytes

require'prime'
->n{p Prime.take(n).map{|x|1-2/(Rational(x)**2+1)}.reduce(:*)}

Defines an anonymous function that takes a number and outputs the result to STDOUT as (numerator/denominator).

a spaghetto
  • 11.3k
  • 3
  • 46
  • 82