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.

Showing 1-2 of 2 results.

A081431 RevBinary(RevDecimal(n)), where RevBinary(m) is the binary reversal of m (A030101) and RevDecimal(m) is the decimal reversal of m (A004086).

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 3, 7, 1, 9, 1, 13, 21, 31, 37, 51, 47, 113, 69, 109, 1, 3, 13, 1, 21, 11, 31, 9, 37, 29, 3, 11, 29, 33, 53, 43, 63, 73, 101, 93, 1, 7, 3, 17, 13, 27, 1, 41, 21, 61, 5, 15, 19, 49, 45, 59, 65, 105, 85, 125, 3, 1, 11, 9, 29, 7, 33, 25, 53, 3, 7, 17, 27, 41
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 20 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Table[IntegerReverse[IntegerReverse[n],2],{n,0,80}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 03 2018 *)
  • PARI
    a(n) = fromdigits(Vecrev(binary(fromdigits(Vecrev(digits(n))))), 2); \\ Michel Marcus, Jan 30 2023
  • Python
    def a(n): return int(bin(int(str(n)[::-1]))[:1:-1], 2)
    print([a(n) for n in range(74)]) # Michael S. Branicky, Jan 30 2023
    

Formula

a(n) = A030101(A004086(n)). - Michel Marcus, Jan 30 2023

A081433 Numbers n such that RevBinary(RevDecimal(n))=RevDecimal(RevBinary(n)), where RevDecimal(n) is the decimal reversal of n (A004086) and RevBinary(n) is the binary reversal of n (A030101).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 33, 51, 66, 99, 165, 313, 516, 535, 561, 585, 615, 626, 717, 759, 858, 929, 957, 1241, 1421, 2112, 2482, 2552, 2842, 3579, 4224, 5485, 5845, 6336, 7447, 8448, 9009, 9753, 11051, 12631, 13621, 15011, 15351, 15375
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 20 2003

Keywords

Comments

A030101(A004086(a(n)))=A004086(A030101(a(n))), A081431(a(n))=A081432(a(n)).

Crossrefs

Programs

  • Python
    def ok(n): return int(bin(int(str(n)[::-1]))[:1:-1], 2) == int(str(int(bin(n)[:1:-1], 2))[::-1])
    print([k for k in range(2**14) if ok(k)]) # Michael S. Branicky, Jan 30 2023
Showing 1-2 of 2 results.