finding perfect power factors of an integer

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











up vote
1
down vote

favorite












I'm writing a program that does symbolic algebraic computation. The desired behavior for taking the $n$th root of an integer $r$ is to return $psqrt[n]fracrp^n$, where $p$ is the largest integer such that $p^n$ divides $r$. In other words, the program moves any factors $r$ might have that are perfect $n$th powers outside the surd.



I have been using a naive method of trial division to find these factors, but this approach is now too inefficient for my purposes. Is the problem of finding perfect $n$th power factors any easier in the computational complexity sense than factoring an integer completely? - are there any additional tricks that can be brought to bear on this less general problem?







share|cite|improve this question
















  • 2




    In general, detecting the largest $n$ th power dividing a number is not significantically easier than factoring.
    – Peter
    Aug 15 at 10:19














up vote
1
down vote

favorite












I'm writing a program that does symbolic algebraic computation. The desired behavior for taking the $n$th root of an integer $r$ is to return $psqrt[n]fracrp^n$, where $p$ is the largest integer such that $p^n$ divides $r$. In other words, the program moves any factors $r$ might have that are perfect $n$th powers outside the surd.



I have been using a naive method of trial division to find these factors, but this approach is now too inefficient for my purposes. Is the problem of finding perfect $n$th power factors any easier in the computational complexity sense than factoring an integer completely? - are there any additional tricks that can be brought to bear on this less general problem?







share|cite|improve this question
















  • 2




    In general, detecting the largest $n$ th power dividing a number is not significantically easier than factoring.
    – Peter
    Aug 15 at 10:19












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'm writing a program that does symbolic algebraic computation. The desired behavior for taking the $n$th root of an integer $r$ is to return $psqrt[n]fracrp^n$, where $p$ is the largest integer such that $p^n$ divides $r$. In other words, the program moves any factors $r$ might have that are perfect $n$th powers outside the surd.



I have been using a naive method of trial division to find these factors, but this approach is now too inefficient for my purposes. Is the problem of finding perfect $n$th power factors any easier in the computational complexity sense than factoring an integer completely? - are there any additional tricks that can be brought to bear on this less general problem?







share|cite|improve this question












I'm writing a program that does symbolic algebraic computation. The desired behavior for taking the $n$th root of an integer $r$ is to return $psqrt[n]fracrp^n$, where $p$ is the largest integer such that $p^n$ divides $r$. In other words, the program moves any factors $r$ might have that are perfect $n$th powers outside the surd.



I have been using a naive method of trial division to find these factors, but this approach is now too inefficient for my purposes. Is the problem of finding perfect $n$th power factors any easier in the computational complexity sense than factoring an integer completely? - are there any additional tricks that can be brought to bear on this less general problem?









share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Aug 15 at 8:03









Alex Kindel

13610




13610







  • 2




    In general, detecting the largest $n$ th power dividing a number is not significantically easier than factoring.
    – Peter
    Aug 15 at 10:19












  • 2




    In general, detecting the largest $n$ th power dividing a number is not significantically easier than factoring.
    – Peter
    Aug 15 at 10:19







2




2




In general, detecting the largest $n$ th power dividing a number is not significantically easier than factoring.
– Peter
Aug 15 at 10:19




In general, detecting the largest $n$ th power dividing a number is not significantically easier than factoring.
– Peter
Aug 15 at 10:19















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%2f2883325%2ffinding-perfect-power-factors-of-an-integer%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%2f2883325%2ffinding-perfect-power-factors-of-an-integer%23new-answer', 'question_page');

);

Post as a guest













































































這個網誌中的熱門文章

How to combine Bézier curves to a surface?

Propositional logic and tautologies

Distribution of Stopped Wiener Process with Stochastic Volatility