cp's OEIS Frontend

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.

A185150 Number of odd primes p between n^2 and (n+1)^2 with (n/p) = 1, where (-) is the Legendre symbol.

This page as a plain text file.
%I A185150 #29 Jul 22 2025 09:45:11
%S A185150 1,1,2,3,2,2,2,3,3,1,4,2,4,3,5,7,2,3,4,6,5,3,3,4,8,5,4,5,4,4,6,6,6,4,
%T A185150 9,9,7,7,5,6,7,5,9,5,7,3,9,6,10,6,10,6,8,8,7,7,10,3,12,8,7,10,8,14,11,
%U A185150 7,10,10,5,9,11,8,7,9,9,18,11,11,12,9,20,6,13,6,10,9,13,9,8,10,10,12,12,6,13,9,12,12,8,23
%N A185150 Number of odd primes p between n^2 and (n+1)^2 with (n/p) = 1, where (-) is the Legendre symbol.
%C A185150 Conjecture: a(n)>0 for all n>0.
%C A185150 This is a refinement of Legendre's conjecture that for each n=1,2,3,... the interval (n^2,(n+1)^2) contains a prime.
%C A185150 We have verified the conjecture for n up to 10^9.
%C A185150 Zhi-Wei Sun also made some similar conjectures involving primes and Legendre symbols, below are few examples:
%C A185150 (1) If n>10 then there is a prime p between n^2 and (n+1)^2 with (n/p) = ((1-n)/p) = 1. If n>2 is different from 7 and 17, then there is a prime p between n^2 and (n+1)^2 with (n/p) = ((n+1)/p) = 1. If n>1 is not equal to 27, then there is a prime p between n^2 and (n+1)^2 with (n/p) = ((n+2)/p) = 1.
%C A185150 (2) If n>2 is different from 6, 12, 58, then there is a prime p between n^2 and n^2+n such that (n/p) = 1. If n>20 is not a square, and different from 37 and 77, then there is a prime p between n^2 and n^2+n such that (n/p) = -1.
%C A185150 (3) For each n=15,16,... there is a prime p between n and 2n such that (n/p) = 1. If n>0 is not a square, then
%C A185150 there is a prime p between n and 2n such that (n/p) = -1.
%H A185150 Zhi-Wei Sun, <a href="/A185150/b185150.txt">Table of n, a(n) for n = 1..10000</a>
%H A185150 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1211.1588">Conjectures involving primes and quadratic forms</a>, arXiv:1211.1588.
%e A185150 a(10)=1 since 107 is the only prime p between 10^2 and 11^2 with (10/p) = 1.
%t A185150 a[n_]:=a[n]=Sum[If[n^2+k>2&&PrimeQ[n^2+k]==True&&JacobiSymbol[n,n^2+k]==1,1,0],{k,1,2n}]
%t A185150 Do[Print[n," ",a[n]],{n,1,100}]
%Y A185150 Cf. A014085, A185636.
%K A185150 nonn
%O A185150 1,3
%A A185150 _Zhi-Wei Sun_, Dec 29 2012