OFFSET
1
COMMENTS
The binary representations of A011545 are 3 = 11_2, 31 = 11111_2, 314 = 100111010_2, 3141 = 110001000101_2, ..., and these binary digits are read left to right and added to the table.
EXAMPLE
3 is 2 + 1 = 2^0 + 2^1, the first 2 bits, so the sequence starts 1,1.
31 is 16 + 8 + 4 + 2 + 1 = 2^0 + 2^1 + 2^2 + 2^3 + 2^4, the first 5 bits, adding 1,1,1,1,1.
314 is 256 + 32 + 16 + 8 + 2 = 2^8 + 2^5 + 2^4 + 2^3 + 2^1 adding 1,0,0,1,1,1,0,1,0.
1,1;
1,1,1,1,1;
1,0,0,1,1,1,0,1,0;
1,1,0,0,0,1,0,0,0,1,0,1;
1,1,1,1,0,1,0,1,0,1,1,0,1,1,1;
1,0,0,1,1,0,0,1,0,1,1,0,0,1,0,1,1,1,1;
1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,0,0,0;
1,1,1,0,1,1,1,1,1,0,1,0,1,1,1,1,0,0,1,1,1,0,1,1,0;
PROG
(Python) mystr=''
with open('c:\\bA011545.txt') as myfile:
...mess = [line.rstrip('\n') for line in myfile]
for i5 in range(len(mess)):
...tp=mess[i5].split(' ')
...mystr=mystr+bin(int(tp[1]))
pre1=mystr.replace('0b', '')
pre2=pre1.replace('1', '1, ')
final=pre2.replace('0', '0, ')
print (final)
CROSSREFS
KEYWORD
easy,nonn,tabf,less
AUTHOR
Bill McEachen, Mar 03 2015
STATUS
approved