OFFSET
1,1
COMMENTS
This concerns Problem 131 of Project Euler (see link).
For each such term m with this property, the values of k and of p are unique.
The solution to the Diophantine equation is: (q^3)^3 + (q^3)^2 * ((q+1)^3 - q^3) = ((q+1) * q^2)^3, where
- the prime p is the cuban prime (q+1)^3 - q^3 = A002407(n),
- corresponding to q = A111251(n),
- the positive integer k = q^3, and,
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Project Euler, Problem 131: Prime cube partnership.
EXAMPLE
MAPLE
for q from 1 to 90 do
p:=3*q^2+3*q+1;
if isprime(p) then print((q+1)*q^2); else fi; od:
MATHEMATICA
f[n_] := n^2*(n+1); f /@ Select[Range[100], PrimeQ[3*#^2 + 3*# + 1] &] (* Amiram Eldar, Nov 05 2020 *)
PROG
(PARI) lista(nn) = apply(x->x^2*(x+1), select(x->isprime(3*x^2 + 3*x + 1), [1..nn])); \\ Michel Marcus, Nov 05 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernard Schott, Nov 03 2020
STATUS
approved