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.

A191004 Number of ways to write n = p+q+(n mod 2)q, where p is an odd prime and q<=n/2 is a prime such that JacobiSymbol[q,n]=1 if n is odd, and JacobiSymbol[(q+1)/2,n+1]=1 if n is even.

This page as a plain text file.
%I A191004 #23 Jul 22 2025 12:06:48
%S A191004 0,0,0,0,0,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,3,2,3,3,2,1,1,2,2,1,1,1,2,
%T A191004 2,4,2,2,2,2,2,2,1,1,2,4,3,5,4,1,4,1,2,3,2,2,2,3,1,4,1,2,4,2,2,3,1,2,
%U A191004 4,5,3,3,1,4,3,2,3,5,3,4,8,2,2,7,4,4,5,2,2,6,3,3,4,4,2,4,2,1,4,4
%N A191004 Number of ways to write n = p+q+(n mod 2)q, where p is an odd prime and q<=n/2 is a prime such that JacobiSymbol[q,n]=1 if n is odd, and JacobiSymbol[(q+1)/2,n+1]=1 if n is even.
%C A191004 Conjecture: a(n)>0 for all n>5.
%C A191004 We have verified this for n up to 10^9. It is stronger than Goldbach's conjecture and Lemoine's conjecture.
%C A191004 Zhi-Wei Sun also conjectured the following refinement: Any odd number 2n+1>64 not among 105, 247, 255, 1105 can be written as p+2q, where p and q are primes, and JacobiSymbol[q,p']=1 for any prime divisor p' of 2n+1; also, any even number 2n>8 not among 32 and 152 can be written as p+q, where p and q<=n/2 are primes, and JacobiSymbol[(q+1)/2,p']=1 for any prime divisor p' of 2n+1.
%H A191004 Zhi-Wei Sun, <a href="/A191004/b191004.txt">Table of n, a(n) for n = 1..20000</a>
%H A191004 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1211.1588">Conjectures involving primes and quadratic forms</a>, arXiv:1211.1588.
%e A191004 a(19)=1 since 19=5+2*7 with JacobiSymbol[7,19]=1.
%e A191004 a(32)=1 since 32=29+3 with JacobiSymbol[(3+1)/2,32+1]=1.
%t A191004 a[n_]:=a[n]=Sum[If[(Mod[n,2]==1&&PrimeQ[n-2Prime[k]]==True&&JacobiSymbol[Prime[k],n]==1)||(Mod[n,2]==0&&n-Prime[k]>2&&PrimeQ[n-Prime[k]]==True&&JacobiSymbol[(Prime[k]+1)/2,n+1]==1),1,0],{k,1,PrimePi[n/2]}]
%t A191004 Do[Print[n," ",a[n]],{n,1,200}]
%Y A191004 Cf. A002375, A046927, A185150.
%K A191004 nonn
%O A191004 1,14
%A A191004 _Zhi-Wei Sun_, Dec 30 2012