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 A372041 #64 Jun 02 2024 17:44:11 %S A372041 3,3,5,3,3,5,-1,5,5,-1,3,7,-1,3,13,-1,5,5,-1,7,23,-1,13,5,-1,7,5,-1, %T A372041 59,29,3,3,5,-1,3,5,-1,13,11,-1,37,23,-1,43,11,-1,3,5,-1,11,5,-1,5,19, %U A372041 -1,5,43,-1,13,29,-1,7,19,-1,41,47,-1,13,11,3,7,5,-1,29,7,-1,79,13,3,3 %N A372041 Least prime p such that the sum of squares of the 2n + 1 consecutive primes starting with p is prime, or -1 if no such p exists. %C A372041 a(n) = 2 never occurs, since the sum starting at 2 is always even and >= 4, so not prime. %C A372041 a(n) = 3 iff n is in A370633 (and equivalently iff 2*n+1 is in A071149). %C A372041 For n == 1 (mod 3), so 2*n+1 is a multiple of 3, a(n) = 3 or -1, since all primes >= 5 are congruent to 1 (mod 6) so the sum starting at 5 or more is a multiple of 3 and so not prime. %e A372041 a(6) = 5 because 5 is the smallest of 2*6+1 = 13 consecutive primes whose sum of squares = 5^2 + 7^2 + 11^2 + 13^2 + 17^2 + 19^2 + 23^2 + 29^2 + 31^2 + 37^2 + 41^2 + 43^2 + 47^2 = 10453 is prime. %e A372041 a(7) = -1 because 7 == 1 (mod 3) so its only possibility is that the sum starts at 3, but 3^2 + ... + 53^2 = 13271 is not prime. %o A372041 (PARI) a(n) = if ((n % 3) == 1, my(vp = primes(2*n+2)); if (isprime(sum(k=2, #vp, vp[k]^2)), return (3), return(-1));); my(vp = primes(2*n+2)); while(! isprime(sum(k=2, #vp, vp[k]^2)), vp = concat(setminus(vp, Set(vp[1])), nextprime(vp[2*n+2]+1))); vp[2]; \\ _Michel Marcus_, May 16 2024 %Y A372041 Cf. A024450, A089793, A318351, A340771, A370633 (indices of 3's). %K A372041 sign %O A372041 1,1 %A A372041 _Michel Lagneau_, Apr 17 2024