login
A390864
The number of integers k from 1 to n such that gcd(n, k) is a noninfinitary divisor of n.
6
0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 3, 0, 0, 0, 7, 0, 4, 0, 5, 0, 0, 0, 0, 4, 0, 0, 7, 0, 0, 0, 6, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 11, 10, 0, 0, 21, 6, 8, 0, 13, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 14, 21, 0, 0, 0, 17, 0, 0, 0, 16, 0, 0, 12, 19, 0, 0, 0, 35, 26, 0, 0, 21
OFFSET
1,9
LINKS
FORMULA
a(n) = n - A390863(n).
a(n) <= A051953(n), with equality if and only if n = 1.
a(n) = 0 if and only if n is squarefree (A005117).
a(n) = A055654(n) if and only if n is in A138302.
MATHEMATICA
f[p_, e_] := 1 + (p-1) * Total[p^(Select[Range[e], BitAnd[#, e] == # &] - 1)]; a[1] = 0; a[n_] := n - Times @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); n - prod(i = 1, #f~, 1 + (f[i, 1]-1) * sum(k=1, f[i, 2], if(bitand(k, f[i, 2]) == k, f[i, 1]^(k-1)))); }
CROSSREFS
The number of integers k from 1 to n such that gcd(n, k) is a divisor of n of type: A003557 (coreful), A055653 (unitary), A055654 (nonunitary), A010848 (non-coreful), A390863 (infinitary), this sequence (noninfinitary), A390865 (exponential), A390866 (nonexponential), A390867 (bi-unitary), A390868 (non-bi-unitary).
Sequence in context: A385815 A132825 A259480 * A280164 A049597 A210951
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Nov 22 2025
STATUS
approved