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.

A330961 For any n >= 0: consider all pairs of numbers (x, y) whose binary representations can be interleaved (or shuffled) to produce the binary representation of n (possibly with leading zeros); a(n) is the least possible value of abs(x - y).

This page as a plain text file.
%I A330961 #7 Jan 05 2020 12:58:26
%S A330961 0,1,1,0,1,0,1,2,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,2,1,1,0,1,2,3,4,1,0,
%T A330961 0,1,0,1,1,0,0,1,1,0,1,0,1,2,0,1,1,0,1,0,0,1,2,1,0,1,0,1,1,0,1,0,0,1,
%U A330961 0,1,1,0,0,1,1,0,1,0,1,2,0,1,1,0,1,0,0
%N A330961 For any n >= 0: consider all pairs of numbers (x, y) whose binary representations can be interleaved (or shuffled) to produce the binary representation of n (possibly with leading zeros); a(n) is the least possible value of abs(x - y).
%H A330961 Rémy Sigrist, <a href="/A330961/a330961.txt">C program for A330961</a>
%H A330961 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%e A330961 For n = 5:
%e A330961 - the binary representation of 5 is "101",
%e A330961 - the possible values for (x, y), restricted to x >= y without loss of generality, are:
%e A330961   bin(5)   x  y  |x-y|
%e A330961   -------  -  -  -----
%e A330961   "101"    5  0      5
%e A330961   "1/01"   1  1      0
%e A330961   "10/1"   2  1      1
%e A330961   "1/0/1"  3  0      3
%e A330961 - hence a(5) = 0.
%o A330961 (C) See Links section.
%Y A330961 See A330925 for similar sequences.
%Y A330961 Cf. A327191.
%K A330961 nonn,base
%O A330961 0,8
%A A330961 _Rémy Sigrist_, Jan 04 2020