When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

topaa's blog

By topaa, history, 3 years ago, In English

Hi, This is my first blog. I encountered a problem PAROVI few days ago, but I am not able to solve it. Any ideas on how to proceed? Thankyou.

  • Vote: I like it
  • +10
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Define by $$$f(l, r)$$$ the number of sets of pairs of relatively prime integers of $$$l, l + 1, \ldots, r$$$, and by $$$g(l, r)$$$ the number of sets of pairs of relatively prime integers of $$$l, l + 1, \ldots, r$$$ such that there is no $$$x$$$ among $$$l + 1, \ldots, r$$$ satisfying Slavko's constraint. Then we have the equality

$$$g(l, r) = f(l, r) - \displaystyle \sum_{k = l}^{r - 1} g(l, k) f(k + 1, r).$$$