cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A341709 #28 Mar 23 2021 10:41:45
%S A341709 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 A341709 71,72,73,74,75,76,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,84,
%U A341709 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 A341709 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 A341709 Suggest by Eric Angelini's yranib sequence A341707.
%H A341709 Chai Wah Wu, <a href="/A341709/b341709.txt">Table of n, a(n) for n = 0..10000</a>
%H A341709 N. J. A. Sloane, <a href="https://www.youtube.com/watch?v=9ogbsh8KuEM">Exciting Number Sequences</a> (video of talk), Mar 05 2021.
%e A341709 17 = 16+1 becomes 1+61 = 62 = a(17).
%p A341709 revbin:= n-> (s-> parse(cat(s[-i]$i=1..length(s))))(""||(2^n)): # A004094
%p A341709 f:=proc(n)  local t1,i;
%p A341709   t1:=convert(n,base,2);
%p A341709   add(t1[i]*revbin(i-1),i=1..nops(t1));
%p A341709 end:
%p A341709 seq(f(n), n=0..72);
%o A341709 (Python)
%o A341709 def A341709(n):
%o A341709     m, c = 1, 0
%o A341709     while n > 0:
%o A341709         n, b = divmod(n,2)
%o A341709         c += b*int(str(m)[::-1])
%o A341709         m *= 2
%o A341709     return c # _Chai Wah Wu_, Feb 18 2021
%Y A341709 Cf. A004094, A341707.
%K A341709 nonn,base
%O A341709 0,3
%A A341709 _N. J. A. Sloane_, Feb 18 2021