OFFSET
1,2
COMMENTS
What is the asymptotic distribution of these numbers?
All elements from 7 onward seem to be either 1 or 7 modulo 12. - Walter Kehowski, Oct 08 2005
The initial 3 terms force all subsequent terms to be congruent to 1 modulo 6. - Charlie Neder, Oct 07 2018
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
EXAMPLE
5 is congruent to 2 (mod 3), so 5 cannot be in the sequence. 25 mod 2 (resp. 3, 7, 13, 19) gives 1 (resp. 1, 4, 12, 6), which is not in the sequence.
MAPLE
M:=[0, 2]: for z to 1 do for n from 3 to 5000 do b:=true; for j from 1 to nops(M)-1 do for k from j+1 to nops(M) do if M[j] = n mod M[k] then b:=false; break; fi od od; if b then M:=[op(M), n] fi; od; od; M; # Walter Kehowski, Oct 08 2005
MATHEMATICA
a[1] = 0; a[2] = 2; a[n_] := a[n] = Block[{k = a[n - 1] + 1, t = a[ # ] & /@ Range[n - 1]}, While[ Intersection[t, Union[ Mod[k, Rest[ t]]]] != {}, k++ ]; k]; Table[ a[n], {n, 50}] (* Robert G. Wilson v, Oct 19 2005 *)
CROSSREFS
KEYWORD
easy,nonn,nice
AUTHOR
H. Tracy Hall (hthall(AT)math.berkeley.edu)
EXTENSIONS
More terms from Walter Kehowski, Oct 08 2005
STATUS
approved