login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245281 a(1)=2; for n > 1, a(n) is the least positive integer not occurring earlier that shares a digit and a factor with a(n-1). 1
2, 12, 10, 14, 4, 24, 20, 22, 26, 6, 16, 18, 8, 28, 21, 15, 5, 25, 35, 30, 3, 33, 36, 32, 34, 38, 48, 40, 42, 27, 57, 45, 50, 52, 54, 44, 46, 56, 58, 68, 60, 62, 64, 66, 63, 39, 9, 69, 90, 70, 7, 77, 147, 49, 84, 74, 37, 333, 93, 31, 124, 72, 75, 51, 17, 102 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Is this a permutation of the integers >= 2? # Robert Israel, Sep 07 2014
LINKS
EXAMPLE
a(16)=15 because GCD(a(16),a(15)) = GCD(15,21) = 3 and 1 is the common digit of 15 and 16.
MAPLE
S:= {2}:
A[1]:= 2:
L[1]:= {2}:
for n from 2 to 1000 do
k:= 0;
mS:= max(S);
Sp:= {$2..mS} minus S;
do
if Sp <> {} then
k:= min(Sp);
Sp:= Sp minus {k};
elif k < mS then k:= mS+1
else k:= k+1
fi;
if member(k, S) or igcd(k, A[n-1]) = 1 then next fi;
Lk:= convert(convert(k, base, 10), set);
if Lk intersect L[n-1] <> {} then
A[n]:= k;
L[n]:= Lk;
S:= S union {k};
break
fi
od:
od:
seq(A[n], n=1..1000); # Robert Israel, Sep 07 2014
MATHEMATICA
f[s_List]:=Block[{m=s[[-1]], k=2}, While[MemberQ[s, k]||Intersection[IntegerDigits[k], IntegerDigits[m]]=={}||GCD[m, k]==1, k++]; Append[s, k]]; Nest[f, {2}, 71]
CROSSREFS
Sequence in context: A216349 A280015 A343645 * A358505 A308215 A216478
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Sep 06 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)