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.

A385129 The number of divisors of n whose maximum exponent in their prime factorization is odd.

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