A373126 Difference between 2^n and the greatest squarefree number <= 2^n.
0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1
Offset: 0
Keywords
Examples
The greatest squarefree number <= 2^21 is 2097149, and 2^21 = 2097152, so a(21) = 3.
Crossrefs
Difference between 2^n and A372889.
A053797 gives lengths of gaps between squarefree numbers.
A061398 counts squarefree numbers between primes (exclusive).
A143658 counts squarefree numbers up to 2^n.
For primes between powers of 2:
- sum A293697 (except initial terms)
- length A036378
- max A014234
Programs
-
Mathematica
Table[2^n-NestWhile[#-1&,2^n,!SquareFreeQ[#]&],{n,0,100}]
Formula
a(n) = 2^n-A372889(n). - R. J. Mathar, May 31 2024