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!)
A342698 For any number n with binary expansion (b(1), b(2), ..., b(k)), the binary expansion of a(n) is (floor((b(k)+b(1)+b(2))/2), floor((b(1)+b(2)+b(3))/2), ..., floor((b(k-1)+b(k)+b(1))/2)). 4

%I #12 Jan 10 2024 16:31:22

%S 0,1,1,3,0,7,7,7,0,9,5,15,12,15,15,15,0,17,1,19,8,27,15,31,24,25,29,

%T 31,28,31,31,31,0,33,1,35,0,35,7,39,16,49,21,55,28,63,31,63,48,49,49,

%U 51,56,59,63,63,56,57,61,63,60,63,63,63,0,65,1,67,0,67,7

%N For any number n with binary expansion (b(1), b(2), ..., b(k)), the binary expansion of a(n) is (floor((b(k)+b(1)+b(2))/2), floor((b(1)+b(2)+b(3))/2), ..., floor((b(k-1)+b(k)+b(1))/2)).

%C This sequence is a variant of A342697; here we deal with bit triples in a "cyclic" binary representation of n.

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

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

%F a(n) + A342700(n) = A003817(n).

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

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

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

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

%e 0 0 0 0

%e 1 1 1 1

%e 2 1 10 1

%e 3 3 11 11

%e 4 0 100 0

%e 5 7 101 111

%e 6 7 110 111

%e 7 7 111 111

%e 8 0 1000 0

%e 9 9 1001 1001

%e 10 5 1010 101

%e 11 15 1011 1111

%e 12 12 1100 1100

%e 13 15 1101 1111

%e 14 15 1110 1111

%e 15 15 1111 1111

%o (PARI) a(n) = my (w=#binary(n)); sum(k=0, w-1, ((bittest(n, (k-1)%w)+bittest(n, k%w)+bittest(n, (k+1)%w))>=2) * 2^k)

%Y Cf. A003817, A342697, A342699 (fixed points), A342700.

%K nonn,base

%O 0,4

%A _Rémy Sigrist_, Mar 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 25 06:14 EDT 2024. Contains 371964 sequences. (Running on oeis4.)