Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #26 Apr 12 2016 15:56:00
%S 7,79,4373,885623,146447621,309763486247,151536553447871
%N a(n) is the smallest prime p such that none of p + 1, p + 2,... p + n are cubefree.
%e a(1) = 7 because 7 is prime and none of 7 + 1 = 8 = (2*2*2) is cubefree.
%e 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.
%e 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.
%e 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.
%t 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 *)
%o (PARI) isokp(p, n)=for (k=1, n, if (vecmax(factor(p+k)[,2]) < 3, return (0));); 1;
%o a(n) = forprime(p=7,, if (isokp(p, n), return(p))) \\ _Michel Marcus_, Apr 07 2016
%Y Cf. A046099, A271395.
%K nonn,more
%O 1,1
%A _Juri-Stepan Gerasimov_, Apr 07 2016
%E a(5) from _Michel Marcus_, Apr 07 2016
%E a(6)-a(7) from _Giovanni Resta_, Apr 12 2016