Finding the kth smallest value of a recursive function

I have the function Ax=(Bأ—Ax−1+y)mod1000000007A_x = (Bأ—A_{x-1} + y) \,\,\mathrm{mod}\,\, 1000000007, with all arguments being integers.

How can I find the kk-th smallest member of the functions provided? Please note kk can be as large as 10^710^7.

=================

  

 

I’m not sure what you are asking for. Your function is f(x)=(b*f(x-1)+y)mod 1000000007f(x)=(b*f(x-1)+y)mod 1000000007 right? And you are looking for xx such that there are exactly kk x’x’ such that f(x)>f(x’)f(x)>f(x’)?
– wece
2 days ago

=================

=================