cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A385128 The number of divisors of n whose maximum exponent in their prime factorization is even.

This page as a plain text file.
%I A385128 #9 Jun 25 2025 01:26:26
%S A385128 1,1,1,2,1,1,1,2,2,1,1,3,1,1,1,3,1,3,1,3,1,1,1,3,2,1,2,3,1,1,1,3,1,1,
%T A385128 1,6,1,1,1,3,1,1,1,3,3,1,1,5,2,3,1,3,1,3,1,3,1,1,1,5,1,1,3,4,1,1,1,3,
%U A385128 1,1,1,6,1,1,3,3,1,1,1,5,3,1,1,5,1,1,1
%N A385128 The number of divisors of n whose maximum exponent in their prime factorization is even.
%C A385128 The number of terms in A368714 that divide n.
%C A385128 The sum of these divisors is A385130(n).
%H A385128 Amiram Eldar, <a href="/A385128/b385128.txt">Table of n, a(n) for n = 1..10000</a>
%F A385128 a(n) = Sum_{d|n} (1 - A051903(d) mod 2).
%F A385128 a(n) = A000005(n) - A385129(n).
%F A385128 a(n) = Sum_{k=1..kmax(n)} (-1)^(k+1) * Product_{i=1..r} (min(e_i, k-1) + 1), for n >= 2; if n = Product_{i=1..r} p_i^e_i, r = omega(n) = A001221(n), then emax(n) = max(e_i) = A051903(n), and kmax(n) = emax(n) if emax(n) is odd, and emax(n)+1 otherwise.
%F A385128 Sum_{k=1..n} a(k) ~ c1 * n * (log(n) + 2*gamma - 1) + c2 * n, where gamma is Euler's constant (A001620), c1 = Sum_{k>=2} (-1)^k * (1-1/zeta(k)) = 0.27591672059822700769..., and c2 = 1 + Sum_{k>=2} (-1)^k * k * zeta'(k)/zeta(k)^2 = 0.56812633046434345687... .
%t A385128 q[n_] := EvenQ[Max[FactorInteger[n][[;; , 2]]]]; q[1] = True; a[n_] := DivisorSum[n, 1 &, q[#] &]; Array[a, 100]		
%t A385128 (* second program: *)
%t A385128 a[n_] := Module[{e = FactorInteger[n][[;;, 2]], emax, kmax}, emax = Max[e]; kmax = emax + 1 - Mod[emax, 2]; Sum[(-1)^(k+1) * Product[Min[e[[i]], k-1] + 1, {i, 1, Length[e]}], {k, 1, kmax}]]; Array[a, 100]
%o A385128 (PARI) q(n) = if(n == 1, 1, !(vecmax(factor(n)[,2]) % 2));
%o A385128 a(n) = sumdiv(n, d, q(d));
%o A385128 (PARI) a(n) = if(n == 1, 1, my(e = factor(n)[,2], emax = vecmax(e), kmax = emax + 1 - emax %2); sum(k = 1, kmax, (-1)^(k+1) * prod(i = 1, #e, min(e[i], k-1)+1)));
%Y A385128 Cf. A000005, A001221, A001620, A051903, A368714, A383156, A385129, A385130.
%K A385128 nonn,easy
%O A385128 1,4
%A A385128 _Amiram Eldar_, Jun 24 2025