OFFSET
1,2
COMMENTS
Conjecture: a(n) is a permutation of the natural numbers.
The following table shows:
C = number of terms calculated
F = first term that is missing
C F F/C
1000 5 0.005
2000 50 0.025
5000 1650 0.330
10000 1650 0.165
20000 2475 0.124
50000 24750 0.495
100000 100000 1.000
200000 199800 0.999
500000 499500 0.999
which seems to support the conjecture.
LINKS
Lars Blomberg, Table of n, a(n) for n = 1..10000
EXAMPLE
1/6 = 0.1666... (1 and 6 are visible on the right-hand side)
6/13 = 0.461538461538... (6, 1 and 3 are visible)
13/10 = 1.30 (trailing zeros are included)
10/14 = 0.7142857142... (1, 0 and 4)
14/17 = 0.8235294117... (1, 4 and 7)
17/7 = 2.4285714285... (1 and 7)
7/8 = 0.875 (7 and 8)
...
MATHEMATICA
f[n_] := Block[{a = {1}, k}, Do[k = If[MissingQ@ #, Max@ a, #] &@ SelectFirst[Range@ Max@ a, ! MemberQ[a, #] &]; While[Or[! AllTrue[Join[IntegerDigits@ a[[i - 1]], IntegerDigits@ k], MemberQ[Union@ Flatten@ Prepend[First@ #, If[Last@ # <= 0, 0, Nothing]] &@ If[Depth@ First@ # < 3, Insert[#, 0, {1, 1}], #] &@ RealDigits[a[[i - 1]]/k], #] &], MemberQ[a, k]], k++]; AppendTo[a, k], {i, 2, n}]; a]; f@ 67 (* Version 10.2 *)
f[n_] := Block[{a = {1}, k}, Do[k = 1; While[Or[If[# == 1, False, True] &[Times @@ Boole[MemberQ[Union@ Flatten@ Prepend[First@ #, If[Last@ # <= 0, 0]] &@ If[Depth@ First@ # < 3, Insert[#, 0, {1, 1}], #] &@ RealDigits[a[[i - 1]]/k], #] & /@ Join[IntegerDigits@ a[[i - 1]], IntegerDigits@ k]]], MemberQ[a, k]], k++]; AppendTo[a, k], {i, 2, n}]; a]; f@ 67 (* Michael De Vlieger, Dec 16 2015, Version 6 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini, submitted by Lars Blomberg, Dec 15 2015
EXTENSIONS
Corrected values for n>=58 by Lars Blomberg, Dec 16 2015
STATUS
approved