login
a(1) = 1. For n > 1, a(n) = prime(n) if n is prime, else a(n) = composite(n).
1

%I #10 Nov 26 2019 20:05:42

%S 1,3,5,9,11,12,17,15,16,18,31,21,41,24,25,26,59,28,67,32,33,34,83,36,

%T 38,39,40,42,109,45,127,48,49,50,51,52,157,55,56,57,179,60,191,63,64,

%U 65,211,68,69,70,72,74,241,76,77,78,80,81,277,84,283,86,87,88,90,91

%N a(1) = 1. For n > 1, a(n) = prime(n) if n is prime, else a(n) = composite(n).

%e a(9) = 16 = composite(9) as 9 is composite.

%t 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 *)

%Y Cf. A088608.

%K nonn

%O 1,2

%A _Amarnath Murthy_, Oct 16 2003

%E More terms from Anne Donovan (anned3005(AT)aol.com), Oct 17 2003