%I #21 Jun 17 2026 03:27:55
%S 1,2,3,4,6,6,8,8,12,10,12,12,15,15,15,16,18,18,24,24,21,24,24,24,30,
%T 32,28,28,30,30,36,36,36,40,40,36,40,40,40,40,48,48,48,48,45,48,48,48,
%U 56,50,54,60,60,60,60,56,60,60,60,60,63,63,63,64,72,72,72,72,72,70,72,72
%N Smallest m belonging to {n, n+1, n+2, ..., n+A396377(n)} that divides the product of the other integers.
%C After problem proposed by Paul Erdős (see link).
%H Paul Erdős, <a href="https://combinatorica.hu/~p_erdos/1963-14.pdf">Quelques problèmes de Théorie des Nombres</a>, Monographies de l'Enseignement Mathématique, No. 6, pp. 81-135, L'Enseignement Mathématique, Université, Geneva, 1963, Problem 15, p. 90.
%F a(p) = a(p+1) for p >= 5.
%F Fixed points are in A396379.
%e A396377(3) = 3 because in the set (3, 4, 5, 6), we have 3 | 4*5*6, then 4 does not divide 3*5*6, 5 does not divide 3*4*6 and 6 | 3*4*5. As 3 < 6, a(3) = 3.
%e A396377(9) = 5 because in the set (9, 10, 11, 12, 13, 14), we have 12 | 9*10*11*13*14, and 12 is the only integer belonging to (9, 10, 11, 12, 13, 14) that divides the product of the other integers, so a(9) = 12.
%p a := proc(n)
%p local k, L, i, j, t, g;
%p for k from 1 do
%p L := [seq(n+r, r=0..k)];
%p for i from 1 to k+1 do
%p t := L[i];
%p for j from 1 to k+1 do
%p if j <> i then
%p g := gcd(t, L[j]);
%p t := iquo(t, g);
%p end if;
%p end do;
%p if t = 1 then
%p return L[i];
%p end if;
%p end do;
%p end do;
%p end proc;
%p seq(a(n), n=1..100);
%o (PARI) isok(k, n) = my(v=vector(k+1, i, n+i-1), P=vecprod(v)); for (i=1, k+1, if (denominator(P/v[i]^2) == 1, return(i)));
%o a(n) = my(k=1, j); while (!(j=isok(k, n)), k++); n+j-1; \\ _Michel Marcus_, May 28 2026
%Y Cf. A396377, A396379, A396380, A396950.
%K nonn
%O 1,2
%A _Bernard Schott_, May 24 2026