OFFSET
0,1
LINKS
Robert Israel, Table of n, a(n) for n = 0..3318
FORMULA
MAPLE
f:= proc(n) local L, i;
L:= subs([2=1, 1=2], convert(2^n, base, 10));
add(L[i]*10^(i-1), i=1..nops(L))
end proc:
map(f, [$0..50]); # Robert Israel, Feb 12 2019
PROG
(Python)
def A306392(n):
return int(''.join('1' if d == '2' else ('2' if d == '1' else d) for d in str(2**n))) # Chai Wah Wu, Feb 12 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paul Curtz and N. J. A. Sloane, Feb 12 2019
STATUS
approved