login
a(n) = n - squarefree kernel of n, A007947.
16

%I #17 Dec 05 2023 04:19:45

%S 0,0,0,2,0,0,0,6,6,0,0,6,0,0,0,14,0,12,0,10,0,0,0,18,20,0,24,14,0,0,0,

%T 30,0,0,0,30,0,0,0,30,0,0,0,22,30,0,0,42,42,40,0,26,0,48,0,42,0,0,0,

%U 30,0,0,42,62,0,0,0,34,0,0,0,66,0,0,60,38,0,0

%N a(n) = n - squarefree kernel of n, A007947.

%H Harry J. Smith, <a href="/A066503/b066503.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = n - A007947(n).

%F a(A005117(n)) = 0.

%F Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = 1 - A065463 = 0.295557... . - _Amiram Eldar_, Dec 05 2023

%t a[n_] := n - Times @@ FactorInteger[n][[All, 1]];

%t Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Dec 01 2021 *)

%o (PARI) { for (n=1, 1000, f=factor(n); k=1; for(i=1, matsize(f)[1], k*=f[i, 1]); write("b066503.txt", n, " ", n - k) ) } \\ _Harry J. Smith_, Feb 18 2010

%Y Cf. A005117, A007947, A065463.

%K nonn,easy

%O 1,4

%A _Reinhard Zumkeller_, Jan 04 2002