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-4 of 4 results.

A361645 a(n) is the least k such that n appears in the k-th row of triangle A361644.

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 5, 4, 8, 9, 10, 10, 10, 10, 9, 8, 16, 17, 18, 18, 20, 21, 21, 20, 20, 21, 21, 20, 18, 18, 17, 16, 32, 33, 34, 34, 36, 37, 37, 36, 40, 41, 42, 42, 42, 42, 41, 40, 40, 41, 42, 42, 42, 42, 41, 40, 36, 37, 37, 36, 34, 34, 33, 32, 64, 65, 66, 66
Offset: 0

Views

Author

Rémy Sigrist, Mar 19 2023

Keywords

Comments

All terms are fibbinary numbers (A003714).
To compute a(n): consider the run lengths in the binary expansion of n (i.e. the n-th row of A101211) and replace from left to right each value v > 1 at odd index with (1, v-1); at the end, there remain the run lengths in the binary expansion of a(n).
See A361676 for the greatest k's.

Examples

			The first terms, in decimal and in binary, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     1       1          1
   2     2      10         10
   3     2      11         10
   4     4     100        100
   5     5     101        101
   6     5     110        101
   7     4     111        100
   8     8    1000       1000
   9     9    1001       1001
  10    10    1010       1010
  11    10    1011       1010
  12    10    1100       1010
  13    10    1101       1010
  14     9    1110       1001
  15     8    1111       1000
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) <= n with equality iff n is a fibbinary number (A003714).
a(n) <= A361676(n) with equality iff n belongs to A000975.

A361676 a(n) is the greatest k such that n appears in the k-th row of triangle A361644.

Original entry on oeis.org

0, 1, 2, 3, 5, 5, 6, 7, 11, 10, 10, 11, 13, 13, 14, 15, 23, 22, 21, 21, 21, 21, 22, 23, 27, 26, 26, 27, 29, 29, 30, 31, 47, 46, 45, 45, 43, 42, 42, 43, 43, 42, 42, 43, 45, 45, 46, 47, 55, 54, 53, 53, 53, 53, 54, 55, 59, 58, 58, 59, 61, 61, 62, 63, 95, 94, 93
Offset: 0

Views

Author

Rémy Sigrist, Mar 20 2023

Keywords

Comments

All terms belong to A003754.
To compute a(n): consider the run lengths in the binary expansion of n (i.e. the n-th row of A101211) and replace from left to right each value v > 1 at even index with (1, v-1); at the end, there remain the run lengths in the binary expansion of a(n).
See A361645 for the least k's.

Examples

			The first terms, in decimal and in binary, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     1       1          1
   2     2      10         10
   3     3      11         11
   4     5     100        101
   5     5     101        101
   6     6     110        110
   7     7     111        111
   8    11    1000       1011
   9    10    1001       1010
  10    10    1010       1010
  11    11    1011       1011
  12    13    1100       1101
  13    13    1101       1101
  14    14    1110       1110
  15    15    1111       1111
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) >= n with equality iff n belongs to A003754.
a(n) >= A361645(n) with equality iff n belongs to A000975.

A361646 Distinct values of A361644, in order of appearance.

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 5, 6, 8, 15, 9, 14, 10, 11, 12, 13, 16, 31, 17, 30, 18, 19, 28, 29, 20, 23, 24, 27, 21, 22, 25, 26, 32, 63, 33, 62, 34, 35, 60, 61, 36, 39, 56, 59, 37, 38, 57, 58, 40, 47, 48, 55, 41, 46, 49, 54, 42, 43, 44, 45, 50, 51, 52, 53, 64, 127, 65
Offset: 0

Views

Author

Rémy Sigrist, Mar 19 2023

Keywords

Comments

This sequence is a permutation of the nonnegative integers with inverse A361647 (and the offset equals 0 on purpose).

Crossrefs

Cf. A361644, A361647 (inverse).

Programs

  • PARI
    See Links section.

Formula

a(n) < 2^k iff n < 2^k.

A361674 Irregular triangle T(n, k), n >= 0, k = 1..2^A092339(n), read by rows; the n-th row lists the numbers k such that n appears in the k-th row of A361644.

Original entry on oeis.org

0, 1, 2, 2, 3, 4, 5, 5, 5, 6, 4, 5, 6, 7, 8, 9, 10, 11, 9, 10, 10, 10, 11, 10, 11, 12, 13, 10, 13, 9, 10, 13, 14, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 17, 18, 21, 22, 18, 21, 18, 19, 20, 21, 20, 21, 21, 21, 22, 20, 21, 22, 23, 20, 21, 22, 23, 24, 25, 26, 27
Offset: 0

Views

Author

Rémy Sigrist, Mar 20 2023

Keywords

Comments

In other words, the n-th row contains the numbers k with the same binary length as n and for any i >= 0, if the i-th bit and the (i+1)-th bit in n are different then they are also different in k (i = 0 corresponding to the least significant bit).

Examples

			Triangle T(n, k) begins (in decimal and in binary):
  n   n-th row        bin(n)  n-th row in binary
  --  --------------  ------  ----------------------
   0  0                    0  0
   1  1                    1  1
   2  2                   10  10
   3  2, 3                11  10, 11
   4  4, 5               100  100, 101
   5  5                  101  101
   6  5, 6               110  101, 110
   7  4, 5, 6, 7         111  100, 101, 110, 111
   8  8, 9, 10, 11      1000  1000, 1001, 1010, 1011
   9  9, 10             1001  1001, 1010
  10  10                1010  1010
  11  10, 11            1011  1010, 1011
  12  10, 11, 12, 13    1100  1010, 1011, 1100, 1101
  13  10, 13            1101  1010, 1101
  14  9, 10, 13, 14     1110  1001, 1010, 1101, 1110
		

Crossrefs

Programs

  • PARI
    row(n) = { my (r = [n], m); for (e = 1, exponent(n), if (bittest(n, e-1)==bittest(n, e), m = 2^e-1; r = concat(r, [bitxor(v, m) | v <- r]););); vecsort(r); }

Formula

T(n, 1) = A361645(n).
T(n, 2^A092339(n)) = A361676(n).
Showing 1-4 of 4 results.