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.

A179211 Number of squarefree numbers between n and 2*n (inclusive).

Original entry on oeis.org

2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 8, 9, 8, 9, 9, 11, 11, 13, 13, 15, 15, 15, 15, 15, 16, 16, 17, 19, 19, 20, 19, 21, 21, 22, 22, 24, 23, 24, 24, 25, 25, 26, 26, 27, 28, 29, 29, 30, 30, 32, 32, 34, 34, 36, 36, 38, 38, 38, 38, 39, 39, 38, 39, 41, 41, 42, 41, 43, 43, 44, 44, 46, 45, 45
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 05 2010

Keywords

Crossrefs

Programs

  • Maple
    a := n -> nops(select(issqrfree, [$n..(2*n)])):
    seq(a(n), n=1..75); # Peter Luschny, Mar 02 2017
  • Mathematica
    a[n_] := Select[Range[n, 2n], SquareFreeQ] // Length;
    Array[a, 75] (* Jean-François Alcover, Jun 22 2018 *)
  • PARI
    f(n)=my(s); forfactored(k=1,sqrtint(n), s += n\k[1]^2*moebius(k)); s
    a(n)=f(2*n)-f(n-1) \\ Charles R Greathouse IV, Nov 05 2017

Formula

a(n) = Sum_{k=n..2*n} A008966(k).
a(n) > A035250(n) for n>2;
A179212(n) = a(n+1) - a(n);
a(n) = A013928(2*n+1) - A013928(n).
a(n) ~ (6/Pi^2) * n. - Amiram Eldar, Mar 03 2021