[go: up one dir, main page]

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!)
A341798 a(n) is the starting position of the first occurrence of the binary reversal of n in the binary Champernowne word (A030190). 1

%I #15 Oct 07 2022 09:09:48

%S 0,1,0,1,7,2,0,4,19,6,8,1,23,2,3,15,51,18,21,5,7,26,0,11,56,22,8,1,66,

%T 2,14,46,131,50,54,17,20,63,58,4,143,6,27,25,23,77,10,41,137,55,21,34,

%U 7,28,0,11,149,65,8,1,173,13,45,125,323,130,135,49,53

%N a(n) is the starting position of the first occurrence of the binary reversal of n in the binary Champernowne word (A030190).

%C This sequence is a variant of A030304.

%C When considering the binary reversal of a positive number, the trailing zeros in that number turn into leading zeros in its binary reversal; we keep those leading zeros.

%H Rémy Sigrist, <a href="/A341798/b341798.txt">Table of n, a(n) for n = 0..8192</a>

%H Rémy Sigrist, <a href="/A341798/a341798.pl.txt">Perl program for A341798</a>

%F a(n) = A030304(n) iff n is a binary palindrome (A006995).

%e For n = 4:

%e - the binary reversal of 4 is "001",

%e - the binary Champernowne word begins "0110111001011...",

%e - the first occurrence of "001" in this word starts at position 7,

%e - so a(4) = 7.

%o (Perl) See Links section.

%o (Python)

%o from itertools import count, islice

%o def agen():

%o k, chap = 0, "0"

%o for n in count(0):

%o target = bin(n)[2:][::-1]

%o while chap.find(target) == -1: k += 1; chap += bin(k)[2:]

%o yield chap.find(target)

%o print(list(islice(agen(), 70))) # _Michael S. Branicky_, Oct 06 2022

%Y Cf. A006995, A030101, A030190, A030304.

%K nonn,base

%O 0,5

%A _Rémy Sigrist_, Feb 20 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 August 29 09:16 EDT 2024. Contains 375511 sequences. (Running on oeis4.)