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.
%I A337769 #27 Apr 19 2022 00:01:38 %S A337769 1,2,3,4,5,6,7,8,9,10,10,11,12,12,13,14,15,15,16,17,18,18,19,20,20,21, %T A337769 22,22,23,24,24,25,26,26,27,28,28,29,30,31,31,32,32,33,34,34,35,36,36, %U A337769 37,38,38,39,40,40,41,41,42,43,43,44,45,45,46,46,47,48,48 %N A337769 Smallest integer m such that the sum of the first m prime numbers is greater than n^2. %F A337769 a(n) = Min{m}, Sum_{i=1..m} prime(i) > n^2. %F A337769 a(n) ~ sqrt(2)*n/sqrt(log n). - _Charles R Greathouse IV_, Apr 19 2022 %o A337769 (Python) %o A337769 from sympy import prime %o A337769 def sum_p(m): %o A337769 sum1 = 0 %o A337769 for i in range(1, m+1): %o A337769 sum1 += prime(i) %o A337769 return sum1 %o A337769 pi = 1 %o A337769 for n in range(1, 101): %o A337769 while sum_p(pi) <= n*n: %o A337769 pi += 1 %o A337769 print(pi) %o A337769 (PARI) a(n) = my(p=2, s=2); while(s <= n^2, p = nextprime(p+1); s += p); primepi(p); \\ _Michel Marcus_, Oct 26 2020 %o A337769 (PARI) first(N)=my(v=vector(N), s, k, n=1, n2=1); forprime(p=2, , s+=p; k++; while(s>n2, v[n]=k; if(n++>N, return(v)); n2=n^2)) \\ _Charles R Greathouse IV_, Apr 19 2022 %o A337769 (PARI) a(n)=my(n2=n^2, s, k); forprime(p=2, , s+=p; k++; if(s>n2, return(k))) \\ _Charles R Greathouse IV_, Apr 19 2022 %Y A337769 Cf. A000290, A007504. %K A337769 nonn %O A337769 1,2 %A A337769 _Ya-Ping Lu_, Oct 25 2020