

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.


2



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, 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, 5, 2, 3, 3, 5, 6, 8, 3, 1, 9, 4, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

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.
(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.


LINKS

ZhiWei Sun, Table of n, a(n) for n = 1..10000
ZhiWei Sun, Restricted sums of four squares, arXiv:1701.05868 [math.NT], 2017.


EXAMPLE

a(1) = 1 since 4*1+1 = 2^2 + 1^2 + 8*0^2 with 2 prime.
a(2) = 1 since 4*2+1 = 3^2 + 0^2 + 8*0^2 with 3 prime.
a(4) = 1 since 4*4+1 = 3^2 + 0^2 + 8*1^2 with 3 prime.
a(16) = 1 since 4*16+1 = 7^2 + 4^2 + 8*0^2 with 7 prime.
a(17) = 1 since 4*17+1 = 5^2 + 6^2 + 8*1^2 with 5 prime.
a(4787) = 1 since 4*4787+1 = 31^2 + 126^2 + 8*17^2 with 31 prime.
a(4822) = 1 since 4*4822+1 = 29^2 + 4^2 + 8*48^2 with 29 prime.
a(11962) = 1 since 4*11962+1 = 109^2 + 160^2 + 8*36^2 with 109 prime.


MATHEMATICA

SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
tab={}; Do[r=0; Do[If[PrimeQ[p]&&SQ[4n+1p^28q^2], r=r+1], {p, 2, Sqrt[4n+1]}, {q, 0, Sqrt[(4n+1p^2)/8]}];
tab=Append[tab, r]; Continue, {n, 1, 80}]


CROSSREFS

Cf. A000040, A000290.
Sequence in context: A304302 A305516 A305182 * A033178 A029418 A185736
Adjacent sequences: A291044 A291045 A291046 * A291048 A291049 A291050


KEYWORD

nonn


AUTHOR

ZhiWei Sun, Aug 16 2017


STATUS

approved



