OFFSET
1,2
COMMENTS
Let there be mines under prime numbers in the sequence of natural numbers (on the number line). A man starts from 1 and moves on the line to cover all composite numbers once. He can take a jump of length k only once for every k. He can jump to either side. He moves so that he gives priority to touch the smallest composite number not covered earlier.
Does every composite number get touched?
EXAMPLE
Beginning with 1 he takes a jump of 3 to touch 4 then a jump of 2 to touch 6, then a jump of 4 to touch 10 then a jump of 1 in the other direction to touch 9 and so on.
MATHEMATICA
f[s_] := Block[{k = 2, d = Abs[Most@s - Rest@s], l = Last@s}, While[ PrimeQ[k] || MemberQ[s, k] || MemberQ[d, Abs[l - k]], k++ ]; Append[s, k]]; Nest[f, {1}, 66] (* Robert G. Wilson v *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 08 2006
EXTENSIONS
Edited and corrected by Robert G. Wilson v, Jun 13 2006
STATUS
approved