(UBASIC)
10 'cu less pr are prime
20 N=1:O=1:C=1
30 A=3:S=sqrt(N):if N>10^3 then print N, C-1:stop
40 B=N\A
50 if B*A=N then 100
60 A=A+2
70 if A<=S then 40
80 R=O^3:Q=R-N
90 if N<R and N=prmdiv(N) and Q=prmdiv(Q) then if Q>1 print R; N; Q; C:N=N+2:C=C+1:goto 30
100 N=N+2:if N<R then 30:else O=O+1:goto 80
(PARI) a(n) = {my(nb = 0); forprime(p=2, 10^n, if (isprime((sqrtnint(p, 3)+1)^3 - p), nb++); ); nb; } \\
Michel Marcus, Jun 22 2019
(PARI) list(nmax) = {my(m = 0, c = 2, cc = c^3, n = 0, pow = 10); forprime(p = 1, , if(p > pow, print1(m, ", "); n++; if(n == nmax, break); pow *= 10); if(p > cc, c++; cc = c^3); if(isprime(cc - p), m++)); } \\
Amiram Eldar, Jan 20 2025