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.

A145445 a(n) = the smallest square > n-th prime.

Original entry on oeis.org

4, 4, 9, 9, 16, 16, 25, 25, 25, 36, 36, 49, 49, 49, 49, 64, 64, 64, 81, 81, 81, 81, 100, 100, 100, 121, 121, 121, 121, 121, 144, 144, 144, 144, 169, 169, 169, 169, 169, 196, 196, 196, 196, 196, 225, 225, 225, 225, 256, 256, 256, 256, 256, 256, 289, 289, 289, 289
Offset: 1

Views

Author

Zak Seidov, Oct 10 2008

Keywords

Crossrefs

Cf. A104103.
Cf. A000040, A000290, A014085 (run lengths), A245508.

Programs

  • Haskell
    a145445 n = a145445_list !! (n-1)
    a145445_list = f a000040_list $ drop 2 a000290_list where
       f ps'@ (p:ps) xs'@(x:xs) = if p < x then x : f ps xs' else f ps' xs
    -- Reinhard Zumkeller, Jul 25 2014
    
  • Mathematica
    Table[Ceiling[Prime[n]^(1/2)]^2,{n,100}]
  • Python
    from sympy import prime, integer_nthroot
    def a(n): return (integer_nthroot(prime(n), 2)[0]+1)**2
    print([a(n) for n in range(1, 59)]) # Michael S. Branicky, Apr 04 2021

Formula

a(n) = A104103(n)^2.