This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A239278 #52 May 25 2025 23:30:19 %S A239278 2,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, %T A239278 3,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, %U A239278 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,5,3,3,7,3 %N A239278 Smallest k > 1 such that n*(n+1)*...*(n+k-1) / (n+(n+1)+...+(n+k-1)) is an integer. %C A239278 a(n) = 7 for n == 8 (mod 15) (provided n != 53 (mod 105)). %C A239278 a(n) = 5 for n == 2 (mod 3) (provided n != 8 (mod 15)). %C A239278 a(n) = 9 for n == 53 (mod 105). - _Jon E. Schoenfield_, Mar 14 2014 %C A239278 a(n) = 3 for n == {0,1} (mod 3). - _Zak Seidov_, Mar 14 2014 %H A239278 Antti Karttunen, <a href="/A239278/b239278.txt">Table of n, a(n) for n = 0..20000</a> %e A239278 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 A239278 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. %e A239278 a(0) = 2 as 0*(0+(2-1)) / 0+(0+(2-1)) = 0/1 = 0 is an integer. - _Antti Karttunen_, Jan 18 2025 %o A239278 (Python) %o A239278 def A239278(n): %o A239278 (m, s, t) = (n, n, n+1) %o A239278 while 1: %o A239278 m *= t %o A239278 s += t %o A239278 if 0 == (m%s): return (1+t-n) %o A239278 else: t += 1 %o A239278 # _Antti Karttunen_, Jan 18 2025 %o A239278 (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 %o A239278 (PARI) A239278(n) = { my(m=n, s=n); for(k=2, oo, m *= (n+(k-1)); s += (n+(k-1)); if(!(m%s), return(k))); }; \\ _Antti Karttunen_, Jan 18 2025 %Y A239278 A284721 has the same start. %K A239278 nonn %O A239278 0,1 %A A239278 _Derek Orr_, Mar 13 2014 %E A239278 Term a(0)=2 prepended, original Python program replaced with one that works. - _Antti Karttunen_, Jan 18 2025