OFFSET
1,1
COMMENTS
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
Thomas Bloom, Problem 374, Erdős Problems.
P. Erdős and R. L. Graham, On products of factorials, Bull. Inst. Math. Acad. Sinica 4 (1976), pp. 337-355.
P. Erdős and R. L. Graham, Old and new problems and results in combinatorial number theory, Monographies de L'Enseignement Mathématique (1980).
Terence Tao, Products of consecutive integers with unusual anatomy, arXiv:2603.27990 [math.NT], 2026. See p. 6 (Sect. 1.3).
EXAMPLE
18 is a term because 2!18 = 6^2 is a perfect square.
MATHEMATICA
Select[Range[300], AnyTrue[Range[# - 1]!*#, IntegerQ@ Sqrt[#] &] &] (* Michael De Vlieger, Sep 22 2025 *)
PROG
(Python)
import math
def is_square(n):
r = math.isqrt(n)
return r * r == n
results = []
for c in range(1, 301):
for a in range(1, c-1):
if is_square(math.factorial(a)*c):
results.append((c, a))
break
(Python)
from math import prod
from itertools import count, islice
from sympy import factorint
def A387186_gen(): # generator of terms
g, r = set(), {1:1}
for c in count(2):
f = set(i for i, j in factorint(c).items() if j&1)
g ^= f
if (t:=prod(g)) not in r:
r[t] = c
e = prod(f)
if e in r and r[e]<c-1:
yield c
CROSSREFS
KEYWORD
nonn
AUTHOR
Terence Tao, Sep 22 2025
STATUS
approved
