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.

A359259 a(n) is the least k such that A359194(k) = A032766(n).

Original entry on oeis.org

1, 0, 4, 9, 3, 8, 18, 7, 17, 6, 16, 37, 15, 36, 14, 35, 13, 34, 12, 33, 11, 32, 74, 31, 73, 30, 72, 29, 71, 28, 70, 27, 69, 26, 68, 25, 67, 24, 66, 23, 65, 22, 64, 149, 63, 148, 62, 147, 61, 146, 60, 145, 59, 144, 58, 143, 57, 142, 56, 141, 55, 140, 54, 139
Offset: 0

Views

Author

Rémy Sigrist, Dec 23 2022

Keywords

Comments

The binary expansion of numbers m such that A359194(m) = A032766(n):
- starts with zero or more occurrences of "10",
- followed by a "0" when the binary expansion of a(n) starts with zero or more occurrences of "10" followed by "11",
- ends with the binary expansion of a(n) (assuming that 0 has an empty binary expansion).

Examples

			The first terms, alongside the binary expansions of A032766(n) and a(n), are:
  n   a(n)  bin(A032766(n))  bin(a(n))
  --  ----  ---------------  ---------
   0     1                0          1
   1     0                1          0
   2     4               11        100
   3     9              100       1001
   4     3              110         11
   5     8              111       1000
   6    18             1001      10010
   7     7             1010        111
   8    17             1100      10001
   9     6             1101        110
  10    16             1111      10000
  11    37            10000     100101
		

Crossrefs

Programs

  • PARI
    a(n) = { if (n<=1, return (1-n), n+=n\2; for (x=2+exponent(n), oo, my (k=bitneg(n,x)); if (k%3==0, return (k/3)))) }