|
|
A171073
|
|
Smallest positive integer a(n) not yet in the sequence and sharing no digit with n, (n-1) or (n+1) in its decimal representation.
|
|
1
|
|
|
3, 4, 1, 2, 7, 8, 5, 6, 22, 23, 9, 40, 50, 20, 27, 24, 25, 26, 33, 34, 35, 44, 10, 11, 13, 14, 15, 16, 17, 45, 46, 47, 18, 12, 19, 21, 29, 41, 51, 28, 36, 55, 56, 60, 30, 31, 32, 52, 37, 38, 39, 48, 61, 62, 70, 42, 43, 63, 71, 72, 49, 54, 57, 77, 73, 80, 53, 100, 111, 58, 59, 64, 65
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Sequence has 1234567 terms, ending with a(1234567) = 9990990999. - Michael S. Branicky, Apr 08 2023
|
|
LINKS
|
|
|
MATHEMATICA
|
f[s_List] := Block[{k = 1, len = Length@s}, id = Union@ Flatten[ IntegerDigits /@ {len, len + 1, len + 2}]; While[ MemberQ[s, k] || Intersection[id, IntegerDigits@k] != {}, k++ ]; Append[s, k]]; Nest[f, {}, 73] (* Robert G. Wilson v, Sep 25 2010 *)
|
|
PROG
|
(Python) # see linked program generating full sequence
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,fini
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|