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.

A245508 Smallest double square (cf. A001105) greater than n-th prime.

This page as a plain text file.
%I A245508 #10 Jan 24 2022 08:01:06
%S A245508 2,8,8,8,18,18,18,32,32,32,32,50,50,50,50,72,72,72,72,72,98,98,98,98,
%T A245508 98,128,128,128,128,128,128,162,162,162,162,162,162,200,200,200,200,
%U A245508 200,200,200,200,200,242,242,242,242,242,242,242,288,288,288,288
%N A245508 Smallest double square (cf. A001105) greater than n-th prime.
%C A245508 For n > 2: prime(n) < a(n) < 2*prime(n) and a(n) = A245499(A000040(n),2).
%H A245508 Reinhard Zumkeller, <a href="/A245508/b245508.txt">Table of n, a(n) for n = 1..10000</a>
%t A245508 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 *)
%o A245508 (Haskell)
%o A245508 import Data.List (genericIndex)
%o A245508 a245508 n = genericIndex a245508_list (n-1)
%o A245508 a245508_list = f a000040_list a001105_list where
%o A245508    f ps'@ (p:ps) xs'@(x:xs) = if p <= x then x : f ps xs' else f ps' xs
%o A245508 (PARI) a(n) = my(k=prime(n)+(n!=1)); while (! issquare(k/2), k+=2); k; \\ _Michel Marcus_, Jan 24 2022
%Y A245508 Cf. A000040, A001105, A145445.
%K A245508 nonn
%O A245508 1,1
%A A245508 _Reinhard Zumkeller_, Jul 25 2014