The radical of a positive integer x is defined as the product of the distinct prime numbers dividing x. For example, the distinct prime factors of
is
, therefore the radical of
is
. Similarly, the radicals of
,
and
are
, 5 and
, respectively. The number1is considered to be the radical of itself.
For a given index n, if
is the n-th Fibonacci number (
and
for
), write a function R(n), that calculates the radical of
.
For example, if
then
, therefore R(12) = 2 * 3 = 6.
And, for
,
, therefore R(24) = 2 * 3 * 7 * 23 = 966.
Since output can be large, please present R(n) as a string (double quotes) array of digits.
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers3
Suggested Problems
-
Extract Built In Functions and Toolbox Functions from String or Function Handle
81 Solvers
-
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
2035 Solvers
-
515 Solvers
-
Find the smallest integer m such that n divides m!
16 Solvers
-
Easy Sequences 8: Triangles with integer sides and prime perimeters
10 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
The "hidden rules" on this one are quite a bit different!
Forbidden strings are: persistent global regex [ {
So java and BigInteger are allowed, but not literal arrays or cell arrays?
The largest number to radicalize is fib(10000).