OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..2500
EXAMPLE
a(3) = 357911 since k = 357911 = 71^3, divisors(k) = {1, 71, 71^2, 71^3} and k+d+1 = {357913, 357983, 362953, 715823} are all primes.
MAPLE
L:=[]: for w to 1 do for k from 1 while nops(L)<=50 do p:=ithprime(k); x:=p^3; if p mod 6 = 5 and andmap(isprime, [x+2, 2*x+1]) then S:={p, p^2}; Q:=map(z-> x+z+1, S); if andmap(isprime, Q) then L:=[op(L), x]; print(nops(L), p, x); fi; fi; od od;
MATHEMATICA
Select[Range[4008000]^3, AllTrue[#+Divisors[#]+1, PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 26 2019 *)
PROG
(PARI) lista(kmax) = {my(f, k3, is); forstep(k = 1, kmax, 2, f = factor(k); k3 = k^3; for(i = 1, #f~, f[i, 2] *= 3); is = 1; fordiv(f, d, if(!isprime(k3 + d + 1), is = 0; break)); if(is, print1(k3, ", "))); } \\ Amiram Eldar, Aug 05 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Walter Kehowski, Jul 06 2006
EXTENSIONS
a(13)-a(15) from Amiram Eldar, Aug 05 2024
STATUS
approved