login
A387186
Numbers k such that m!*k is a perfect square for some m < k-1.
2
4, 6, 8, 9, 16, 18, 20, 24, 25, 28, 30, 32, 35, 36, 45, 49, 50, 54, 63, 64, 70, 72, 77, 80, 81, 96, 98, 100, 112, 120, 121, 125, 128, 140, 144, 150, 162, 169, 175, 180, 196, 200, 216, 225, 231, 242, 245, 252, 256, 270, 280, 288, 289, 294, 308, 315, 320, 324, 338
OFFSET
1,1
COMMENTS
The condition that m!*k is a perfect square is equivalent to m!*(k-1)!*k! being a perfect square, or to A055204(m)=A007913(k).
Is a subsequence of A388851. Conjectured by Erdős and Graham to be the dominant component of that sequence (see also Erdős problem #374).
Contains A000290 (from 4 onwards), A001105 (from 8 onwards), A033429 (from 20 onwards), A033581 (from 6 onwards), etc. More generally, contains the sufficiently large square multiples of A055204(m) for each m.
LINKS
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
A387186_list = list(islice(A387186_gen(), 54)) # Chai Wah Wu, Sep 24 2025, updated Oct 05 2025
CROSSREFS
Subsequence of A388851.
Contains (most of) A000290, A001105, A033429, A033581.
Sequence in context: A228019 A228020 A163282 * A095404 A073540 A123710
KEYWORD
nonn
AUTHOR
Terence Tao, Sep 22 2025
STATUS
approved