login
A267798
a(n) is the smallest prime p such that none of p + 1, p + 2,... p + n are cubefree.
1
7, 79, 4373, 885623, 146447621, 309763486247, 151536553447871
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
Sequence in context: A201301 A159524 A113034 * A201704 A331424 A052385
KEYWORD
nonn,more
AUTHOR
EXTENSIONS
a(5) from Michel Marcus, Apr 07 2016
a(6)-a(7) from Giovanni Resta, Apr 12 2016
STATUS
approved