All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Prime power GCD (Posted on 2025-02-02) Difficulty: 3 of 5
Let A be the set of all the positive integers that can be written in the form p666-q666 for some prime numbers p≥q≥11. What is the greatest common divisor of all the elements of A?

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Brute force Comment 2 of 2 |
By brute force: when the exponent is 666, the answer appears to be 1512.

I did some explorations:
For odd exponents, the answer is 2
For even exponents which are either 2 mod 12 or 10 mod 12, the answer is 24
When the exponent is 6* a prime, the answer is 504

Some multiples of 222:
exp  gcd
222 504
444 5040
666 1512
888 10080
1110 504
1332 15120
1554 3528
1776 20160
1998 4536
2220 25200

-------
import math
import sympy
from itertools import combinations

def gcdList(aList):
    ans = math.gcd(aList[0],aList[1])
    for i,v in enumerate(aList):
        if i < 2:
            continue
        ans = math.gcd(ans,v)
    return ans

big = 10000
primes = [i for i in range(11, big) if sympy.isprime(i)]

for expo in range(666,667):
    powers = [n**expo for n in primes]
    diffs = []
    
    for comb in combinations(powers,2):
        diffs.append(comb[1] - comb[0])
    print(expo, gcdList(diffs))

  Posted by Larry on 2025-02-02 13:43:10
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2025 by Animus Pactum Consulting. All rights reserved. Privacy Information