OFFSET
1,2
COMMENTS
MATHEMATICA
L={0}; Do[k = IntegerDigits[ Last@ L][[1]]; While[ MemberQ[L, k], k+=10]; AppendTo[ L, k], {80}]; L (* Giovanni Resta, Sep 24 2019 *)
PROG
(PARI) isinv(vec, k) = for(t=1, #vec, if(vec[t]==k, return(1))); 0
isvalid(x, y) = my(d=digits(x), e=digits(y)); d[#d]==e[1]
terms(n) = my(v=[0, 10]); while(1, if(#v >= n, return(v)); for(k=1, oo, if(isvalid(k, v[#v]) && !isinv(v, k), v=concat(v, [k]); break)))
terms(100) \\ Print initial 100 terms
(Python)
n, a, msdc = 0, 0, [1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
while n <= 62:
print(n, a)
s = str(a)
msd = int(s[0])
n, a = n+1, msdc[msd]*10+msd
msdc[msd] = msdc[msd]+1 # A.H.M. Smeets, Sep 25 2019
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Felix Fröhlich, Sep 24 2019
STATUS
approved