login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A341746 If the runs in the binary expansion of n are (r_1, ..., r_k), then the runs in the binary expansion of a(n) are (r_1 + ... + r_k, r_1, ..., r_{k-1}). 2

%I #14 Feb 19 2021 12:05:56

%S 1,6,3,14,29,28,7,30,123,122,61,60,121,120,15,62,503,502,251,250,501,

%T 500,125,124,499,498,249,248,497,496,31,126,2031,2030,1015,1014,2029,

%U 2028,507,506,2027,2026,1013,1012,2025,2024,253,252,2023,2022,1011,1010

%N If the runs in the binary expansion of n are (r_1, ..., r_k), then the runs in the binary expansion of a(n) are (r_1 + ... + r_k, r_1, ..., r_{k-1}).

%C This sequence is related to A341694 (see Formula section).

%C All terms are distinct.

%C If a(n) > n, then a(n) does not appear in A341699.

%H Rémy Sigrist, <a href="/A341746/b341746.txt">Table of n, a(n) for n = 1..8192</a>

%H Rémy Sigrist, <a href="/A341746/a341746.png">Binary plot of the first 255 terms</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F A341694(a(n), k) = A341694(n, k+1).

%F a(n) = n iff n belongs to A126646.

%F A090996(a(n)) = A070939(n).

%F A090996(a(n)) > A070939(a(n)) / 2.

%F A005811(a(n)) = A005811(n).

%e The first terms, in decimal and in binary, are:

%e n a(n) bin(n) bin(a(n))

%e -- ---- ------ ---------

%e 1 1 1 1

%e 2 6 10 110

%e 3 3 11 11

%e 4 14 100 1110

%e 5 29 101 11101

%e 6 28 110 11100

%e 7 7 111 111

%e 8 30 1000 11110

%e 9 123 1001 1111011

%e 10 122 1010 1111010

%e 11 61 1011 111101

%e 12 60 1100 111100

%e 13 121 1101 1111001

%e 14 120 1110 1111000

%e 15 15 1111 1111

%o (PARI) toruns(n) = { my (r=[]); while (n, my (v=valuation(n+n%2, 2)); n\=2^v; r=concat(v, r)); r }

%o fromruns(r) = { my (v=0); for (k=1, #r, v=(v+k%2)*2^r[k]-k%2); v }

%o a(n) = { my (r=toruns(n)); fromruns(concat(vecsum(r), r[1..#r-1])) }

%Y Cf. A005811, A070939, A090996, A126646, A341694, A341699.

%K nonn,base

%O 1,2

%A _Rémy Sigrist_, Feb 18 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 02:25 EDT 2024. Contains 371782 sequences. (Running on oeis4.)