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.

A381406 a(0) = 0; for n > 0, a(n) is the smallest unused number such that a(n) OR a(n-1) = 2^k - 1, where OR is the binary OR operation and k>=1, while the binary weight of a(n) does not equal that of a(n-1).

Original entry on oeis.org

0, 1, 3, 2, 5, 7, 4, 11, 6, 13, 10, 15, 8, 23, 9, 14, 17, 30, 19, 12, 27, 20, 31, 16, 47, 18, 29, 22, 43, 21, 46, 25, 39, 24, 55, 26, 45, 50, 61, 34, 63, 28, 51, 44, 59, 36, 91, 37, 58, 69, 62, 33, 94, 35, 60, 67, 124, 71, 56, 79, 48, 95, 32, 127, 38, 57, 70, 121, 54, 41, 86, 107, 52, 75, 117, 42, 53, 74, 119, 40, 87, 104, 151, 105, 118, 73, 126, 49, 78, 115
Offset: 0

Views

Author

Scott R. Shannon, Feb 22 2025

Keywords

Comments

The fixed points begin 0, 1, 10, 315, 413, 415, 1551, 1559, 1797; there are likely infinitely more.

Examples

			a(4) = 5 = 101_2 as 5 is unused and a(3) = 2 = 10_2, and 101_2 OR 10_2 = 111_2 = 2^3 - 1, while the binary weights of 5 and 2 are 2 and 1 respectively.
		

Crossrefs