Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Search: a265756 -id:a265756
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(1)=1; a(n+1) is the smallest positive integer not yet used such that all the digits of a(n) and a(n+1) are present in the decimal expansion (including any leading and trailing zeros) of a(n)/a(n+1).
+10
3
1, 6, 13, 10, 14, 17, 7, 8, 19, 23, 21, 29, 34, 31, 3, 38, 28, 46, 47, 35, 39, 49, 43, 51, 42, 41, 48, 53, 26, 12, 57, 58, 59, 2, 61, 24, 68, 11, 52, 63, 22, 69, 62, 71, 56, 65, 76, 81, 44, 67, 64, 83, 85, 78, 77, 79, 72, 70, 80, 87, 84, 86, 89, 9, 91, 92, 73
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
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
See A265756 for another version.
See also A257664.
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
a(1)=1; a(n) is the first integer > a(n-1) with which, in the a(n-1)/a(n) decimal expansion, n is present.
+10
1
1, 4, 11, 13, 14, 17, 19, 22, 23, 29, 34, 47, 58, 61, 65, 87, 89, 93, 94, 97, 102, 103, 105, 109, 113, 115, 116, 118, 121, 130, 131, 136, 139, 141, 149, 152, 157, 159, 161, 166, 167, 169, 174, 177, 179, 181, 184, 188, 191, 193, 194, 197, 199, 203, 218, 223, 224
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
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

Search completed in 0.007 seconds