Discrete logarithm for a range

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Are there any efficient algorithms for solving the following problem?



Let $b leq m < n$, what is the smallest value for $k geq 1$ such that $m^k$ mod $n$ is in the range $[0,b)$.



A variant on this which would also be of interest is what is the smallest value for $k$ such that $mx^k$ mod $n$ is in the range $[0,b)$ for a given $x$ (for general values of $x$ or for specific values or having a specific property).










share|cite|improve this question























  • You can always take $k=0$ for $m>1.$
    – gammatester
    Sep 5 at 13:46











  • I will add on $k geq 1$ to the problem definition.
    – MotiN
    Sep 5 at 14:11














up vote
0
down vote

favorite












Are there any efficient algorithms for solving the following problem?



Let $b leq m < n$, what is the smallest value for $k geq 1$ such that $m^k$ mod $n$ is in the range $[0,b)$.



A variant on this which would also be of interest is what is the smallest value for $k$ such that $mx^k$ mod $n$ is in the range $[0,b)$ for a given $x$ (for general values of $x$ or for specific values or having a specific property).










share|cite|improve this question























  • You can always take $k=0$ for $m>1.$
    – gammatester
    Sep 5 at 13:46











  • I will add on $k geq 1$ to the problem definition.
    – MotiN
    Sep 5 at 14:11












up vote
0
down vote

favorite









up vote
0
down vote

favorite











Are there any efficient algorithms for solving the following problem?



Let $b leq m < n$, what is the smallest value for $k geq 1$ such that $m^k$ mod $n$ is in the range $[0,b)$.



A variant on this which would also be of interest is what is the smallest value for $k$ such that $mx^k$ mod $n$ is in the range $[0,b)$ for a given $x$ (for general values of $x$ or for specific values or having a specific property).










share|cite|improve this question















Are there any efficient algorithms for solving the following problem?



Let $b leq m < n$, what is the smallest value for $k geq 1$ such that $m^k$ mod $n$ is in the range $[0,b)$.



A variant on this which would also be of interest is what is the smallest value for $k$ such that $mx^k$ mod $n$ is in the range $[0,b)$ for a given $x$ (for general values of $x$ or for specific values or having a specific property).







discrete-logarithms






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Sep 5 at 14:11

























asked Sep 5 at 9:43









MotiN

17510




17510











  • You can always take $k=0$ for $m>1.$
    – gammatester
    Sep 5 at 13:46











  • I will add on $k geq 1$ to the problem definition.
    – MotiN
    Sep 5 at 14:11
















  • You can always take $k=0$ for $m>1.$
    – gammatester
    Sep 5 at 13:46











  • I will add on $k geq 1$ to the problem definition.
    – MotiN
    Sep 5 at 14:11















You can always take $k=0$ for $m>1.$
– gammatester
Sep 5 at 13:46





You can always take $k=0$ for $m>1.$
– gammatester
Sep 5 at 13:46













I will add on $k geq 1$ to the problem definition.
– MotiN
Sep 5 at 14:11




I will add on $k geq 1$ to the problem definition.
– MotiN
Sep 5 at 14:11















active

oldest

votes











Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2906080%2fdiscrete-logarithm-for-a-range%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2906080%2fdiscrete-logarithm-for-a-range%23new-answer', 'question_page');

);

Post as a guest













































































這個網誌中的熱門文章

How to combine Bézier curves to a surface?

Carbon dioxide

Why am i infinitely getting the same tweet with the Twitter Search API?