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

A268717 Permutation of natural numbers: a(0) = 0, a(n) = A003188(1+A006068(n-1)), where A003188 is binary Gray code and A006068 is its inverse.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 12 2016

Keywords

Crossrefs

Inverse: A268718.
Row 1 and column 1 of array A268715 (without the initial zero).
Row 1 of array A268820.
Cf. A092246 (fixed points).
Cf. A268817 ("square" of this permutation).
Cf. A268821 ("shifted square"), A268823 ("shifted cube") and also A268825, A268827 and A268831 ("shifted higher powers").

Programs

Formula

a(n) = A003188(A066194(n)) = A003188(1+A006068(n-1)).
Other identities. For all n >= 0:
A101080(n,a(n+1)) = 1. [The Hamming distance between n and a(n+1) is always one.]
A268726(n) = A000523(A003987(n, a(n+1))). [A268726 gives the index of the toggled bit.]
From Alan Michael Gómez Calderón, May 29 2025: (Start)
a(2*n) = (2*n-1) XOR (2-A010060(n-1)) for n >= 1;
a(n) = (A268718(n-1)-1) XOR (A171977(n-1)+1) for n >= 2. (End)

A268818 Permutation of nonnegative integers: a(n) = A268718(A268718(n)).

Original entry on oeis.org

0, 1, 6, 4, 3, 10, 2, 7, 15, 5, 14, 11, 8, 13, 18, 16, 23, 29, 22, 19, 32, 21, 9, 24, 12, 25, 30, 28, 27, 34, 26, 31, 39, 45, 38, 35, 48, 37, 57, 40, 60, 41, 46, 44, 43, 17, 42, 47, 20, 49, 54, 52, 51, 58, 50, 55, 63, 53, 62, 59, 56, 61, 66, 64, 71, 77, 70, 67, 80, 69, 89, 72, 92, 73, 78, 76, 75, 113, 74, 79, 116, 81
Offset: 0

Views

Author

Antti Karttunen, Feb 14 2016

Keywords

Crossrefs

Inverse: A268817.
Cf. A268718.
Cf. also A268822.

Programs

  • Python
    def a003188(n): return n^(n>>1)
    def a006068(n):
        s=1
        while True:
            ns=n>>s
            if ns==0: break
            n=n^ns
            s<<=1
        return n
    def a278618(n): return 0 if n==0 else 1 + a003188(a006068(n) - 1)
    def a(n): return a278618(a278618(n)) # Indranil Ghosh, Jun 07 2017
  • Scheme
    (define (A268818 n) (A268718 (A268718 n)))
    

Formula

a(n) = A268718(A268718(n)).
Showing 1-2 of 2 results.