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.

A365402 The number of divisors of the largest unitary divisor of n that is an exponentially odd number.

Original entry on oeis.org

1, 2, 2, 1, 2, 4, 2, 4, 1, 4, 2, 2, 2, 4, 4, 1, 2, 2, 2, 2, 4, 4, 2, 8, 1, 4, 4, 2, 2, 8, 2, 6, 4, 4, 4, 1, 2, 4, 4, 8, 2, 8, 2, 2, 2, 4, 2, 2, 1, 2, 4, 2, 2, 8, 4, 8, 4, 4, 2, 4, 2, 4, 2, 1, 4, 8, 2, 2, 4, 8, 2, 4, 2, 4, 2, 2, 4, 8, 2, 2, 1, 4, 2, 4, 4, 4, 4
Offset: 1

Views

Author

Amiram Eldar, Sep 03 2023

Keywords

Comments

The sum of these divisors is A351569(n).
All the terms are either 1 or even (A004277).

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[OddQ[e], e + 1, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = vecprod(apply(x -> if(x%2, x+1, 1), factor(n)[, 2]));
    
  • Python
    from math import prod
    from sympy import factorint
    def A365402(n): return prod(e+1 for e in factorint(n).values() if e&1) # Chai Wah Wu, Nov 17 2023
  • SageMath
    def a(n): return prod((valuation(n,p)+1) for p in prime_divisors(n) if valuation(n,p)%2==1) # Orges Leka, Nov 16 2023
    

Formula

a(n) = A000005(A350389(n)).
a(n) = A000005(n) / A365401(n).
a(n) <= A000005(n) with equality if and only if n is an exponentially odd number (A268335).
a(n) >= 1 with equality if and only if n is a square (A000290).
Multiplicative with a(p^e) = 1 if e is even, and e+1 if e is odd.
Dirichlet g.f.: zeta(2*s)^2 * Product_{p prime} (1 + 2/p^s - 1/p^(2*s)).
From Vaclav Kotesovec, Sep 05 2023: (Start)
Dirichlet g.f.: zeta(s)^2 * zeta(2*s)^2 * Product_{p prime} (1 - 4/p^(2*s) + 4/p^(3*s) - 1/p^(4*s)).
Let f(s) = Product_{p prime} (1 - 4/p^(2*s) + 4/p^(3*s) - 1/p^(4*s)).
Sum_{k=1..n} a(k) ~ f(1) * Pi^4 * n / 36 * (log(n) + 2*gamma - 1 + 24*Zeta'(2)/Pi^2 + f'(1)/f(1)), where
f(1) = Product_{p prime} (1 - 4/p^2 + 4/p^3 - 1/p^4) = 0.2177787166195363783230075141194468131307977550013559376482764035236264911...
f'(1) = f(1) * Sum_{p prime} 4*(2*p - 1) * log(p) / (1 - 3*p + p^2 + p^3) = f(1) * 3.3720882314412399056794495057358594564001229865925330149186567502684770675...
and gamma is the Euler-Mascheroni constant A001620. (End)
a(n) = Sum_{d|n} (-1)^(Sum_{p|gcd(d,n/d)} v_p(d)*v_p(n/d)), where v_p(x) denotes the valuation of x at the prime p. - Orges Leka, Nov 16 2023