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.

A230775 Smallest prime number greater than or equal to the square root of n.

This page as a plain text file.
%I A230775 #21 Nov 04 2024 17:32:35
%S A230775 2,2,2,2,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,7,7,7,7,7,7,7,7,7,
%T A230775 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,11,11,11,11,11,11,11,11,11,11,11,11,11,
%U A230775 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
%N A230775 Smallest prime number greater than or equal to the square root of n.
%C A230775 Or repeat prime(k) (prime(k)^2-prime(k-1)^2) times, with prime(0) set to 0 for k=1.
%H A230775 Jean-Christophe Hervé, <a href="/A230775/b230775.txt">Table of n, a(n) for n = 1..10000</a>
%F A230775 a(n) = A000040(A230774(n)).
%F A230775 Repeat prime(1) prime(1)^2 times; for k>1, repeat A000040(k) A050216(k-1) times (that is, repeat prime(k) (prime(k)^2 - prime(k-1)^2) times).
%e A230775 a(5)=a(6)=a(7)=a(8)=a(9)=3 because prime(1)= 2 < sqrt(5 to 9) <= prime(2) = 3.
%t A230775 spn[n_]:=Module[{s=Sqrt[n]},If[PrimeQ[s],s,NextPrime[s]]]; Array[spn,90] (* _Harvey P. Dale_, Feb 10 2019 *)
%o A230775 (Python)
%o A230775 from math import isqrt
%o A230775 from sympy import nextprime
%o A230775 def A230775(n): return nextprime(isqrt(n-1)) # _Chai Wah Wu_, Nov 04 2024
%Y A230775 Cf. A230774, A050216, A056813.
%K A230775 nonn,easy
%O A230775 1,1
%A A230775 _Jean-Christophe Hervé_, Nov 01 2013