OFFSET
1,2
COMMENTS
Two other sequences are possible without the a(n)>a(n-1) limitation, one with a(n) terms already used in the sequences (where the n growth does not allow data looping), another only with a(n) terms not yet used.
LINKS
Francesco Di Matteo, Table of n, a(n) for n = 1..1000
EXAMPLE
a(8) = 22 because a(7) = 19 and "8" does not appear in the digital expansion of 19/20 = 0.95 nor of 19/21 = 0.904761904761..., but it does appear in 19/22 = 0.86363...;
a(9) = 23 because 22/23 = 0.9565217391304..., where "9" does appear;
a(10) = 29 because "10" does not appear in the digital expansion of 23/k for k=24..28, but it does appear in 23/29 = 0.7931034...
MATHEMATICA
f[n_] := Block[{a = {1}, k}, Do[k = a[[m - 1]] + 1; While[SequenceCount[Flatten@ First@ RealDigits[a[[m - 1]]/k], IntegerDigits@ m] < 1, k++]; AppendTo[a, k], {m, 2, n}]; a]; f@ 57 (* Version 10.1, or *)
f[n_] := Block[{a = {1}, k}, Do[k = a[[m - 1]] + 1; While[StringCount[
ToString[FromDigits@ Flatten@ First@ RealDigits[a[[m - 1]]/k]], ToString@ m] < 1, k++]; AppendTo[a, k], {m, 2, n}]; a]; f@ 57 (* Michael De Vlieger, Dec 30 2015, Version 5.1 *)
PROG
(Python)
alfa = 1
for n in range(2, 101):
beta = alfa
aflag = 0
while aflag == 0:
beta = beta + 1
restlist = []
result = ""
dividend = alfa
lenn = len(str(n))
bflag = 0
while bflag < lenn:
dividend = dividend * 10
q = dividend/beta
resto = dividend - (q * beta)
if resto == 0:
bflag = lenn
if resto in restlist:
bflag = bflag + 1
restlist.append(resto)
dividend = resto
result = result + str(q)
if str(n) in result:
bflag = lenn
aflag = 1
print alfa
alfa = beta
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Francesco Di Matteo, Dec 26 2015
STATUS
approved