

A301534


Number of ways to write the nth prime congruent to 7 modulo 12 as x^2 + 3*y^2 + 15*2^z with x,y,z nonnegative integers.


2



0, 2, 3, 4, 5, 5, 2, 6, 6, 4, 7, 4, 9, 6, 6, 6, 7, 9, 5, 10, 3, 9, 7, 9, 8, 11, 9, 8, 10, 5, 8, 9, 4, 10, 7, 7, 7, 8, 7, 13, 8, 6, 6, 14, 7, 15, 3, 11, 8, 10, 8, 7, 7, 9, 6, 9, 7, 7, 10, 12, 6, 9, 4, 7, 10, 12, 12, 7, 13, 9, 12, 6, 7, 10, 5, 8, 7, 12, 12, 10
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Conjecture: a(n) > 0 for all n > 1. In other words, any prime p > 7 with p == 7 (mod 12) can be written as x^2 + 3*y^2 + 15*2^z with x,y,z nonnegative integers.
We have verified the conjecture for all primes p == 7 (mod 12) with 7 < p < 8*10^9.


LINKS

ZhiWei Sun, Table of n, a(n) for n = 1..10000


EXAMPLE

a(1) = 0 since 7 cannot be written as x^2 + 3*y^2 + 15*2^z with x,y,z nonnegative integers.
a(2) = 2 since the second prime congruent to 7 modulo 12 is 19 and 19 = 1^2 + 3*1^2 + 15*2^0 = 2^2 + 3*0^2 + 15*2^0.


MATHEMATICA

p[n_]:=p[n]=Prime[n];
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
f[n_]:=f[n]=FactorInteger[n];
g[n_]:=g[n]=Sum[Boole[MemberQ[{2}, Mod[Part[Part[f[n], i], 1], 3]]&&Mod[Part[Part[f[n], i], 2], 2]==1], {i, 1, Length[f[n]]}]==0;
QQ[n_]:=QQ[n]=n==0(n>0&&g[n]);
n=0; Do[If[Mod[p[m], 12]!=7, Goto[aa]]; n=n+1; r=0; Do[If[QQ[p[m]15*2^k], Do[If[SQ[p[m]15*2^k3x^2], r=r+1], {x, 0, Sqrt[(p[m]15*2^k)/3]}]], {k, 0, Log[2, p[m]/15]}]; Print[n, " ", r]; Label[aa], {m, 1, 315}]


CROSSREFS

Cf. A000040, A000079, A000290, A092572, A299924, A299537, A299794, A300219, A300362, A300396, A300510, A301376, A301391, A301452, A301471, A301472, A302920.
Sequence in context: A158366 A335834 A289321 * A101916 A329267 A100771
Adjacent sequences: A301531 A301532 A301533 * A301535 A301536 A301537


KEYWORD

nonn


AUTHOR

ZhiWei Sun, Apr 16 2018


STATUS

approved



