login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A117622 Minesweeper sequence: a(n) is the first nonprime number, k, not occurring previously in the sequence nor the absolute value of its first forward difference among the first differences and a(1)=1. 2
1, 4, 6, 10, 9, 14, 8, 15, 24, 12, 20, 30, 16, 27, 40, 18, 33, 49, 21, 38, 56, 22, 42, 63, 25, 44, 68, 26, 51, 28, 54, 81, 32, 62, 91, 34, 65, 98, 35, 70, 102, 36, 72, 111, 39, 76, 116, 45, 86, 129, 46, 90, 135, 48, 94, 141, 50, 100, 52, 104, 155, 55, 108, 162, 57, 112, 168 (list; graph; refs; listen; history; internal format)
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

Cf. A117623 (values of k), A081145 (if nothing is mined).

Sequence in context: A028279 A114743 A089546 * A188673 A193951 A129854

Adjacent sequences:  A117619 A117620 A117621 * A117623 A117624 A117625

KEYWORD

nonn

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Apr 08 2006

EXTENSIONS

Edited and corrected by Robert G. Wilson v (rgwv(AT)rgwv.com), Jun 13 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 16:25 EST 2012. Contains 205635 sequences.