%I #5 Oct 01 2013 17:58:02
%S 2,2,3,3,5,6,7,8,5,10,11,12,13,14,15,7,17,18,19,20,21,22,23,24,11,26,
%T 27,28,29,30,31,32,33,34,35,13,37,38,39,40,41,42,43,44,45,46,47,48,17,
%U 50,51,52,53,54,55,56,57,58,59,60,61,62,63,19,65,66,67,68,69,70,71,72,73
%N If n is square, replace with the sqrt(n)-th prime.
%e sqrt(16) = 4. replace 16 with prime(4) = 7.
%t snp[n_]:=Module[{s=Sqrt[n]},If[IntegerQ[s],Prime[s],n]]; Array[snp,80] (* _Harvey P. Dale_, Jun 21 2013 *)
%o (PARI) replsqpx(n) = { for(x=1,n, if(issquare(x),y=prime(floor(sqrt(x))),y=x); print1(floor(y)",")) }
%K nonn
%O 1,1
%A _Cino Hilliard_, Aug 23 2004
|