Determine the total number of nonnegative integer values of n such that ⌊n
3/9⌋ is a prime number.
Notes:
1) ⌊x⌋ is the floor of n, which is equal to the greatest integer less than or equal to n.
2) Adapted from a problem appearing in Phillipines Mathematical Olympiad, 2020.
for n=0:100000
p=floor(n^3/9);
if isprime(p)
disp([n p])
end
end
find only 3, testing 0 through 100,000:
n p
3 3
4 7
5 13
|
Posted by Charlie
on 2024-01-05 08:55:30 |