login
Numbers written in an alternating binary-then-quaternary base.
1

%I #16 Jan 14 2014 00:25:51

%S 1,10,11,20,21,30,31,100,101,110,111,120,121,130,131,1000,1001,1010,

%T 1011,1020,1021,1030,1031,1100,1101,1110,1111,1120,1121,1130,1131,

%U 2000,2001,2010,2011,2020,2021,2030,2031,2100

%N Numbers written in an alternating binary-then-quaternary base.

%C Mixed-radix number representation produced by a serial counter with generating sequence (1, 3, 1, 3, ...) = A010684.

%C Places reading from the right have values (1, 2, 8, 16, 64, 128, ...) = unsigned A094014.

%C Conjecture: This sequence interpreted as quaternary (base 4) numbers gives A126001 (hence a simplified scheme for computing that sequence).

%H Jeremy Gardiner, <a href="/A235202/b235202.txt">Table of n, a(n) for n = 1..1024</a>

%e a(15) = 131 since 15 = 1*1+3*2+1*8.

%o (Chipmunk BASIC) # see www.nicholson.com/rhn/basic/

%o do : rem serial counter

%o z=z+1

%o if z>1 then z=0 : y=y+1

%o if y>3 then y=0 : x=x+1

%o if x>1 then x=0 : w=w+1

%o if w>3 then print : end

%o s$=str$(w)+str$(x)+str$(y)+str$(z)

%o c=val(s$) : rem strip leading zeros

%o print str$(c)+", ";

%o loop

%Y Cf. A109827 (Numbers written in an alternating binary-then-ternary base).

%K nonn,base

%O 1,2

%A _Jeremy Gardiner_, Jan 04 2014