login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A342123 a(n) is the remainder when n is divided by its binary reverse. 3
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 2, 0, 0, 0, 0, 0, 19, 0, 0, 9, 23, 0, 6, 4, 0, 0, 6, 0, 0, 0, 0, 0, 35, 0, 37, 13, 39, 0, 4, 0, 43, 5, 0, 17, 47, 0, 14, 12, 0, 8, 10, 0, 55, 0, 18, 12, 4, 0, 14, 0, 0, 0, 0, 0, 67, 0, 69, 21, 71, 0, 0, 33, 75, 1, 77, 21 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,11

COMMENTS

The binary reverse of a number is given by A030101.

This sequence is the analog of A071955 for the binary base.

LINKS

Rémy Sigrist, Table of n, a(n) for n = 1..8192

Index entries for sequences related to binary expansion of n

FORMULA

a(n) = n mod A030101(n).

a(n) <= n with equality iff n belongs to A161601.

a(n) = 0 iff n belongs to A057890.

EXAMPLE

For n = 43,

- the binary reverse of 43 ("101011" in binary) is 53 ("110101" in binary),

- so a(43) = 43 mod 53 = 43.

PROG

(PARI) a(n, base=2) = { my (r=fromdigits(Vecrev(digits(n, base)), base)); n%r }

(Python)

def A342123(n): return n % int(bin(n)[:1:-1], 2) if n > 0 else 0 # Chai Wah Wu, Mar 01 2021

CROSSREFS

Cf. A030101, A057890, A071955, A161601, A342121, A342122.

Sequence in context: A138066 A173189 A115595 * A187553 A003621 A338827

Adjacent sequences:  A342120 A342121 A342122 * A342124 A342125 A342127

KEYWORD

nonn,base,look,easy

AUTHOR

Rémy Sigrist, Feb 28 2021

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 17 21:53 EDT 2021. Contains 343071 sequences. (Running on oeis4.)