cp's OEIS Frontend

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.

A077641 Number of squarefree integers in closed interval [n, 2n-1], i.e., among n consecutive numbers beginning with n.

This page as a plain text file.
%I A077641 #27 Feb 25 2025 02:14:25
%S A077641 1,2,2,3,3,4,4,5,6,7,7,8,8,8,8,9,10,11,12,13,14,15,14,15,15,16,16,17,
%T A077641 18,19,19,19,20,21,21,22,23,23,23,24,24,25,25,26,27,28,28,29,30,30,31,
%U A077641 32,33,34,35,36,37,38,37,38,38,39,38,39,40,41,41,41,42,43,43,44,45,45
%N A077641 Number of squarefree integers in closed interval [n, 2n-1], i.e., among n consecutive numbers beginning with n.
%H A077641 Amiram Eldar, <a href="/A077641/b077641.txt">Table of n, a(n) for n = 1..10000</a>
%F A077641 a(n) = Sum_{j=0..n-1} abs(mu(n+j)).
%F A077641 a(1) = 1; a(n + 1) = a(n) - issquarefree(n) + issquarefree(2n-2) + issquarefree(2n-1) for n > 0. - _David A. Corneth_, May 20 2016
%F A077641 a(n) ~ n/zeta(2). - _Amiram Eldar_, Feb 25 2025
%e A077641 For n = 10: among the numbers {10,...,19} seven are squarefree: {10,11,13,14,15,17,19}, so a(10) = 7.
%t A077641 Table[Apply[Plus, Table[Abs[MoebiusMu[w+j]], {j, 0, w-1}]], {w, 1, 128}]
%t A077641 Table[Count[Range[n,2n-1],_?SquareFreeQ],{n,80}] (* _Harvey P. Dale_, Oct 27 2013 *)
%t A077641 Module[{nn=80,sf},sf=Table[If[SquareFreeQ[n],1,0],{n,2nn}];Table[Total[ Take[ sf,{i,2i-1}]],{i,nn}]] (* _Harvey P. Dale_, May 20 2016 *)
%o A077641 (PARI) a(n) = sum(i = 0, n-1, issquarefree(n+i)); \\ _Amiram Eldar_, Feb 25 2025
%Y A077641 Cf. A005117, A008683, A008966, A013661.
%K A077641 nonn
%O A077641 1,2
%A A077641 _Labos Elemer_, Nov 14 2002