OFFSET
1,4
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Infinitary Divisor.
FORMULA
a(n) = 0 if and only if the number of divisors of n is a power of 2, (i.e., n is in A036537).
a(n) > 0 if and only if the number of divisors of n is not a power of 2, (i.e., n is in A162643).
Sum_{k=1..n} a(k) ~ c * n^2, where c = A072691 - A327574 = 0.091748791296728992397... . - Amiram Eldar, Nov 25 2025
EXAMPLE
a(12) = 8 since 12 has 2 noninfinitary divisors, 2 and 6, and 2 + 6 = 8.
MATHEMATICA
f[p_, e_] := Module[{b = IntegerDigits[e, 2], m}, m = Length[b]; Product[If[b[[j]] > 0, 1 + p^(2^(m - j)), 1], {j, 1, m}]]; isigma[1] = 1; isigma[n_] := Times @@ f @@@ FactorInteger[n]; a[n_]:= DivisorSigma[1, n] - isigma[n]; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n), d); sigma(f) - prod(i = 1, #f~, d = binary(f[i, 2]); prod(k = 1, #d, if(d[k], 1 + f[i, 1]^(2^(#d-k)), 1))); } \\ Amiram Eldar, Nov 25 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Oct 09 2021
STATUS
approved
