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.

A291191 Number of ways to write 2*n+1 as x^2 + y^2 + z^2 + w^2, where x,y,z,w are nonnegative integers with x <= y, z <= w and x + y < z + w such that 2^(x+y) + 2^(z+w) + 1 is prime.

This page as a plain text file.
%I A291191 #10 Aug 24 2017 19:51:04
%S A291191 1,1,1,2,2,1,1,2,2,2,1,1,3,2,2,1,2,2,1,1,3,3,1,2,2,1,3,2,2,4,4,3,4,2,
%T A291191 2,5,5,5,4,5,3,6,7,4,7,5,3,6,6,5,4,10,5,3,3,3,4,6,4,4,4,4,1,5,5,3,3,4,
%U A291191 3,3,3,3,4,2,1,2,3,4,2,7,4,4,2,4,6,5,2,3,6,3,3,3,2,5,3,2,3,1,6,5
%N A291191 Number of ways to write 2*n+1 as x^2 + y^2 + z^2 + w^2, where x,y,z,w are nonnegative integers with x <= y, z <= w and x + y < z + w such that 2^(x+y) + 2^(z+w) + 1 is prime.
%C A291191 Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 3, 6, 7, 11, 12, 16, 19, 20, 23, 26, 63, 75, 98.
%C A291191 (ii) Any integer n > 1 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^(x+y) + 2^(z+w) is a practical number (A005153).
%C A291191 (iii) Any positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^(x+y) + 3^(z+w) is prime.
%C A291191 (iv) Any positive integer not divisible by 32 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^x + 3^y + 4^z is prime.
%C A291191 See also A291150 for a similar conjecture.
%C A291191 I have verified that a(n) > 0 for all n = 1..10^7. For example, a(6998538) > 0 since 2*6998538+1 = 122^2 + 220^2 + 208^2 + 3727^2 with 2^(122+220) + 2^(208+3727) + 1 = 2^342 + 2^3935 + 1 a prime of 1185 decimal digits. - _Zhi-Wei Sun_, Aug 23 2017
%H A291191 Zhi-Wei Sun, <a href="/A291191/b291191.txt">Table of n, a(n) for n = 1..10000</a>
%H A291191 Zhi-Wei Sun, <a href="http://dx.doi.org/10.1016/j.jnt.2016.11.008">Refining Lagrange's four-square theorem</a>, J. Number Theory 175(2017), 167-190.
%H A291191 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1701.05868">Restricted sums of four squares</a>, arXiv:1701.05868 [math.NT], 2017.
%e A291191 a(1) = 1 since 2*1+1 = 0^2 + 1^2 + 1^2 + 1^2 with 2^(0+1) + 2^(1+1) + 1 = 7 prime.
%e A291191 a(2) = 1 since 2*2+1 = 0^2 + 1^2 + 0^2 + 2^2 with 2^(0+1) + 2^(0+2) + 1 = 7 prime.
%e A291191 a(19) = 1 since 2*19+1 = 2^2 + 3^2 + 1^2 + 5^2 with 2^(2+3) + 2^(1+5) + 1 = 97 prime.
%e A291191 a(26) = 1 since 2*26+1 = 1^2 + 4^2 + 0^2 + 6^2 with 2^(1+4) + 2^(0+6) + 1 = 97 prime.
%e A291191 a(63) = 1 since 2*63+1 = 1^2 + 5^2 + 1^2 +10^2 with 2^(1+5) + 2^(1+10) + 1 = 2113 prime.
%e A291191 a(75) = 1 since 2*75+1 = 1^2 + 5^2 + 5^2 + 10^2 with 2^(1+5) + 2^(5+10) + 1 = 32833 prime.
%e A291191 a(98) = 1 since 2*98+1 = 6^2 + 6^2 + 2^2 + 11^2 with 2^(6+6) + 2^(2+11) + 1 = 12289 prime.
%t A291191 SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
%t A291191 Do[r=0;Do[If[SQ[2n+1-x^2-y^2-z^2]&&x+y<z+Sqrt[2n+1-x^2-y^2-z^2]&&PrimeQ[2^(x+y)+2^(z+Sqrt[2n+1-x^2-y^2-z^2])+1],r=r+1],{x,0,Sqrt[n]},{y,x,Sqrt[2n+1-x^2]},{z,0,Sqrt[(2n+1-x^2-y^2)/2]}];Print[n," ",r],{n,1,100}]
%Y A291191 Cf. A000040, A000079, A000118, A000290, A005153, A271518, A281976, A290935, A291150.
%K A291191 nonn
%O A291191 1,4
%A A291191 _Zhi-Wei Sun_, Aug 20 2017