OFFSET
1,2
COMMENTS
After problem proposed by Paul Erdős (see link).
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(p) = a(p+1) for p >= 5.
Fixed points are in A396379.
EXAMPLE
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.
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.
MAPLE
a := proc(n)
local k, L, i, j, t, g;
for k from 1 do
L := [seq(n+r, r=0..k)];
for i from 1 to k+1 do
t := L[i];
for j from 1 to k+1 do
if j <> i then
g := gcd(t, L[j]);
t := iquo(t, g);
end if;
end do;
if t = 1 then
return L[i];
end if;
end do;
end do;
end proc;
seq(a(n), n=1..100);
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(i)));
a(n) = my(k=1, j); while (!(j=isok(k, n)), k++); n+j-1; \\ Michel Marcus, May 28 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernard Schott, May 24 2026
STATUS
approved
