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 A080114 #30 Sep 21 2022 09:33:41 %S A080114 3,5,7,11,13,23,31,37,47,59,71,79,83,103,131,151,167,191,199,239,251, %T A080114 263,271,311,359,383,419,431,439,479,503,563,599,607,647,659,719,743, %U A080114 751,839,863,887,911,919,971,983,991,1031,1039,1063,1091,1103,1151,1223 %N A080114 Odd primes p for which all sums Sum_{j=1..u} L(j/p) (with u ranging from 1 to (p-1)/2) are nonnegative, where L(j/p) is Legendre symbol of j and p. %C A080114 This sequence contains those 4k+1 primes p for which the first half (the (p-1)/2 most significant bits) of A055094(p) is in A014486 and those 4k+3 primes q, for which the whole A055094(q) is in A014486. %C A080114 Are the 2nd, 5th and 8th primes (5,13,37) only terms of this sequence that are of the form 4k+1? [Searched up to a(211)=7927 by AK.] %C A080114 No other such terms up to 19997. - _Michel Marcus_, Sep 21 2022 %H A080114 Michel Marcus, <a href="/A080114/b080114.txt">Table of n, a(n) for n = 1..430</a> %H A080114 Antti Karttunen, <a href="/A080120/a080120.pdf">Illustration of Legendre's candelabras</a> %H A080114 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LegendreSymbol.html">Legendre Symbol</a> %H A080114 Wikipedia, <a href="https://en.wikipedia.org/wiki/Legendre_symbol">Legendre symbol</a> %p A080114 with(numtheory); # For ithprime and legendre. %p A080114 A080114 := n -> ithprime(A080112(n)); %p A080114 A080114v2 := proc(upto_n) local j,a,p,i,s; a := []; for i from 2 to upto_n do p := ithprime(i); s := 0; for j from 1 to (p-1)/2 do s := s + legendre(j,p); if(s < 0) then break; fi; od; if(s >= 0) then a := [op(a),p]; fi; od; RETURN(a); end; %t A080114 s[p_, u_] := Sum[JacobiSymbol[j, p], {j, 1, u}]; Select[Prime[Range[2, 200] ], (p = #; AllTrue[Range[(p - 1)/2], s[p, #] >= 0 &]) &] (* _Jean-François Alcover_, Mar 04 2016 *) %o A080114 (Sage) %o A080114 def A080114_list(n) : %o A080114 a = [] %o A080114 for i in (2..n) : %o A080114 s = 0 %o A080114 p = nth_prime(i) %o A080114 for j in (1..(p-1)/2) : %o A080114 s += legendre_symbol(j, p) %o A080114 if s < 0 : break %o A080114 if s >= 0 : a.append(p) %o A080114 return a %o A080114 A080114_list(200) # _Peter Luschny_, Aug 08 2012 %o A080114 (PARI) isok(p) = if (isprime(p) && (p>2), for (u=1, (p-1)/2, if (sum(j=1, u, kronecker(j, p)) < 0, return(0));); return(1);); \\ _Michel Marcus_, Sep 20 2022 %Y A080114 Cf. A080112, A080115. These are the primes for which a "Legendre's candelabra" can be constructed, see A080120. %Y A080114 Supersequence of A095102. %K A080114 nonn %O A080114 1,1 %A A080114 _Antti Karttunen_, Feb 11 2003