login
A077157
a(0) = 1, followed by next n composite numbers followed by next n primes.
1
1, 4, 2, 6, 8, 3, 5, 9, 10, 12, 7, 11, 13, 14, 15, 16, 18, 17, 19, 23, 29, 20, 21, 22, 24, 25, 31, 37, 41, 43, 47, 26, 27, 28, 30, 32, 33, 53, 59, 61, 67, 71, 73, 34, 35, 36, 38, 39, 40, 42
OFFSET
0,2
COMMENTS
A permutation of the natural numbers.
MATHEMATICA
Module[{nn=10, pr, cm}, pr=Prime[Range[(nn(nn+1))/2]]; cm=Complement[Range[ 2, Max[pr]], pr]; Join[{1}, Flatten[Thread[{TakeList[cm, Range[nn]], TakeList[ pr, Range[ nn]]}]]]](* Harvey P. Dale, Aug 04 2022 *)
CROSSREFS
Cf. A077156.
Sequence in context: A083412 A086399 A105365 * A268718 A306874 A114478
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Oct 31 2002
STATUS
approved