OFFSET
1,4
COMMENTS
Remainder if 2^n is divided by the reverse of 2^n.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(5) = 2^5 mod reverse(2^5) = 32 mod reverse(32) = 32 mod 23 = 9.
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 *)
PROG
(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
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Labos Elemer, Jan 28 2005
STATUS
approved