login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A372889
Greatest squarefree number <= 2^n.
11
1, 2, 3, 7, 15, 31, 62, 127, 255, 511, 1023, 2047, 4094, 8191, 16383, 32767, 65535, 131071, 262142, 524287, 1048574, 2097149, 4194303, 8388607, 16777214, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741822, 2147483647, 4294967295, 8589934591
OFFSET
0,2
FORMULA
a(n) = A005117(A143658(n)).
a(n) = A070321(2^n). - R. J. Mathar, May 31 2024
EXAMPLE
The terms together with their binary expansions and binary indices begin:
1: 1 ~ {1}
2: 10 ~ {2}
3: 11 ~ {1,2}
7: 111 ~ {1,2,3}
15: 1111 ~ {1,2,3,4}
31: 11111 ~ {1,2,3,4,5}
62: 111110 ~ {2,3,4,5,6}
127: 1111111 ~ {1,2,3,4,5,6,7}
255: 11111111 ~ {1,2,3,4,5,6,7,8}
511: 111111111 ~ {1,2,3,4,5,6,7,8,9}
1023: 1111111111 ~ {1,2,3,4,5,6,7,8,9,10}
2047: 11111111111 ~ {1,2,3,4,5,6,7,8,9,10,11}
4094: 111111111110 ~ {2,3,4,5,6,7,8,9,10,11,12}
8191: 1111111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,12,13}
16383: 11111111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,12,13,14}
32767: 111111111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
MATHEMATICA
Table[NestWhile[#-1&, 2^n, !SquareFreeQ[#]&], {n, 0, 15}]
PROG
(PARI) a(n) = my(k=2^n); while (!issquarefree(k), k--); k; \\ Michel Marcus, May 29 2024
CROSSREFS
Positions of these terms in A005117 are A143658.
For prime instead of squarefree we have A014234, delta A013603.
For primes instead of powers of two we have A112925, opposite A112926.
Least squarefree number >= 2^n is A372683, delta A373125, indices A372540.
The opposite for prime instead of squarefree is A372684, firsts of A035100.
The delta (difference from 2^n) is A373126.
A000120 counts ones in binary expansion (binary weight), zeros A080791.
A005117 lists squarefree numbers, first differences A076259.
A030190 gives binary expansion, reversed A030308, length A070939 or A029837.
A061398 counts squarefree numbers between primes, exclusive.
A077643 counts squarefree terms between powers of 2, run-lengths of A372475.
Sequence in context: A049958 A298403 A177487 * A153010 A076993 A076698
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 27 2024
STATUS
approved