A178154 Sum_{a=1..(p-1)/2} LegendreSymbol(a, p) for primes p == 3 (mod 4).
1, 1, 3, 3, 3, 3, 3, 5, 9, 3, 7, 5, 9, 5, 9, 5, 15, 9, 7, 3, 11, 15, 13, 9, 9, 7, 15, 15, 21, 13, 11, 9, 9, 19, 9, 15, 19, 9, 9, 17, 27, 21, 15, 15, 7, 21, 25, 7, 27, 9, 21, 15, 9, 27, 15, 21, 25, 13, 15, 13, 9, 23, 33, 15, 15, 31, 13, 15, 21, 15, 15, 21, 9, 21, 33, 21, 21, 9, 29, 9, 31, 19
Offset: 1
Keywords
References
- Richard Kenneth Guy, Unsolved Problems in Number Theory, Springer-Verlag, Berlin, 1994, pp. 244.
Links
- Wenpeng Zhang, An old number theory problem related to the Legendre symbol, arXiv:2506.02434 [math.HO], Jun. 2025.
Programs
-
Maple
P := upto -> select(n -> isprime(n) and modp(n, 4) = 3, [seq(1..upto)]): a := p -> add(NumberTheory:-LegendreSymbol(a, p), a = 1..(p-1)/2): seq(a(p), p in P(940)); # Peter Luschny, Jun 07 2025
-
Mathematica
Table[Length[Select[Range[(p-1)/2], JacobiSymbol[ #,p]==1&]] - Length[Select[Range[(p+1)/2,p-1], JacobiSymbol[ #,p]==1&]], {p, Select[Prime[Range[200]], Mod[ #,4]==3&]}]
-
SageMath
def h(p): if not (is_prime(p) and mod(p, 4) == 3): return 0 return sum(kronecker(j, p) for j in range(1, (p + 1)//2)) aList = lambda upto: [h(n) for n in range(2, upto) if h(n) > 0] print(aList(944)) # Peter Luschny, Jun 07 2025
Formula
A178153 for primes p=3 (mod 4).
Extensions
Name simplified by Peter Luschny, Jun 07 2025
Comments