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.

A122872 Table by antidiagonals, T(n,k) is k-th number that starts with n in binary representation.

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 4, 5, 6, 4, 5, 8, 7, 8, 5, 6, 9, 12, 9, 10, 6, 7, 10, 13, 16, 11, 12, 7, 8, 11, 14, 17, 20, 13, 14, 8, 9, 16, 15, 18, 21, 24, 15, 16, 9, 10, 17, 24, 19, 22, 25, 28, 17, 18, 10, 11, 18, 25, 32, 23, 26, 29, 32, 19, 20, 11, 12, 19, 26, 33, 40, 27, 30, 33, 36, 21, 22, 12
Offset: 1

Views

Author

Keywords

Comments

In rows n through 2n-1, every integer >= n occurs exactly once.

Examples

			Top left corner is:
1 2 3 4 5
2 4 5 8 9
3 6 7 12 13
4 8 9 16 17
5 10 11 20 21
		

Crossrefs

Rows: A000027, A004754, A004755, A004756, A004757, A004758, A004759. Algebraically, A053645 would be row zero, minus A080079 would be row minus one. See also A053644.

Formula

T(n,1) = n; T(n,2k) = 2T(n,k); T(n,2k+1) = 2T(n,k) + 1. T(n,k) = k + (n-1) * 2^floor(log_2(k)) = k + (n-1)*A053644(k).