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

Home > Just Math
Prime power divisibility (Posted on 2024-10-15) Difficulty: 2 of 5
How many prime numbers p make the number 3p2+p+1 + 7p2+p+1 divisible by p?

No Solution Yet Submitted by Danish Ahmed Khan    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Computer solution | Comment 1 of 3
My program was only able to check primes up to 31.  I got an overflow error for p=37.
Of those tested, only 2 and 5 showed divisibility by p.

3^(2^2+2+1) + 7^(2^2+2+1) = 825730  YES
3^(3^2+3+1) + 7^(3^2+3+1) = 96890604730  NOT
3^(5^2+5+1) + 7^(5^2+5+1) = 157775382035463480011326690  YES
3^(7^2+7+1) + 7^(7^2+7+1) = 1481113296616977741465675575412832815642061889770  NOT
3^(11^2+11+1) + 7^(11^2+11+1) == 
25005717582450259773164625242025584896575919345223570965796451489297591182424743143233270148751463001601008075930   NOT

---------
import sympy
def isprime(n):
    return sympy.isprime(n)
primes = [i for i in range(1000) if isprime(i)]

def f(p):
    return (3**(p**2+p+1) + 7**(p**2+p+1)) % p == 0

for p in primes:
    if f(p):
        try:
            print(p, 3**(p**2+p+1) + 7**(p**2+p+1), (3**(p**2+p+1) + 7**(p**2+p+1))/p)
        except:
            print(p)
            break


  Posted by Larry on 2024-10-15 11:14:32
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 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information