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

Home > Numbers
Consider Prime Numbers, Get Cube (Posted on 2023-10-24) Difficulty: 3 of 5
Determine all possible values of a prime number p, such that:
p2-p+1 is a perfect cube.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 7
p=primes(99999999);
for i=1:length(p)
  c=p(i)^2-p(i)+1;
  cr=round(c^(1/3));
  if cr^3==c
    disp([p(i) c cr])
  end
end

tests all primes below 100 million and finds only p = 19, p^2 - p + 1 = 343, which is 7^3.

  Posted by Charlie on 2023-10-24 08:49:46
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 (3)
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