%I
%S 1,1,2,1,2,1,4,1,2,5,5,1,10,2,2,1,10,1,16,2,18,17,16,1,22,21,20,19,18,
%T 1,28,1,30,29,2,1,26,37,36,35,34,41,40,43,42,41,40,1,46,45,44,43,42,1,
%U 52,51,50,49,48,1,58,61,4,1,58,57,56,67,66,65,64,1,70,73,72,71,70,69,68,2
%N a(n) = the smallest positive integer such that the product of a(n) consecutive integers, where n is the smallest, is divisible by every prime from 2 to the largest prime divisor of the product. (a(1)=1.)
%C a(n) = A164798(n)  n +1.
%e Consider the products of consecutive integers, (m+9)!/9!, m >= 1. First, 10 is divisible by 2 and 5, but there is a prime gap since 3 is missing from the factorization. 10*11 is divisible by 2, 5, and 11, but 3 and 7 are missing. 10*11*12 is divisible by 2, 3, 5, and 11, but 7 is missing. 10*11*12*13 is divisible by all primes up to 13, except 7. But 10*11*12*13*14 is indeed divisible by every prime from 2 to 13. So a(10) = 5 because 5 consecutive numbers are multiplied together.
%p Contribution from _R. J. Mathar_, Feb 27 2010: (Start)
%p A000040v := proc(pmax) L := {} ; for i from 1 do if ithprime(i) <= pmax then L := L union {ithprime(i)} ; else return L; end if end do ; end:
%p A164799 := proc(n) local k,p ; if n = 1 then return 1 ; end if; for k from 1 do p := ifactors(mul(n+i,i=0..k1))[2] ; p := {seq(op(1,d),d=p)} ; pL := A000040v(max(op(p))) ; if p = pL then return k; end if; end do ; end proc:
%p seq(A164799(n),n=1..90) ; (End)
%Y A164798
%K nonn
%O 1,3
%A _Leroy Quet_, Aug 26 2009
%E Terms beyond a(13) from _R. J. Mathar_, Feb 27 2010
