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.

A291047 Number of ways to write 4*n+1 as p^2 + q^2 + 8*r^2, where p is prime, and q and r are nonnegative integers.

This page as a plain text file.
%I A291047 #6 Aug 16 2017 23:42:57
%S A291047 1,1,3,1,2,2,2,2,3,2,3,2,3,3,5,1,1,3,2,3,6,1,3,4,2,1,1,2,4,4,5,1,5,3,
%T A291047 3,3,1,4,9,2,1,4,3,3,6,4,2,5,3,4,5,2,6,3,3,4,6,1,4,5,4,2,8,2,2,6,1,3,
%U A291047 5,2,3,3,5,6,8,3,1,9,4,4
%N A291047 Number of ways to write 4*n+1 as p^2 + q^2 + 8*r^2, where p is prime, and q and r are nonnegative integers.
%C A291047 Conjecture: (i) a(n) > 0 for all n > 0, and the only values of n >= 1000 with a(n) = 1 are 1000, 1052, 1472, 1675, 1967, 4787, 4822, 11962.
%C A291047 (ii) For any positive integer n, we can write 6*n+3 as p^2 + 2*q^2 + 3*r^2, where p is prime, and q and r are integers.
%H A291047 Zhi-Wei Sun, <a href="/A291047/b291047.txt">Table of n, a(n) for n = 1..10000</a>
%H A291047 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1701.05868">Restricted sums of four squares</a>, arXiv:1701.05868 [math.NT], 2017.
%e A291047 a(1) = 1 since 4*1+1 = 2^2 + 1^2 + 8*0^2 with 2 prime.
%e A291047 a(2) = 1 since 4*2+1 = 3^2 + 0^2 + 8*0^2 with 3 prime.
%e A291047 a(4) = 1 since 4*4+1 = 3^2 + 0^2 + 8*1^2 with 3 prime.
%e A291047 a(16) = 1 since 4*16+1 = 7^2 + 4^2 + 8*0^2 with 7 prime.
%e A291047 a(17) = 1 since 4*17+1 = 5^2 + 6^2 + 8*1^2 with 5 prime.
%e A291047 a(4787) = 1 since 4*4787+1 = 31^2 + 126^2 + 8*17^2 with 31 prime.
%e A291047 a(4822) = 1 since 4*4822+1 = 29^2 + 4^2 + 8*48^2 with 29 prime.
%e A291047 a(11962) = 1 since 4*11962+1 = 109^2 + 160^2 + 8*36^2 with 109 prime.
%t A291047 SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
%t A291047 tab={};Do[r=0;Do[If[PrimeQ[p]&&SQ[4n+1-p^2-8q^2],r=r+1],{p,2,Sqrt[4n+1]},{q,0,Sqrt[(4n+1-p^2)/8]}];
%t A291047 tab=Append[tab,r];Continue,{n,1,80}]
%Y A291047 Cf. A000040, A000290.
%K A291047 nonn
%O A291047 1,3
%A A291047 _Zhi-Wei Sun_, Aug 16 2017