clc, clearvars
for t=2:500
for a=1:t-1
b=t-a;
p=nthprime(a); q=nthprime(b);
if p^5+p^3+2==q^2-q
disp([p q])
disp([p^5+p^3+2 q^2-q])
disp(' ')
end
end
end
finds (for the sum of the ordinal numbers of the primes up to 500th) only
2 7
42 42
3 17
272 272
where the format is
p q
LHS RHS
|
Posted by Charlie
on 2021-08-18 21:48:19 |