login
A103166
a(n) = reverse(2^n) mod 2^n.
1
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,4
COMMENTS
Remainder if (2^n written backwards) is divided by 2^n.
EXAMPLE
a(4) = reverse(2^4) mod 2^4 = reverse(16) mod 16 = 61 mod 16 = 13.
MATHEMATICA
Table[Mod[FromDigits[Reverse[IntegerDigits[2^n]]], 2^n], {n, 1, 256}]
PROG
(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
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Labos Elemer, Jan 28 2005
STATUS
approved