A243348 Difference between the n-th squarefree number and n: a(n) = A005117(n) - n.
0, 0, 0, 1, 1, 1, 3, 3, 4, 4, 4, 5, 6, 7, 7, 7, 9, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 16, 16, 19, 20, 21, 22, 22, 22, 23, 23, 25, 25, 25, 26, 26, 26, 27, 27, 29, 29, 29, 31, 31, 32, 32, 32, 33, 34, 35, 35, 35, 36, 39, 39, 39, 40, 40, 40, 41, 41, 41, 42, 42, 42
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10001
- Antti Karttunen, Sequence plotted together with A243351 showing how their ratio develops.
- Antti Karttunen, Ratio A005117(n)/n plotted in the same way, converging to Pi^2/6.
Crossrefs
Programs
-
PARI
do(x)=my(v=List([0])); forfactored(n=2,x\1, if(vecmax(n[2][,2])==1, listput(v,n[1]-#v-1))); Vec(v) \\ Charles R Greathouse IV, Nov 05 2017
-
Python
from math import isqrt from sympy import mobius def A243348(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 m-n # Chai Wah Wu, Aug 12 2024
-
Scheme
(define (A243348 n) (- (A005117 n) n))
Formula
a(n) = A005117(n) - n.
a(n) = n - A243351(n).
Limit_{n->oo} a(n)/A243351(n) = (Pi^2 - 6)/(12 - Pi^2) = 1.81637833.... - Charles R Greathouse IV, Jun 04 2014
a(n) ~ kn where k = Pi^2/6 - 1 = 0.644934.... - Charles R Greathouse IV, Nov 05 2017
Comments