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 A346134 #19 Jul 31 2021 16:18:47 %S A346134 2,5,17,41,100,160,281,328,501,791,874,1264,1593,1720,2127,2747,3447, %T A346134 3638,4438,4888,5117,6081,6870,7699,9206,10191,10538,11240,11599, %U A346134 12718,15968,16840,18650,19113,22039,22548,24133,26369,27517,29897,31734,32353,36227,36888 %N A346134 The sum S of the maximum number of consecutive primes starting with 2 such that S <= prime(n)^2. %e A346134 a(3) = 2+3+5+7 = 17 because 17 <= prime(3)^2 < 28 = 2+3+5+7+11. %e A346134 a(4) = 2+3+5+7+11+13 = 41 because 41 <= prime(4)^2 < 58 = 2+3+5+7+11+13+17. %t A346134 Table[k=1;While[(s=Sum[Prime@i,{i,++k}])<Prime@n^2];s-Prime@k,{n,50}] (* _Giorgos Kalogeropoulos_, Jul 06 2021 *) %o A346134 (PARI) a(n) = my(s=0, p=2); while (s+p <= prime(n)^2, s += p; p = nextprime(p+1)); s; \\ _Michel Marcus_, Jul 05 2021 %o A346134 (Python) %o A346134 from sympy import prime, nextprime %o A346134 def a(n): %o A346134 p, s, lim = 1, 0, prime(n)**2 %o A346134 while s <= lim: p = nextprime(p); s += p %o A346134 return s - p %o A346134 print([a(n) for n in range(1, 51)]) # _Michael S. Branicky_, Jul 05 2021 %Y A346134 Cf. A001248, A007504. %K A346134 nonn %O A346134 1,1 %A A346134 _Gil Broussard_, Jul 05 2021