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.

A333777 Inverse permutation to A333776.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Apr 05 2020

Keywords

Examples

			A333776(90) = 106, hence a(106) = 96.
		

Crossrefs

Cf. A333776.

Programs

  • PARI
    a(n, base=2) = { my (d=Vecrev(digits(n, base)), v=0); forstep (k=#d, 1, -1, v += d[k]*base^(k-1); if (d[k], d=Vecrev(d[1..k-1]))); v }