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.

A381934 a(n) is the least k > 1 such that the binary expansions of n and n*k have the same number of nonleading zeros.

Original entry on oeis.org

2, 3, 3, 5, 3, 6, 5, 9, 3, 5, 6, 5, 5, 19, 9, 17, 3, 5, 5, 3, 6, 9, 5, 11, 5, 7, 19, 301, 9, 35, 17, 33, 3, 5, 5, 3, 5, 5, 3, 3, 6, 5, 9, 5, 5, 17, 11, 305, 5, 7, 7, 15, 19, 3, 301, 9, 9, 71, 35, 13, 17, 67, 33, 65, 3, 5, 5, 3, 5, 5, 3, 3, 5, 10, 5, 10, 3, 6
Offset: 0

Views

Author

Rémy Sigrist, Mar 10 2025

Keywords

Comments

This sequence is well defined (see A381935).

Examples

			The first terms, alongside the binary expansions of n and n*a(n), are:
  n   a(n)  bin(n)  bin(n*a(n))
  --  ----  ------  -----------
   0     2       0            0
   1     3       1           11
   2     3      10          110
   3     5      11         1111
   4     3     100         1100
   5     6     101        11110
   6     5     110        11110
   7     9     111       111111
   8     3    1000        11000
   9     5    1001       101101
  10     6    1010       111100
  11     5    1011       110111
  12     5    1100       111100
  13    19    1101     11110111
  14     9    1110      1111110
  15    17    1111     11111111
  16     3   10000       110000
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

a(2^n) = 3.
a(2^n - 1) = 2^n + 1.