login
A097450
If n is square, replace with the sqrt(n)-th prime.
0
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, 27, 28, 29, 30, 31, 32, 33, 34, 35, 13, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 19, 65, 66, 67, 68, 69, 70, 71, 72, 73
OFFSET
1,1
EXAMPLE
sqrt(16) = 4. replace 16 with prime(4) = 7.
MATHEMATICA
snp[n_]:=Module[{s=Sqrt[n]}, If[IntegerQ[s], Prime[s], n]]; Array[snp, 80] (* Harvey P. Dale, Jun 21 2013 *)
PROG
(PARI) replsqpx(n) = { for(x=1, n, if(issquare(x), y=prime(floor(sqrt(x))), y=x); print1(floor(y)", ")) }
CROSSREFS
Sequence in context: A325852 A332668 A206439 * A062303 A180682 A227426
KEYWORD
nonn
AUTHOR
Cino Hilliard, Aug 23 2004
STATUS
approved