OFFSET
1,2
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Benoit Cloitre, N. J. A. Sloane and Matthew J. Vandermast, Numerical analogues of Aronson's sequence, J. Integer Seqs., Vol. 6 (2003), #03.2.2. See also arXiv:math/0305308 [math.NT], 2003.
EXAMPLE
a(3) cannot be 3 because that would imply that the third term is not a multiple of 3. 4 is the smallest possible value for a(3) that creates no contradiction; therefore a(3)=4 and the fourth term is the next member of the sequence that is not a multiple of 3 or 4.
MATHEMATICA
Block[{c, k, nn, s}, nn = 2^16; c[_] := False; k = 1; c[1] = True; s = {0, 3, 4, 6, 8, 9}; {1}~Join~Reap[Do[k++; Which[c[n], While[MemberQ[s, Mod[k, 12]], k++], k == n, If[MemberQ[s, Mod[k, 12]], k++], True, While[FreeQ[s, Mod[k, 12]], k++] ]; Sow[k]; c[k] = True, {n, 2, nn}] ][[-1, 1]] ] (* Michael De Vlieger, Aug 10 2025 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Matthew Vandermast, Feb 14 2003
EXTENSIONS
a(42) onward corrected by Sean A. Irvine, Aug 10 2025
STATUS
approved
