login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A103167
a(n) = 2^n mod reverse(2^n).
2
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,4
COMMENTS
Remainder if 2^n is divided by the reverse of 2^n.
LINKS
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