login
A087050
Square root of the largest square >1 dividing the n-th nonsquarefree number.
2
2, 2, 3, 2, 4, 3, 2, 2, 5, 3, 2, 4, 6, 2, 2, 3, 4, 7, 5, 2, 3, 2, 2, 3, 8, 2, 6, 5, 2, 4, 9, 2, 2, 3, 2, 4, 7, 3, 10, 2, 6, 4, 2, 3, 2, 11, 2, 5, 3, 8, 2, 3, 2, 2, 12, 7, 2, 5, 2, 3, 2, 4, 9, 2, 2, 13, 3, 2, 5, 4, 6, 2, 2, 3, 8, 14, 3, 10, 2, 3, 4, 2, 6, 2, 4, 15, 2, 2, 3, 2, 4, 11, 9, 2, 7, 2, 5, 6, 16, 2, 3
OFFSET
1,1
LINKS
FORMULA
a(n)^2 is the largest square factor (from A000290) of the nonsquarefree number A013929(n), n>=1.
a(n) = A000188(A013929(n)). - Amiram Eldar, Feb 11 2021
Sum_{k=1..n} a(k) ~ (n/(2*(zeta(2)-1))) * (log(n) + 3*gamma - 3 - 2*zeta'(2)/zeta(2) - log(1-1/zeta(2))), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 14 2024
EXAMPLE
n=10, A013929(10) = 27, a(10)^2 = 3^2 = 9. 27 = 9*3.
n=39, A013929(39) = 100, a(39)^2 = 10^2 = 100.
MATHEMATICA
f[p_, e_] := p^Floor[e/2]; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; s /@ Select[Range[300], !SquareFreeQ[#] &] (* Amiram Eldar, Feb 11 2021 *)
PROG
(Python)
from math import isqrt, prod
from sympy import mobius, factorint
def A087050(n):
def f(x): return n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return prod(p**(e>>1) for p, e in factorint(m).items() if e>1) # Chai Wah Wu, Jul 22 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Sep 08 2003
STATUS
approved