|
|
A245508
|
|
Smallest double square (cf. A001105) greater than n-th prime.
|
|
4
|
|
|
2, 8, 8, 8, 18, 18, 18, 32, 32, 32, 32, 50, 50, 50, 50, 72, 72, 72, 72, 72, 98, 98, 98, 98, 98, 128, 128, 128, 128, 128, 128, 162, 162, 162, 162, 162, 162, 200, 200, 200, 200, 200, 200, 200, 200, 200, 242, 242, 242, 242, 242, 242, 242, 288, 288, 288, 288
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
For n > 2: prime(n) < a(n) < 2*prime(n) and a(n) = A245499(A000040(n),2).
|
|
LINKS
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|