|
|
A351408
|
|
Number of divisors of n that are either trivial or are nonsquares with a square divisor > 1.
|
|
1
|
|
|
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 4, 1, 1, 2, 2, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 2, 2, 1, 1, 5, 1, 2, 1, 2, 1, 4, 1, 4, 1, 1, 1, 4, 1, 1, 2, 3, 1, 1, 1, 2, 1, 1, 1, 6, 1, 1, 2, 2, 1, 1, 1, 5, 2, 1, 1, 4, 1, 1, 1, 4, 1, 4, 1, 2, 1, 1, 1, 7
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,8
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{d|n} [c(d) = mu(d)^2], where [ ] is the Iverson bracket and c is the characteristic function of squares (A010052).
|
|
EXAMPLE
|
a(96) = 7; 96 has the trivial divisor (=1), and the 6 divisors 8,12,24,32,48,96 which all have a square divisor > 1 but are not themselves square.
|
|
MATHEMATICA
|
a[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, Times @@ (e + 1) - 2^Length[e] - Times @@ (1 + Floor[e/2]) + 2]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Oct 06 2023 *)
|
|
PROG
|
(PARI) a(n) = {my(f = factor(n), e = f[, 2], d = numdiv(f), nu = omega(f)); d - 2^nu - vecprod(apply(x -> x\2 + 1, e)) + 2; } \\ Amiram Eldar, Oct 06 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|