The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A067747 Primes interleaved between composite numbers: n-th prime followed by the n-th composite number. 3
 2, 4, 3, 6, 5, 8, 7, 9, 11, 10, 13, 12, 17, 14, 19, 15, 23, 16, 29, 18, 31, 20, 37, 21, 41, 22, 43, 24, 47, 25, 53, 26, 59, 27, 61, 28, 67, 30, 71, 32, 73, 33, 79, 34, 83, 35, 89, 36, 97, 38, 101, 39, 103, 40, 107, 42, 109, 44, 113, 45, 127, 46, 131, 48, 137, 49, 139 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS a(2*n-1) = A000040(n); a(2*n) = A002808(n). - Reinhard Zumkeller, Jan 29 2014 LINKS Zak Seidov, Table of n, a(n) for n = 1..1000. FORMULA a(2*n-1) = A000040(n); a(2*n) = A002808(n). - Reinhard Zumkeller, Jan 29 2014 a(n) = A000040(ceiling(n/2))*A000035(n) + A002808(ceiling(n/2))*A059841(n), equivalent to the Zumkeller formula. - Chayim Lowen, Jul 29 2015 EXAMPLE For n=4, the index is even. Therefore a(4)=A002808(4/2)=A002808(2)=6. MAPLE P, C:= selectremove(isprime, [\$2..1000]): seq(op([P[i], C[i]]), i=1..min(nops(P), nops(C))); # Robert Israel, Jul 24 2015 MATHEMATICA Array[c, 1000]; pc=-1; nc=0; Do[If[PrimeQ[n], If[pc==999, Break[], pc+=2; c[pc]=n], If[nc<=998, nc+=2; c[nc]=n, Goto[ne]]]; Label[ne], {n, 2, 20000}]; Table[c[i], {i, 1000}] (* Zak Seidov, Mar 22 2008 *) Composite[n_Integer] := FixedPoint[n + PrimePi@ # + 1 &, n + PrimePi@ n + 1]; Table[{Prime@ n, Composite@ n}, {n, 35}] // Flatten (* Robert G. Wilson v, Jun 08 2008 *) PROG (Haskell) import Data.List (transpose) a067747 n = a067747_list !! (n-1) a067747_list = concat \$ transpose [a000040_list, a002808_list] -- Reinhard Zumkeller, Jan 29 2014 CROSSREFS Cf. A073846, A002808, A000040. Sequence in context: A086305 A328047 A073898 * A073846 A110458 A217559 Adjacent sequences:  A067744 A067745 A067746 * A067748 A067749 A067750 KEYWORD easy,nonn AUTHOR Amarnath Murthy, Feb 26 2002 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 November 25 20:20 EST 2020. Contains 338627 sequences. (Running on oeis4.)