%I #24 Jul 06 2019 16:42:55
%S 3,5,3,3,5,3,3,7,3,3,5,3,3,5,3,3,5,3,3,5,3,3,7,3,3,5,3,3,5,3,3,5,3,3,
%T 5,3,3,7,3,3,5,3,3,5,3,3,5,3,3,5,3,3,9,3,3,5,3,3,5,3,3,5,3,3,5,3,3,7,
%U 3,3,5,3,3,5,3,3,5,3,3,5,3,3,7,3,3,5,3,3,5,3,3,5,3,3,5,3,3,7,3
%N Smallest k > 1 such that n*(n+1)*...*(n+k-1) / (n+(n+1)+...+(n+k-1)) is an integer.
%C a(n) = 7 for n == 8 (mod 15) (provided n != 53 (mod 105)).
%C a(n) = 5 for n == 2 (mod 3) (provided n != 8 (mod 15)).
%C a(n) = 9 for n == 53 (mod 105). - _Jon E. Schoenfield_, Mar 14 2014
%C a(n) = 3 for n == {0,1} (mod 3). - _Zak Seidov_, Mar 14 2014
%e 1*2/(1+2) = 2/3 is not an integer. 1*2*3/(1+2+3) = 1 is an integer. Thus a(1) = 3.
%e 2*3/(2+3) = 6/5 is not an integer. 2*3*4/(2+3+4) = 24/9 is not an integer. 2*3*4*5/(2+3+4+5) = 120/14 is not an integer. 2*3*4*5*6/(2+3+4+5+6) = 720/20 = 36 is an integer. Thus a(2) = 5.
%o (Python)
%o def Divi(x):
%o ..k = 2
%o ..while k < 100:
%o ....prod = 1
%o ....total = 0
%o ....for i in range(x,x+k):
%o ......prod *= i
%o ......total += i
%o ......if prod/total % 1 == 0:
%o ........return k
%o ....else:
%o ......k += 1
%o x = 1
%o while x < 100:
%o ..print(Divi(x))
%o ..x += 1
%o (PARI) a(n) = {k = 2; while ( prod(i=0, k-1, n+i) % sum(i=0, k-1, n+i), k++); k;} \\ _Michel Marcus_, Mar 14 2014
%Y A284721 has the same start.
%K nonn
%O 1,1
%A _Derek Orr_, Mar 13 2014
|