This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A243351 #19 Aug 13 2024 02:13:13 %S A243351 1,2,3,3,4,5,4,5,5,6,7,7,7,7,8,9,8,7,8,9,9,10,11,11,12,13,13,14,15,14, %T A243351 15,13,13,13,13,14,15,15,16,15,16,17,17,18,19,19,20,19,20,21,20,21,21, %U A243351 22,23,23,23,23,24,25,25,23,24,25,25,26,27,27,28,29,29,30 %N A243351 Difference between 2n and the n-th squarefree number: a(n) = 2n - A005117(n). %H A243351 Antti Karttunen, <a href="/A243351/b243351.txt">Table of n, a(n) for n = 1..10001</a> %F A243351 a(n) = 2n - A005117(n). %F A243351 a(n) = n - A243348(n). %F A243351 a(n) ~ c * n, where c = 2 - Pi^2/6 (A152416). - _Amiram Eldar_, Mar 04 2024 %t A243351 Module[{sf=Select[Range[150],SquareFreeQ]},Table[2n-sf[[n]],{n,Length[ sf]}]] (* _Harvey P. Dale_, Jun 26 2021 *) %o A243351 (Python) %o A243351 from math import isqrt %o A243351 from sympy import mobius %o A243351 def A243351(n): %o A243351 def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)) %o A243351 m, k = n, f(n) %o A243351 while m != k: %o A243351 m, k = k, f(k) %o A243351 return (n<<1)-m # _Chai Wah Wu_, Aug 12 2024 %Y A243351 Cf. A005117, A152416, A243348. %K A243351 nonn %O A243351 1,2 %A A243351 _Antti Karttunen_, Jun 04 2014