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.

A072490 Number of squarefree numbers (excluding 1) less than n.

Original entry on oeis.org

0, 0, 1, 2, 2, 3, 4, 5, 5, 5, 6, 7, 7, 8, 9, 10, 10, 11, 11, 12, 12, 13, 14, 15, 15, 15, 16, 16, 16, 17, 18, 19, 19, 20, 21, 22, 22, 23, 24, 25, 25, 26, 27, 28, 28, 28, 29, 30, 30, 30, 30, 31, 31, 32, 32, 33, 33, 34, 35, 36, 36, 37, 38, 38, 38, 39
Offset: 1

Views

Author

Amarnath Murthy, Jul 14 2002

Keywords

Examples

			a(10) = 5 as the squarefree numbers less than 10 are 2,3,5,6 and 7.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(k=2, n-1, issquarefree(k)); \\ Michel Marcus, Sep 15 2019
    
  • Python
    from math import isqrt
    from sympy import mobius
    def A072490(n): return int(sum(mobius(k)*((n-1)//k**2) for k in range(1, isqrt(n-1)+1)))-1 if n>1 else 0 # Chai Wah Wu, Aug 19 2024

Formula

a(n) = A013928(n) - 1, n > 1.
G.f.: (x/(1 - x)) * Sum_{k>=2} mu(k)^2*x^k. - Ilya Gutkovskiy, Sep 14 2019

Extensions

Name clarified and more terms from Ilya Gutkovskiy, Sep 14 2019