login
A373126
Difference between 2^n and the greatest squarefree number <= 2^n.
12
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,7
FORMULA
a(n) = 2^n-A372889(n). - R. J. Mathar, May 31 2024
EXAMPLE
The greatest squarefree number <= 2^21 is 2097149, and 2^21 = 2097152, so a(21) = 3.
MATHEMATICA
Table[2^n-NestWhile[#-1&, 2^n, !SquareFreeQ[#]&], {n, 0, 100}]
CROSSREFS
For prime instead of squarefree we have A013603, opposite A092131.
For primes instead of powers of 2: A240474, A240473, A112926, A112925.
Difference between 2^n and A372889.
The opposite is A373125, delta of A372683.
A005117 lists squarefree numbers, first differences A076259.
A053797 gives lengths of gaps between squarefree numbers.
A061398 counts squarefree numbers between primes (exclusive).
A070939 or (preferably) A029837 gives length of binary expansion.
A077643 counts squarefree terms between powers of 2, run-lengths of A372475.
A143658 counts squarefree numbers up to 2^n.
Cf. A372473 (firsts of A372472), A372541 (firsts of A372433).
For primes between powers of 2:
- sum A293697 (except initial terms)
- length A036378
- min A104080 or A014210, indices A372684 (firsts of A035100)
- max A014234
Sequence in context: A226957 A108775 A300826 * A334926 A305936 A339790
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 29 2024
STATUS
approved