OFFSET
1,3
COMMENTS
This sequence is unbounded, as a simple consequence of the Chinese remainder theorem. - Thomas Ordowski, Jul 22 2015
Conjecture: lim sup_{n->oo} a(n)/log(A005117(n)) = 1/2. - Thomas Ordowski, Jul 23 2015
a(n) = 1 infinitely often since the density of the squarefree numbers, 6/Pi^2, is greater than 1/2. In particular, at least 2 - Pi^2/6 = 35.5...% of the terms are 1. - Charles R Greathouse IV, Jul 23 2015
From Amiram Eldar, Mar 09 2021: (Start)
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
Asymptotic mean: lim_{n->oo} (1/n) Sum_{k=1..n} a(k) = Pi^2/6 (A013661). - Amiram Eldar, Oct 21 2020
EXAMPLE
MAPLE
MATHEMATICA
Select[Range[200], SquareFreeQ] // Differences (* Jean-François Alcover, Mar 10 2019 *)
PROG
(Haskell)
a076259 n = a076259_list !! (n-1)
a076259_list = zipWith (-) (tail a005117_list) a005117_list
-- Reinhard Zumkeller, Aug 03 2012
(PARI) t=1; for(n=2, 1e3, if(issquarefree(n), print1(n-t", "); t=n)) \\ Charles R Greathouse IV, Jul 23 2015
(Python)
from math import isqrt
from sympy import mobius
def A076259(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)
r, k = n+1, f(n+1)+1
while r != k:
r, k = k, f(k)+1
return int(r-m) # Chai Wah Wu, Aug 15 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Oct 03 2002
STATUS
approved