OFFSET
1,6
COMMENTS
Previous name, "Number of non-unitary square divisors of n!." was incorrect. See A375188 for the correct sequence with this name. - Amiram Eldar, Aug 03 2024
MATHEMATICA
A046951[n_] := Length[Select[Divisors[n], IntegerQ[Sqrt[#]] &]]; A008833[n_] := First[Select[Reverse[Divisors[n]], IntegerQ[Sqrt[#]] &, 1]]; A055229[n_] := With[{sf = Times @@ Power @@@ ({#[[1]], Mod[#[[2]], 2]} & /@ FactorInteger[n])}, GCD[sf, n/sf]]; Table[A046951[n!] - 2^(PrimeNu[Sqrt[A008833[n!]]/A055229[n!]]), {n, 1, 50}] (* G. C. Greubel, May 20 2017 *)
f1[p_, e_] := 1 + Floor[e/2]; f2[p_, 1] := 1; f2[p_, e_] := If[EvenQ[e], p^(e/2), p^((e-3)/2)]; ; a[1] = 0; a[n_] := Times @@ f1 @@@ (fct = FactorInteger[n!]) - 2^PrimeNu[Times @@ f2 @@@ fct]; Array[a, 60] (* Amiram Eldar, Aug 03 2024 *)
PROG
(PARI) a(n) = {my(f = factor(n!)); prod(i = 1, #f~, 1 + f[i, 2]\2) - 2^omega(prod(i = 1, #f~, if(f[i, 2] == 1, 1, f[i, 1]^if(f[i, 2]%2, (f[i, 2]-3)/2, f[i, 2]/2)))); } \\ Amiram Eldar, Aug 03 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 08 2000
EXTENSIONS
Incorrect name replaced with a formula by Amiram Eldar, Aug 03 2024
STATUS
approved