OFFSET
1,1
COMMENTS
a(n) = 7 for n == 8 (mod 15) (provided n != 53 (mod 105)).
a(n) = 5 for n == 2 (mod 3) (provided n != 8 (mod 15)).
a(n) = 9 for n == 53 (mod 105). - Jon E. Schoenfield, Mar 14 2014
a(n) = 3 for n == {0,1} (mod 3). - Zak Seidov, Mar 14 2014
EXAMPLE
1*2/(1+2) = 2/3 is not an integer. 1*2*3/(1+2+3) = 1 is an integer. Thus a(1) = 3.
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.
PROG
(Python)
def Divi(x):
..k = 2
..while k < 100:
....prod = 1
....total = 0
....for i in range(x, x+k):
......prod *= i
......total += i
......if prod/total % 1 == 0:
........return k
....else:
......k += 1
x = 1
while x < 100:
..print(Divi(x))
..x += 1
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Mar 13 2014
STATUS
approved