OFFSET
1,1
EXAMPLE
a(1) = 7 because 7 is prime and none of 7 + 1 = 8 = (2*2*2) is cubefree.
a(2) = 79 because 79 is prime and none of 79 + 1 = 80 = (2*2*2)*10, 79 + 2 = 81 = (3*3*3)*3 are cubefree.
a(3) = 4373 because 4373 is prime and none of 4373 + 1 = 4374 = (3*3*3)*162, 4373 + 2 = 4375 = (5*5*5)*35, 4373 + 3 = 4376 = (2*2*2)*547 are cubefree.
a(4) = 885623 because 885623 is prime and none of 885623 + 1 = 885624 = (2*2*2)*110703, 885623 + 2 = 885625 = (5*5*5)*7085, 885623 + 3 = 885626 = (7*7*7)*2582, 885623 + 4 = 885627 = (3*3*3)*32801 are cubefree.
MATHEMATICA
Table[SelectFirst[Prime@ Range[10^5], Function[p, AllTrue[p + Range@ n, AnyTrue[Last /@ FactorInteger@ #, # > 2 &] &]]], {n, 4}] (* Michael De Vlieger, Apr 07 2016, Version 10 *)
PROG
(PARI) isokp(p, n)=for (k=1, n, if (vecmax(factor(p+k)[, 2]) < 3, return (0)); ); 1;
a(n) = forprime(p=7, , if (isokp(p, n), return(p))) \\ Michel Marcus, Apr 07 2016
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Juri-Stepan Gerasimov, Apr 07 2016
EXTENSIONS
a(5) from Michel Marcus, Apr 07 2016
a(6)-a(7) from Giovanni Resta, Apr 12 2016
STATUS
approved