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.

A341335 For any number n with binary expansion (b_1, ..., b_k), the binary expansion of a(n), say (c_1, ..., c_k) satisfies c_m = Sum_{d | m} b_d mod 2 for m = 1..k.

This page as a plain text file.
%I A341335 #15 Apr 25 2021 15:12:57
%S A341335 0,1,3,2,7,6,5,4,15,14,13,12,10,11,8,9,31,30,29,28,27,26,25,24,21,20,
%T A341335 23,22,17,16,19,18,63,62,61,60,59,58,57,56,54,55,52,53,50,51,48,49,42,
%U A341335 43,40,41,46,47,44,45,35,34,33,32,39,38,37,36,127,126,125
%N A341335 For any number n with binary expansion (b_1, ..., b_k), the binary expansion of a(n), say (c_1, ..., c_k) satisfies c_m = Sum_{d | m} b_d mod 2 for m = 1..k.
%C A341335 This sequence is a permutation of the nonnegative integers with inverse A341336.
%C A341335 This sequence operates on binary expansions in the same way as the XOR-Moebius transform described in A295901.
%C A341335 This sequence has only two fixed points: a(0) = 0, a(1) = 1.
%H A341335 Rémy Sigrist, <a href="/A341335/b341335.txt">Table of n, a(n) for n = 0..8191</a>
%H A341335 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H A341335 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A341335 a(n) < 2^k for any n < 2^k.
%F A341335 a(floor(n/2)) = floor(a(n)/2).
%F A341335 a(2^k) = 2^(k+1) - 1 for any k >= 0.
%e A341335 For n = 42:
%e A341335 - the binary expansion of 42 is (1, 0, 1, 0, 1, 0),
%e A341335 - the binary expansion of a(42) has 6 digits:
%e A341335     - the 1st digit = 1                     mod 2 = 1,
%e A341335     - the 2nd digit = 1 + 0                 mod 2 = 1,
%e A341335     - the 3rd digit = 1     + 1             mod 2 = 0,
%e A341335     - the 4th digit = 1 + 0     + 0         mod 2 = 1,
%e A341335     - the 5th digit = 1             + 1     mod 2 = 0,
%e A341335     - the 6th digit = 1 + 0 + 1         + 0 mod 2 = 0,
%e A341335 - so the binary expansion of a(42) is "110100",
%e A341335 - and a(42) = 52.
%o A341335 (PARI) a(n) = { my (b=binary(n), c=vector(#b)); for (m=1, #b, fordiv (m, d, c[m]=(c[m] + b[d])%2)); fromdigits(c, 2) }
%Y A341335 Cf. A295901, A341336.
%K A341335 nonn,base
%O A341335 0,3
%A A341335 _Rémy Sigrist_, Apr 25 2021