%I #18 Jun 17 2026 15:46:32
%S 1,1,2,2,1,1,2,2,1,3,1,1,3,3,2,1,2,2,1,1,3,1,1,1,1,1,3,3,1,1,1,1,1,1,
%T 1,1,2,2,2,1,1,1,1,1,1,1,1,1,1,3,2,1,1,1,1,2,1,1,1,1,2,2,2,2,1,1,1,1,
%U 1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,2,1,1
%N Number of integers m in {n, n+1, n+2, ..., n+A396377(n)} so that m divides the product of the other integers.
%C From a problem proposed by Paul Erdős (see link).
%C The smallest of these integers m is A396378(n).
%C Are there integers n with a(n) = 4, 5, ... or a(n) always <= 3 ?
%C a(n) = 3 for 7 consecutive values of n : from 3030 up to 3036.
%C The least integer with a(n) = 4 is n = 407049; a(n) < 5 for all n <= 5*10^8. - _David Radcliffe_, Jun 10 2026
%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.
%e a(6) = 1 because A396377(6) = 3 and in {6,7,8,9}, only 6 | 7*8*9.
%e a(8) = 2 because A396377(8) = 4 and in {8,9,10,11,12}, we get 8 | 9*10*11*12 and also 12 | 8*9*10*11.
%e a(10) = 3 because A396377(10) = 5 and in {10,11,12,13,14,15}, we get 10 | 11*12*13*14*15, then 12 | 10*11*13*14*15 and also 15 | 10*11*12*13*14.
%p c := proc(n)
%p local k,L,i,j,t,g,C;
%p for k from 1 do
%p L := [seq(n+r,r=0..k)];
%p C := 0;
%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 C := C+1;
%p end if;
%p end do;
%p if C > 0 then
%p return C;
%p end if;
%p end do;
%p end proc:
%p seq(c(n),n=1..50);
%o (Python)
%o def A396380(n: int) -> int:
%o k = 1
%o p = n * (n + 1)
%o while (count := sum(p % (j*j) == 0 for j in range(n, n+k+1))) == 0:
%o k += 1
%o p *= n + k
%o return count # _David Radcliffe_, Jun 10 2026
%Y Cf. A396377, A396378, A396379, A396950.
%K nonn
%O 1,3
%A _Bernard Schott_, Jun 04 2026