login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Square root of the largest square >1 dividing the n-th nonsquarefree number.
2

%I #21 Jul 23 2024 10:51:23

%S 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,

%T 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,

%U 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

%N Square root of the largest square >1 dividing the n-th nonsquarefree number.

%H Amiram Eldar, <a href="/A087050/b087050.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n)^2 is the largest square factor (from A000290) of the nonsquarefree number A013929(n), n>=1.

%F a(n) = A000188(A013929(n)). - _Amiram Eldar_, Feb 11 2021

%F 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

%e n=10, A013929(10) = 27, a(10)^2 = 3^2 = 9. 27 = 9*3.

%e n=39, A013929(39) = 100, a(39)^2 = 10^2 = 100.

%t 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 *)

%o (Python)

%o from math import isqrt, prod

%o from sympy import mobius, factorint

%o def A087050(n):

%o def f(x): return n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))

%o m, k = n, f(n)

%o while m != k:

%o m, k = k, f(k)

%o return prod(p**(e>>1) for p, e in factorint(m).items() if e>1) # _Chai Wah Wu_, Jul 22 2024

%Y Cf. A087049, A013929, A000188, A000290.

%Y Cf. A001610, A013661, A306016.

%K nonn,easy

%O 1,1

%A _Wolfdieter Lang_, Sep 08 2003