OFFSET
0,4
FORMULA
For any n, a(n)<n. If p is prime, a(p+1)=p-1, a(p+2)=p-2; for k>0, a(A049591(k)+3)=A049591(k)-3 etc. - Benoit Cloitre, Oct 24 2002
EXAMPLE
a(8) = 6 as 8*9*10*11*12*13 is not divisible by 2*3*5*7 but 8*9*10*11*12*13*14 is.
MATHEMATICA
a[n_] := For[k = 0, True, k++, If[Divisible[Pochhammer[n, k+1], Times @@ Select[Range[2, n], PrimeQ]], Return[k]]]; Array[a, 73] (* Jean-François Alcover, Oct 07 2016 *)
PROG
(PARI) a(n)=if(n<0, 0, k=0; while(prod(i=0, k, n+i)%prod(v=1, precprime(n), if(isprime(v), v, 1))>0, k++); k)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Oct 23 2002
EXTENSIONS
More terms from Benoit Cloitre, Oct 24 2002
STATUS
approved