login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the sum of the even exponents in the prime factorization of n.
11

%I #11 Dec 30 2021 14:12:50

%S 0,0,0,2,0,0,0,0,2,0,0,2,0,0,0,4,0,2,0,2,0,0,0,0,2,0,0,2,0,0,0,0,0,0,

%T 0,4,0,0,0,0,0,0,0,2,2,0,0,4,2,2,0,2,0,0,0,0,0,0,0,2,0,0,2,6,0,0,0,2,

%U 0,0,0,2,0,0,2,2,0,0,0,4,4,0,0,2,0,0,0,0,0,2,0,2,0,0,0,0,0,2,2,4,0,0,0,0,0

%N a(n) is the sum of the even exponents in the prime factorization of n.

%C a(n) is the number of prime divisors of n, counted with multiplicity, with an even exponent in the prime factorization of n.

%C All the terms are even by definition.

%H Amiram Eldar, <a href="/A350386/b350386.txt">Table of n, a(n) for n = 1..10000</a>

%F Additive with a(p^e) = e if e is even and 0 otherwise.

%F a(n) = A001222(A350388(n)).

%F a(n) = 0 if and only if n is an exponentially odd number (A268335).

%F a(n) = A001222(n) - A350387(n).

%F a(n) = A001222(n) if and only if n is a positive square (A000290 \ {0}).

%F Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} 2*p/((p-1)*(p+1)^2) = 0.7961706018...

%t f[p_, e_] := If[EvenQ[e], e, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]

%o (Python)

%o from sympy import factorint

%o def a(n): return sum(e for e in factorint(n).values() if e%2 == 0)

%o print([a(n) for n in range(1, 106)]) # _Michael S. Branicky_, Dec 28 2021

%o (PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, if (!(f[k, 2] % 2), f[k, 2])); \\ _Michel Marcus_, Dec 29 2021

%Y Cf. A000290, A001222, A162641, A268335, A350387, A350388.

%K nonn,easy

%O 1,4

%A _Amiram Eldar_, Dec 28 2021