login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A097450 If n is square, replace with the sqrt(n)-th prime. 0

%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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 13:58 EDT 2024. Contains 371960 sequences. (Running on oeis4.)