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.

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

Original entry on oeis.org

0, 0, 0, 16, 9, 18, 128, 256, 82, 1024, 2048, 4096, 2356, 16384, 32768, 1980, 131072, 262144, 524288, 1048576, 2097152, 159390, 319770, 16777216, 10108899, 20228688, 134217728, 268435456, 98713642, 1073741824, 2147483648, 4294967296, 2681134876, 17179869184
Offset: 1

Views

Author

Labos Elemer, Jan 28 2005

Keywords

Comments

Remainder if 2^n is divided by the reverse of 2^n.

Examples

			a(5) = 2^5 mod reverse(2^5) = 32 mod reverse(32) = 32 mod 23 = 9.
		

Crossrefs

Programs

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