OFFSET
0,7
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..673
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)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Jul 26 2024
STATUS
approved