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.

A341336 Inverse permutation to A341335.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Apr 25 2021

Keywords

Examples

			A341335(42) = 52, so a(52) = 42.
		

Crossrefs

Cf. A341335.

Programs

  • PARI
    a(n) = { my (c=binary(n), b=c); for (m=1, #b, fordiv (m, d, if (d
    				

A371974 For any positive integer n with binary expansion (b_1, ..., b_w) (where b_1 = 1), the binary expansion of a(n) is (c_1, ..., c_w) with c_k = (Sum_{i = 1 mod (w+1-k)} b_i) mod 2 for k = 1..w; a(0) = 0.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Apr 14 2024

Keywords

Comments

This sequence is a permutation of the nonnegative integers with inverse A371975.

Examples

			For n = 42: the binary expansion of 42 is "101010":
          b_1 b_2 b_3 b_4 b_5 b_6
           1   0   1   0   1   0
     c_1 = 1                      = 1 mod 2
     c_2 = 1                 + 0  = 1 mod 2
     c_3 = 1             + 1      = 0 mod 2
     c_4 = 1         + 0          = 1 mod 2
     c_5 = 1     + 1     + 1      = 1 mod 2
     c_6 = 1 + 0 + 1 + 0 + 1 + 0  = 1 mod 2
- so the binary expansion of a(42) is "110111", and a(42) = 55.
		

Crossrefs

See A341335 and A371976 for similar sequences.
Cf. A010060, A070939, A371975 (inverse).

Programs

  • PARI
    a(n) = { my (b = binary(n), c = vector(#b)); for (k = 1, #c, forstep (i = 1, #b, #b+1-k, c[k] += b[i];);); fromdigits(c % 2, 2); }

Formula

A070939(a(n)) = A070939(n).
a(n) mod 2 = A010060(n).
Showing 1-2 of 2 results.