depevlad's blog

By depevlad, history, 3 years ago, In English,

I am trying to solve this problem:

You are given two strictly positive integers N and K, where . Find the first K, where K′ > K, such that . It's obvious that such a number must exist. It's a known fact that as K varies over the strictly positive integers, the number of distinct values takes is exactly . However, I haven't been able to find a way to jump to the next value in the sequence quickly. I'm looking for an O(1) solution, even would be too slow.

Thank you.

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

»
3 years ago, # |
Rev. 2   Vote: I like it +56 Vote: I do not like it

»
3 years ago, # |
Rev. 3   Vote: I like it +5 Vote: I do not like it

How to prove that takes exactly distinct values for ?