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.

Showing 1-2 of 2 results.

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.

A381935 For any n > 0, a(n) is the least nontrivial multiple of n whose binary expansion has the same number of nonleading zeros as that of n; a(0) = 0.

Original entry on oeis.org

0, 3, 6, 15, 12, 30, 30, 63, 24, 45, 60, 55, 60, 247, 126, 255, 48, 85, 90, 57, 120, 189, 110, 253, 120, 175, 494, 8127, 252, 1015, 510, 1023, 96, 165, 170, 105, 180, 185, 114, 117, 240, 205, 378, 215, 220, 765, 506, 14335, 240, 343, 350, 765, 988, 159, 16254
Offset: 0

Views

Author

Rémy Sigrist, Mar 10 2025

Keywords

Comments

This sequence is well defined: for any n > 0: write n as m * 2^k for some odd number m; m divides some Mersenne number M > m (see A352217); M * 2^(k + A023416(m)) is a multiple of n with the desired properties, hence a(n) exists.

Examples

			The first terms, in decimal and in binary, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     3       1         11
   2     6      10        110
   3    15      11       1111
   4    12     100       1100
   5    30     101      11110
   6    30     110      11110
   7    63     111     111111
   8    24    1000      11000
   9    45    1001     101101
  10    60    1010     111100
  11    55    1011     110111
  12    60    1100     111100
  13   247    1101   11110111
  14   126    1110    1111110
  15   255    1111   11111111
  16    48   10000     110000
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

a(n) = n * A381934(n).
Showing 1-2 of 2 results.