OFFSET
1,1
COMMENTS
Corresponding values of (a(n)+prime(n))^(1/3): 9,2,2,12,4,8,4,6,4,10,12,6,4,6,4,4,4,4,6,10,8,6,16,6,14,12,6,6,6,6,6.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(n) local p, k;
p:= ithprime(n);
for k from ceil(p^(1/3)) do
if isprime(k^3 - p) then return k^3 - p fi
od
end proc:
map(f, [$1..100]); # Robert Israel, Oct 17 2023
MATHEMATICA
Table[p=Prime[n]; x=Ceiling[p^(1/3)]; While[!PrimeQ[q=x^3-p], x++]; q, {n, 100}]
PROG
(PARI) a(n) = {p = prime(n); k=2; while(!ispower(p+k, 3), k = nextprime(k+1)); k; } \\ Michel Marcus, Jun 22 2015
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Zak Seidov, Jun 22 2015
STATUS
approved