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.

A290012 a(n) is the smallest prime number p satisfying p^2 >= Sum_{1 <= k <= n} prime(k)^2.

This page as a plain text file.
%I A290012 #30 May 20 2021 18:47:38
%S A290012 2,5,7,11,17,23,29,37,41,53,59,71,83,97,103,127,131,149,163,179,191,
%T A290012 211,223,239,257,277,307,317,337,353,373,397,419,443,467,491,521,541,
%U A290012 569,593,617,643,673,701,727,757,787,821,853,877,907,937
%N A290012 a(n) is the smallest prime number p satisfying p^2 >= Sum_{1 <= k <= n} prime(k)^2.
%C A290012 Conjecture: The only twin prime pair in the sequence is (5, 7).
%H A290012 Harvey P. Dale, <a href="/A290012/b290012.txt">Table of n, a(n) for n = 1..1000</a>
%e A290012 The prime number 17 is the fifth term because the sum of squares of the first 5 prime numbers is 2^2 + 3^2 + 5^2 + 7^2 + 11^2 = 208 < 17^2 = 289.
%t A290012 Table[Function[k, p = 2; While[p^2 < k, p = NextPrime@ p]; p][Total[Prime[Range@ n]^2]], {n, 52}] (* _Michael De Vlieger_, Jul 18 2017 *)
%t A290012 spn[n_]:=Module[{k=Ceiling[Sqrt[n]]},If[PrimeQ[k],k,NextPrime[k]]]; spn/@ Accumulate[Prime[Range[60]]^2] (* _Harvey P. Dale_, May 20 2021 *)
%o A290012 (PARI) {
%o A290012 sp=0;p=0;
%o A290012 forprime(n=2,200,
%o A290012          sp+=n^2;
%o A290012          while(p^2<sp,p=nextprime(p+1));
%o A290012          print1(p", ")
%o A290012         )
%o A290012 }
%o A290012 (PARI) a(n) = my(s=sum(k=1, n, prime(k)^2)); forprime(p=1, , if(p^2 >= s, return(p))) \\ _Felix Fröhlich_, Jul 18 2017
%Y A290012 Cf. A076873.
%K A290012 nonn
%O A290012 1,1
%A A290012 _Dimitris Valianatos_, Jul 17 2017
%E A290012 Definition clarified by _Felix Fröhlich_, Jul 18 2017