Has anyone worked with Giuga numbers?
Show older comments
A positive integer x > 1 with prime factors p1p2p3...pi that satifies the relationship 1/p1 + 1/p2 + 1/p3 +...+ 1/pi - 1/x = k, where k
is a positive integer. The first few Giuga numbers are 30, 858, 1772, and 66,198. For example, for x = 30 the prime factors are
2, 3, 5, so that we have 1/2 + 1/3 + 1/5 - 1/30 = 31/30 - 1/30 = 1 = k.
2 Comments
Walter Roberson
on 31 Dec 2021
The code is not difficult to write if you use the Symbolic toolbox to add the fractions. But it is not all that fast, either, only processes about 20 per second.
Ken Bannister
on 4 Jan 2022
Accepted Answer
More Answers (0)
Categories
Find more on Number Theory in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!