This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A167419 Exchange adjacent nonprimes and primes. 0
 2, 1, 4, 3, 6, 5, 8, 7, 9, 11, 10, 13, 12, 14, 15, 17, 16, 19, 18, 20, 21, 23, 22, 24, 25, 26, 27, 29, 28, 31, 30, 32, 33, 34, 35, 37, 36, 38, 39, 41, 40, 44, 43, 45, 47, 46, 48, 49, 50, 51, 53, 52, 54, 55, 56, 57, 59, 58, 61, 60, 62, 63, 65, 65, 67, 66, 68, 69, 71, 70, 73, 72 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS If we have consecutive numbers, one prime and one nonprime, swap them. So after the initial 2,1,4,3,6,5,8,7 we have "if n is prime, a(n) = n-1; if n+1 is prime, a(n) = n+1, otherwise a(n) = n". LINKS CROSSREFS Cf. A014681 Sequence in context: A076981 A147965 A167542 * A114285 A014681 A103889 Adjacent sequences:  A167416 A167417 A167418 * A167420 A167421 A167422 KEYWORD easy,nonn AUTHOR Giovanni Teofilatto, Nov 03 2009 EXTENSIONS Edited by Franklin T. Adams-Watters, Nov 04 2009 STATUS approved

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

Last modified December 15 20:00 EST 2019. Contains 330000 sequences. (Running on oeis4.)