login
A374988
Largest unitary square divisor of n!.
3
1, 1, 1, 1, 1, 1, 144, 144, 9, 81, 518400, 518400, 25600, 25600, 1225, 35721, 35721, 35721, 21069103104, 21069103104, 52672757760000, 163840000, 75625, 75625, 18730002677760000, 468250066944000000, 18867078140625, 319515625, 767157015625, 767157015625, 15759472921106221891584
OFFSET
0,7
COMMENTS
Unitary analog of A055071.
a(n) is even if and only if n > 1 and is in A006364.
LINKS
FORMULA
a(n) = A350388(n!).
a(n) = A374989(n)^2.
MATHEMATICA
f[p_, e_] := If[EvenQ[e], p^e, 1]; a[0] = a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n!]; Array[a, 30, 0]
PROG
(PARI) a(n) = {my(f = factor(n!)); prod(i = 1, #f~, if(f[i, 2]%2, 1, f[i, 1]^f[i, 2])); }
(Python)
from math import prod
from itertools import count, islice
from collections import Counter
from sympy import factorint
def A374988_gen(): # generator of terms
c = Counter()
for i in count(0):
c += Counter(factorint(i))
yield prod(p**e for p, e in c.items() if e&1^1)
A374988_list = list(islice(A374988_gen(), 30)) # Chai Wah Wu, Jul 27 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Jul 26 2024
STATUS
approved