login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A350387 a(n) is the sum of the odd exponents in the prime factorization of n. 9
0, 1, 1, 0, 1, 2, 1, 3, 0, 2, 1, 1, 1, 2, 2, 0, 1, 1, 1, 1, 2, 2, 1, 4, 0, 2, 3, 1, 1, 3, 1, 5, 2, 2, 2, 0, 1, 2, 2, 4, 1, 3, 1, 1, 1, 2, 1, 1, 0, 1, 2, 1, 1, 4, 2, 4, 2, 2, 1, 2, 1, 2, 1, 0, 2, 3, 1, 1, 2, 3, 1, 3, 1, 2, 1, 1, 2, 3, 1, 1, 0, 2, 1, 2, 2, 2, 2, 4, 1, 2, 2, 1, 2, 2, 2, 6, 1, 1, 1, 0, 1, 3, 1, 4, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
First differs from A125073 at n = 32.
a(n) is the number of prime divisors of n, counted with multiplicity, with an odd exponent in the prime factorization of n.
LINKS
FORMULA
Additive with a(p^e) = e if e is odd and 0 otherwise.
a(n) = A001222(A350389(n)).
a(n) = 0 if and only if n is a positive square (A000290 \ {0}).
a(n) = A001222(n) - A350386(n).
a(n) = A001222(n) if and only if n is an exponentially odd number (A268335).
Sum_{k=1..n} a(k) = n * log(log(n)) + c * n + O(n/log(n)), where c = A083342 - Sum_{p prime} 2*p/((p-1)*(p+1)^2) = gamma + Sum_{p prime} (log(1-1/p) + (p^2+1)/((p-1)*(p+1)^2)) = 0.2384832800... and gamma is Euler's constant (A001620).
MATHEMATICA
f[p_, e_] := If[OddQ[e], e, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(Python)
from sympy import factorint
def a(n): return sum(e for e in factorint(n).values() if e%2 == 1)
print([a(n) for n in range(1, 106)]) # Michael S. Branicky, Dec 28 2021
(PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, if (f[k, 2] %2, f[k, 2])); \\ Michel Marcus, Dec 28 2021
CROSSREFS
Sequence in context: A321377 A071467 A125073 * A325310 A308881 A281488
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Dec 28 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 19:33 EDT 2024. Contains 375545 sequences. (Running on oeis4.)