cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A011757 a(n) = prime(n^2).

Original entry on oeis.org

2, 7, 23, 53, 97, 151, 227, 311, 419, 541, 661, 827, 1009, 1193, 1427, 1619, 1879, 2143, 2437, 2741, 3083, 3461, 3803, 4211, 4637, 5051, 5519, 6007, 6481, 6997, 7573, 8161, 8737, 9341, 9931, 10627, 11321, 12049, 12743, 13499, 14327, 15101, 15877, 16747, 17609, 18461
Offset: 1

Views

Author

Keywords

Examples

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

Crossrefs

Programs

  • Magma
    [NthPrime(n^2): n in [1..100] ]; // Vincenzo Librandi, Apr 12 2011
    
  • Mathematica
    Prime[Range[40]^2] (* Alonso del Arte, Feb 11 2015 *)
  • PARI
    a(n)=prime(n^2) \\ Charles R Greathouse IV, Jul 02 2013
    
  • 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

Formula

a(n) = n^2 log^2 n + O(n^2 log n log log n). - Charles R Greathouse IV, Mar 11 2014