login
a(n) = prime(n^2).
36

%I #32 Sep 08 2022 08:44:37

%S 2,7,23,53,97,151,227,311,419,541,661,827,1009,1193,1427,1619,1879,

%T 2143,2437,2741,3083,3461,3803,4211,4637,5051,5519,6007,6481,6997,

%U 7573,8161,8737,9341,9931,10627,11321,12049,12743,13499,14327,15101,15877,16747,17609,18461

%N a(n) = prime(n^2).

%H David A. Corneth, <a href="/A011757/b011757.txt">Table of n, a(n) for n = 1..20000</a> (first 1000 terms from Zak Seidov)

%F a(n) = n^2 log^2 n + O(n^2 log n log log n). - _Charles R Greathouse IV_, Mar 11 2014

%e a(4) = 53 as the (4^2)th prime is the 16th prime is 53. - _David A. Corneth_, Apr 13 2021

%t Prime[Range[40]^2] (* _Alonso del Arte_, Feb 11 2015 *)

%o (Magma) [NthPrime(n^2): n in [1..100] ]; // _Vincenzo Librandi_, Apr 12 2011

%o (PARI) a(n)=prime(n^2) \\ _Charles R Greathouse IV_, Jul 02 2013

%o (PARI) first(n) = { my(res = vector(n), t = 0); forprime(p = 2, oo, t++; if(ispower(t, 2, &i), print1([i, p]", "); res[i] = p; if(i >= n, return(res)))) } \\ _David A. Corneth_, Apr 13 2021

%Y Cf. A000040, A000290, A063076.

%K nonn,easy

%O 1,1

%A _Jeff Burch_