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.

A240473 Distance from prime(n) to the closest smaller squarefree number.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 2, 1, 3, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 4, 1, 1, 2, 2, 4, 1, 3, 1, 3, 2, 2, 2, 1, 3, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 3, 3, 1, 2, 2, 1, 2, 3, 1, 2, 1, 2, 4, 1, 1, 2, 2, 1, 3, 2, 2, 2, 1, 2, 1, 2, 1, 1
Offset: 1

Views

Author

Chris Boyd, Apr 06 2014

Keywords

Examples

			a(10) = 3 because 3 is the gap between prime(10) = 29 and the closest smaller squarefree number 26.
		

Crossrefs

Programs

  • PARI
    forprime(p=1,450,forstep(j=p-1,1,-1,if(issquarefree(j),print1(p-j", ");break)))

Formula

a(n) = A000040(n) - A112925(n). - Michel Marcus, Apr 10 2014