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.

A336643 Squarefree kernel of n divided by the squarefree part of n: a(n) = rad(n) / core(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 1, 5, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 7, 5, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 5, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1, 1, 1, 7, 3, 10, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2020

Keywords

Comments

a(n) is the least number k such that k*n (and also n/k) is an exponentially odd number (A268335). - Amiram Eldar, Nov 18 2022

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := p^(1 - Mod[e, 2]); a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Dec 07 2020 *)
  • PARI
    A336643(n) = (factorback(factorint(n)[, 1]) / core(n));
    
  • PARI
    A336643(n) = if(1==n,n, my(f=factor(n)); prod(i=1, #f~, f[i, 1]^(1-(f[i, 2]%2))));
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, 1/(1-X^2) * (1 + X + p*X^2 - X^2))[n], ", ")) \\ Vaclav Kotesovec, Sep 09 2023
    
  • Python
    from math import prod
    from sympy.ntheory.factor_ import primefactors, core
    def A336643(n): return prod(primefactors(n))//core(n) # Chai Wah Wu, Dec 30 2021
    
  • SageMath
    def A336643(n: int) -> int:
        return prod(b^(1 - e % 2) for (b, e) in list(factor(n)))
    print([A336643(n) for n in range(1, 106)])  # Peter Luschny, Aug 23 2025

Formula

a(n) = A007947(n) / A007913(n).
Multiplicative with a(p^k) = p^(1-(k mod 2)) = p^A059841(k).
a(n) = n/A350390(n). - Amiram Eldar, Jan 01 2022
a(n) = A356191(n)/n. - Amiram Eldar, Nov 18 2022
Dirichlet g.f.: zeta(2*s) * Product_{p prime} (1 + 1/p^s + 1/p^(2*s-1) - 1/p^(2*s)). - Amiram Eldar, Sep 09 2023
From Vaclav Kotesovec, Sep 09 2023: (Start)
Let f(s) = Product_{p prime} (1 - p^(1-5*s) + p^(2-5*s) + 2*p^(1-4*s) - p^(2-4*s) - p^(1-3*s) + p^(-3*s) - 2*p^(-2*s)).
Dirichlet g.f.: zeta(s) * zeta(2*s) * zeta(2*s-1) * f(s).
Sum_{k=1..n} a(k) ~ Pi^2 * f(1) * n / 12 * (log(n) + 3*gamma - 1 + 12*zeta'(2)/Pi^2 + f'(1)/f(1)), where
f(1) = Product_{p prime} (1 - 4/p^2 + 4/p^3 - 1/p^4) = A256392 = 0.217778716619536378323007514119446813130797755001355937648276403523626491...,
f'(1) = f(1) * Sum_{p prime} (11*p - 5) * log(p) / (p^3 + p^2 - 3*p + 1) = f(1) * 4.716596820856763078660955244870812634072512131626849517007098664560806248...
and gamma is the Euler-Mascheroni constant A001620. (End)