login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A088607
a(1) = 1. For n > 1, a(n) = prime(n) if n is prime, else a(n) = composite(n).
1
1, 3, 5, 9, 11, 12, 17, 15, 16, 18, 31, 21, 41, 24, 25, 26, 59, 28, 67, 32, 33, 34, 83, 36, 38, 39, 40, 42, 109, 45, 127, 48, 49, 50, 51, 52, 157, 55, 56, 57, 179, 60, 191, 63, 64, 65, 211, 68, 69, 70, 72, 74, 241, 76, 77, 78, 80, 81, 277, 84, 283, 86, 87, 88, 90, 91
OFFSET
1,2
EXAMPLE
a(9) = 16 = composite(9) as 9 is composite.
MATHEMATICA
Join[{1}, With[{comps=Select[Range[4, 100], !PrimeQ[#]&]}, Rest[Table[ If[ PrimeQ[n], Prime[n], comps[[n]]], {n, 70}]]]] (* Harvey P. Dale, Nov 03 2013 *)
CROSSREFS
Cf. A088608.
Sequence in context: A270780 A304251 A309135 * A296243 A162699 A325129
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Oct 16 2003
EXTENSIONS
More terms from Anne Donovan (anned3005(AT)aol.com), Oct 17 2003
STATUS
approved