login
A396377
Smallest k so that at least one of the k+1 integers in {n, n+1, n+2, ..., n+k} divides the product of the other integers.
6
1, 2, 3, 4, 4, 3, 5, 4, 5, 5, 5, 4, 7, 6, 5, 6, 7, 6, 5, 4, 7, 6, 5, 4, 5, 8, 8, 7, 6, 5, 8, 7, 6, 6, 5, 6, 8, 7, 6, 5, 7, 6, 7, 6, 6, 6, 7, 6, 7, 10, 9, 8, 7, 6, 5, 7, 8, 7, 6, 5, 9, 8, 7, 8, 7, 6, 8, 7, 7, 7, 7, 6, 7, 6, 7, 8, 7, 7, 7, 6, 9, 8, 7, 6, 8, 9, 8, 8, 7, 6, 9, 8, 9, 8
OFFSET
1,2
COMMENTS
Problem proposed by Paul Erdős (see link).
Sometimes there is only one such integer k that divides the product of the other integers, but sometimes there are several such integers, see examples.
There are some similarities with first terms of A059686: a(n) = A059686(n-1) for n = 2, 3, 4, 5, 6, 7, 8, then for n = 13, 14, 15.
LINKS
Paul Erdős, Quelques problèmes de Théorie des Nombres, Monographies de l'Enseignement Mathématique, No. 6, pp. 81-135, L'Enseignement Mathématique, Université, Geneva, 1963, Problem 15, p. 90.
FORMULA
a(k!) = k.
If n > k!, then a(n) > k.
For p prime >= 5, a(p+1) = a(p) - 1.
a(n) <= n with equality iff n = 1, 2, 3, 4.
For infinitely many values of n: a(n) > exp((log n)^(1/2-ε)) [Erdős].
EXAMPLE
a(9) = 5, because with (9,10,11,12,13,14), we get 12 | 9*10*11*13*14, and it is not possible to get such a division with (9,10), (9,10,11), (9,10,11,12), (9,10,11,12,13).
a(14) = 6, because with (14,15,16,17,18,19,20), we get 15 | 14*16*17*18*19*20 and also 20 | 14*15*16*17*18*19, and as there is at least one integer that satisfies the definition, a(14) = 6.
MAPLE
a := proc(n)
local m, L, i, j, P;
for m from 1 do
L := [seq(n+i, i=0..m)];
for i from 1 to m+1 do
P := 1;
for j from 1 to m+1 do
if j <> i then
P := P * L[j];
end if;
end do;
if irem(P, L[i]) = 0 then
return m;
end if;
end do;
end do;
end proc:
seq(a(n), n=1..60);
PROG
(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(1)));
a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, May 28 2026
(Python)
def A396377(n: int) -> int:
k = 1
p = n * (n + 1)
while not any(p % (j*j) == 0 for j in range(n, n+k+1)):
k += 1
p *= (n + k)
return k # David Radcliffe, Jun 10 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernard Schott, May 24 2026
STATUS
approved