OFFSET
1,2
EXAMPLE
Illustration of initial values:
. n | a(n) ... and n-1 proper substrings
. ----+----------------------------------------------------
. 1 | 0
. 2 | 11 1
. 3 | 10 1 0
. 4 | 100 10 1 0
. 5 | 102 10 2 1 0
. 6 | 120 20 12 2 1 0
. 7 | 1012 101 12 10 2 1 0
. 8 | 1023 102 23 10 3 2 1 0
. 9 | 1120 120 112 20 12 11 2 1 0
. 10 | 1230 230 123 30 23 12 3 2 1 0
. 11 | 10123 1012 123 101 23 12 10 3 2 1 0
. 12 | 10234 1023 234 102 34 23 10 4 3 2 1 0
. 13 | 11203 1203 1120 203 120 112 20 12 11 3 2 1 0
. 14 | 11230 1230 1123 230 123 112 30 23 12 11 3 2 1 0
. 15 | 12340 2340 1234 340 234 123 40 34 23 12 4 3 2 1 0 .
PROG
(Haskell)
import Data.List (isInfixOf, elemIndex)
import Data.Maybe (fromJust)
a120005 = fromJust . (`elemIndex` a120004_list)
-- Reinhard Zumkeller, Jul 16 2012
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Jun 15 2006
EXTENSIONS
a(1) changed from 1 to 0 by Zak Seidov, May 30 2010.
STATUS
approved