A105570 Nonsquarefree numbers in place: a(n) = n if n is not squarefree, 0 otherwise.
0, 0, 0, 0, 4, 0, 0, 0, 8, 9, 0, 0, 12, 0, 0, 0, 16, 0, 18, 0, 20, 0, 0, 0, 24, 25, 0, 27, 28, 0, 0, 0, 32, 0, 0, 0, 36, 0, 0, 0, 40, 0, 0, 0, 44, 45, 0, 0, 48, 49, 50, 0, 52, 0, 54, 0, 56, 0, 0, 0, 60, 0, 0, 63, 64, 0, 0, 0, 68, 0, 0, 0, 72, 0, 0, 75, 76, 0, 0, 0, 80, 81, 0, 0, 84, 0, 0, 0, 88, 0
Offset: 0
Links
- Antti Karttunen, Table of n, a(n) for n = 0..65537
Programs
-
Mathematica
Table[If[SquareFreeQ[n],0,n],{n,0,100}] (* Harvey P. Dale, Aug 13 2016 *)
-
PARI
A105570(n) = if(issquarefree(n),0,n); \\ Antti Karttunen, Jul 03 2018
Formula
a(n) = n - abs(mu(n))*n.
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1 - 1/zeta(2))/2 = 0.1960364490... . - Amiram Eldar, Feb 22 2024