OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10001
FORMULA
a(n) = 2n - A005117(n).
a(n) = n - A243348(n).
a(n) ~ c * n, where c = 2 - Pi^2/6 (A152416). - Amiram Eldar, Mar 04 2024
MATHEMATICA
Module[{sf=Select[Range[150], SquareFreeQ]}, Table[2n-sf[[n]], {n, Length[ sf]}]] (* Harvey P. Dale, Jun 26 2021 *)
PROG
(Python)
from math import isqrt
from sympy import mobius
def A243351(n):
def f(x): return n+x-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 (n<<1)-m # Chai Wah Wu, Aug 12 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 04 2014
STATUS
approved