Group Abstract Group Abstract

Message Boards Message Boards

0
|
8.4K Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Function for Greatest Square Free Divisor of an Integer

Posted 10 years ago

Is there a built-in function in Mathematica for the greatest square-free divisor of an integer (which I believe is also called the radical or square-free kernel of an integer). I know I can write my own function, but it seems to me there should be a built-in function.

POSTED BY: Steven Clark
3 Replies

I'm not aware of any such. Probably best to do the "obvious" thing: factor and clip powers to unity.

squareFreePart[n_Integer] := Times @@ FactorInteger[n][[All, 1]]

squareFreePart[111111111]

(* Out[491]= 37037037 *)

squareFreePart[Times @@ (Range[10]^Range[10])]

(* Out[493]= 210 *)
POSTED BY: Daniel Lichtblau

It will help always to give an example of the input and the expected output of the function you are looking for, or at give a link to an example.

But why can't you use combination of SquareFreeQ and FactorInteger and Max?

POSTED BY: Nasser M. Abbasi
Posted 10 years ago

I searched around a bit and I couldn't find anything aside from truth statements. I'm no expert in mathematica though, but it doesn't seem like there's a built in function.

POSTED BY: Phillip Rechani
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard