Comp Sci Finding Cousins of Giuga Numbers: Can You Solve This Prime Number Puzzle?

  • Thread starter Thread starter kbannister
  • Start date Start date
  • Tags Tags
    Numbers
Click For Summary
A Giuga Number is defined as a positive integer greater than one with prime factors that satisfy a specific equation where the sum of the reciprocals of the prime factors minus the reciprocal of the number equals one. The discussion focuses on finding "Cousins" of Giuga numbers, which involves identifying unique combinations of primes that meet a modified equation with a variable k. The user has successfully found the first eight Cousins using MATLAB but is struggling to find the ninth and tenth, suspecting they may be large numbers. Suggestions include optimizing the search algorithm and exploring mathematical properties related to prime numbers. The conversation highlights the complexity of number theory and the challenges of computational searches in this domain.
  • #31
pbuk said:
or eqivalently work with exact fractions: ## \frac{1}{2} +\frac{1}{3} + \frac{1}{7} + \frac{1}{41} - \frac{1}{1722} = \frac{861 + 574 + 246 + 42 - 1}{1722} = 1 = \frac{k}{6 + 1}, k = 7 ##
Both points made by @pbuk are very important.
As an example, I wrote a Python program to calculate 1 + 1/2 + 1/3 + ... + 1/n. This isn't the same as the calculation done in this thread, but it shows the effects of error accumulation for different calculation algorithms.

Ex. 1 - Calculate 1 + 1/2 + 1/3 + ... + 1/15
By writing the above as a single fraction over a common denominator of 15! the result was 3.3182289932289932
By brute force addition of the fractions the result was 3.3182289932289937
The difference between the two results is about ##4.5 \times 10^{-16}##.

Ex. 2 - Calculate 1 + 1/2 + 1/3 + ... + 1/20
Same results from both methods

Ex. 3 - Calculate 1 + 1/2 + 1/3 + ... + 1/50
By writing the above as a single fraction over a common denominator of 30! the result was 4.499205338329425
My brute force addition of the fractions the result was 4.499205338329423
The difference between these two results is about ##1.8 \times 10^{-15}##
 
Physics news on Phys.org
  • #32
kbannister said:
That's what I used to verify my first 8 "cousins", not "floating point arithmetic."
But you did not use that to eliminate any candidates, you used floating point arithmetic which resulted in you missing 24,695,930 = product(2, 5, 7, 71, 4969), k = 6.

kbannister said:
I have found the #9 6th Giuga cousin. It is 1,925,224,630, and its factors are 2 5 7 101 307 887,
resulting in a RHS of 6/7.
I posted this solution in #26.
 
  • #33
pbuk said:
But you did not use that to eliminate any candidates, you used floating point arithmetic which resulted in you missing

pbuk said:
When you have made incorrect assumptions about a person it is conventional to start with an apology*, however...I missed this condition from your first post. It would have helped if you had restated it in your post #23.Do you have any tone of communication that is not condescending? I had inferred that 6th cousin referred to the condition ## n = 6 ##.There you go again with the condescension; do you not see how foolish this sounds?Nope, you have still missed one (the 6th) < 25,000,000 with k = 6. Its greatest prime factor is much larger than for the other solutions, more than 4,900, which is probably why it is lost in the roundoff error of double precision arithmetic. If you want to find it then, I repeat, you need to use the modified version of your equation that uses only integers (no extended range arithmetic is required: the 53 bit integers of IEEE 754 double precision are plenty for candidates up to about ## 10^{11} ##).

I have already given you the 10th.

* It is particularly inappropriate to make assumptions about a persons family: fortunately all my grandparents were alive during the 60's and 70's; if this were not the case your assertion that they were 'dancing to the Stones' would have been distressing rather than simply foolish.

pbuk said:
I posted this solution in #26.
Excellent PbuK! I did miss that one - either I did not go far enough to find 4969, or did not use close enough tolerances. I did revise my algorithm to use loops based on only prime factors (although even there I did not go up to a factor as high as 4969).

I think this put the problem to rest.
 
Last edited by a moderator:

Similar threads

Replies
33
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 80 ·
3
Replies
80
Views
9K
  • · Replies 36 ·
2
Replies
36
Views
567
  • · Replies 7 ·
Replies
7
Views
3K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K