OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
MATHEMATICA
Module[{nn=60, ds}, ds=2 Range[0, Ceiling[Sqrt[Prime[nn]]]]^2; Join[ {2}, Table[ SelectFirst[ds, #>Prime[n]&], {n, 2, nn}]]] (* Harvey P. Dale, Jan 07 2020 *)
PROG
(Haskell)
import Data.List (genericIndex)
a245508 n = genericIndex a245508_list (n-1)
a245508_list = f a000040_list a001105_list where
f ps'@ (p:ps) xs'@(x:xs) = if p <= x then x : f ps xs' else f ps' xs
(PARI) a(n) = my(k=prime(n)+(n!=1)); while (! issquare(k/2), k+=2); k; \\ Michel Marcus, Jan 24 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 25 2014
STATUS
approved