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.

A103166 a(n) = reverse(2^n) mod 2^n.

Original entry on oeis.org

0, 0, 0, 13, 23, 46, 53, 140, 215, 105, 210, 2808, 2918, 15593, 21187, 63556, 7987, 179118, 358137, 466945, 420750, 4034914, 8068838, 10946113, 23445533, 46880176, 22406063, 117663950, 219078635, 1060248229, 2021396468, 2632727628, 2954399858, 13837158803
Offset: 1

Views

Author

Labos Elemer, Jan 28 2005

Keywords

Comments

Remainder if (2^n written backwards) is divided by 2^n.

Examples

			a(4) = reverse(2^4) mod 2^4 = reverse(16) mod 16 = 61 mod 16 = 13.
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[FromDigits[Reverse[IntegerDigits[2^n]]], 2^n], {n, 1, 256}]
  • Python
    def a(n): t = 2**n; return int(str(t)[::-1])%t
    print([a(n) for n in range(1, 35)]) # Michael S. Branicky, Dec 12 2021