login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Write n as a sum of powers of 2 then replace each power of 2 in the sum by its decimal reversal A004094(n).
3

%I #28 Mar 23 2021 10:41:45

%S 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,61,62,63,64,65,66,67,68,69,70,

%T 71,72,73,74,75,76,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,84,

%U 85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,46,47,48,49,50,51,52,53,54

%N Write n as a sum of powers of 2 then replace each power of 2 in the sum by its decimal reversal A004094(n).

%C Suggest by Eric Angelini's yranib sequence A341707.

%H Chai Wah Wu, <a href="/A341709/b341709.txt">Table of n, a(n) for n = 0..10000</a>

%H N. J. A. Sloane, <a href="https://www.youtube.com/watch?v=9ogbsh8KuEM">Exciting Number Sequences</a> (video of talk), Mar 05 2021.

%e 17 = 16+1 becomes 1+61 = 62 = a(17).

%p revbin:= n-> (s-> parse(cat(s[-i]$i=1..length(s))))(""||(2^n)): # A004094

%p f:=proc(n) local t1,i;

%p t1:=convert(n,base,2);

%p add(t1[i]*revbin(i-1),i=1..nops(t1));

%p end:

%p seq(f(n), n=0..72);

%o (Python)

%o def A341709(n):

%o m, c = 1, 0

%o while n > 0:

%o n, b = divmod(n,2)

%o c += b*int(str(m)[::-1])

%o m *= 2

%o return c # _Chai Wah Wu_, Feb 18 2021

%Y Cf. A004094, A341707.

%K nonn,base

%O 0,3

%A _N. J. A. Sloane_, Feb 18 2021