login
A145445
a(n) = the smallest square > n-th prime.
8
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,1
LINKS
FORMULA
a(n) = A104103(n)^2.
MATHEMATICA
Table[Ceiling[Prime[n]^(1/2)]^2, {n, 100}]
PROG
(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
(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
CROSSREFS
Cf. A104103.
Cf. A000040, A000290, A014085 (run lengths), A245508.
Sequence in context: A246934 A206919 A168039 * A008794 A075709 A332777
KEYWORD
nonn
AUTHOR
Zak Seidov, Oct 10 2008
STATUS
approved