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 A383504 #75 Jun 09 2025 14:42:07 %S A383504 2,5,7,25,11,13,7,7,35,7,19,31,25,11,5,19,5,11,5,139,37,17,19,19,13,5, %T A383504 7,7,19,13,11,5,7,11,5,5,5,13,47,43,5,23,13,11,11,79,31,35,5,5,25,5, %U A383504 37,95,31,13,43,17,5,35,17,23,11,41,59,7,47,5,13,7,11 %N A383504 Sum of next a(n) successive prime squares is prime. %C A383504 Group the primes such that the sum of squares of members of each group is a prime, and each successive group is as short as possible. %C A383504 Apart from a(1)=2, a(n) is odd and not a multiple of 3. %H A383504 Abhiram R Devesh, <a href="/A383504/b383504.txt">Table of n, a(n) for n = 1..10000</a> %e A383504 Primes, their squares, and the lengths of blocks which sum to a prime begin, %e A383504 primes 2, 3, 5, 7, 11, 13, 17, 19, ... %e A383504 squared 4, 9, 25, 49, 121, 169, 289, 361, ... %e A383504 \--/ \-------------------/ \--- ... %e A383504 sum 13 653 %e A383504 a(n) = 2 5 %p A383504 i:= 0: p:= 0: t:= 0: count:= 0: R:= NULL: %p A383504 while count < 100 do %p A383504 p:= nextprime(p); %p A383504 i:= i+1; %p A383504 t:= t + p^2; %p A383504 if isprime(t) then %p A383504 R:= R, i; count:= count+1; i:= 0; t:= 0; %p A383504 fi %p A383504 od: %p A383504 R; # _Robert Israel_, May 25 2025 %t A383504 p=1;s={};Do[c=0;sm=0;While[!PrimeQ[sm],sm=sm+Prime[p]^2;p++;c++];AppendTo[s,c],{n,71}];s (* _James C. McMahon_, Jun 09 2025 *) %o A383504 (Python) %o A383504 from itertools import count, islice %o A383504 from sympy import isprime, nextprime %o A383504 def agen(): # generator of terms %o A383504 s, i, p = 0, 1, 2 %o A383504 while True: %o A383504 while not(isprime(s:=s+p**2)): i, p = i+1, nextprime(p) %o A383504 yield i %o A383504 s, i, p = 0, 1, nextprime(p) %o A383504 print(list(islice(agen(), 71))) # _Michael S. Branicky_, May 23 2025 %Y A383504 Cf. A001248, A073684 (sum of successive primes), A384161 (sum of successive prime cubes). %K A383504 nonn %O A383504 1,1 %A A383504 _Abhiram R Devesh_, May 18 2025