|
|
A056967
|
|
Write what is described (putting a leading zero on numbers which have an odd number of digits).
|
|
2
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999, 0, 11111, 22222, 33333, 44444, 55555, 66666, 77777, 88888
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,13
|
|
LINKS
|
|
|
EXAMPLE
|
a(123130415)=3335 since it should be read as 01.23.13.04.15, i.e., zero 1's followed by two 3's followed by one 3 followed by zero 4's followed by one 5.
|
|
PROG
|
(Python)
s = str(n)
s = '0'*(len(s)&1)+s
return int('0'+''.join(s[i+1]*int(s[i])for i in range(0, len(s), 2))) # Chai Wah Wu, Feb 12 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|