OFFSET
1,5
COMMENTS
This sequence is nonnegative: in any group of numbers with the same number of digits, the number with a 1 in a particular position always occurs before the number with a 2 in that position. In fact, 0's only occur on the last digits of (3^N)-1, where N is an integer, not the sequence index - Larry Reeves (larryr(AT)acm.org), Sep 25 2000
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
PROG
(Haskell)
a030340 n = a030340_list !! (n-1)
a030340_list = scanl1
(\u v -> u + fromEnum (v == 1) - fromEnum (v == 2)) a003137_list
-- Reinhard Zumkeller, Feb 21 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Sep 25 2000
Some data corrected by Reinhard Zumkeller, Feb 21 2013
STATUS
approved