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.

A372889 Greatest squarefree number <= 2^n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 27 2024

Keywords

Examples

			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}
		

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.

Programs

  • Mathematica
    Table[NestWhile[#-1&,2^n,!SquareFreeQ[#]&],{n,0,15}]
  • PARI
    a(n) = my(k=2^n); while (!issquarefree(k), k--); k; \\ Michel Marcus, May 29 2024

Formula

a(n) = A005117(A143658(n)).
a(n) = A070321(2^n). - R. J. Mathar, May 31 2024