Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #19 Jul 21 2023 09:15:16
%S 1,2,2,2,2,3,2,2,3,3,2,2,3,2,3,3,5,3,2,4,2,3,3,2,4,3,5,4,2,4,4,5,2,3,
%T 2,4,5,4,5,3,6,6,4,4,4,3,4,5,1,3,5,8,5,3,6,3,4,4,4,4,4,5,3,3,6,5,8,4,
%U 2,4
%N Number of ways to write n as x^2 + y^2 + z*(3z+1)/2, where x, y and z are integers with 0 <= x <= y such that x or y has the form p-1 with p prime.
%C Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 49, 608.
%C (ii) Let T(x) = x*(x+1)/2 and pen(x) = x*(3x+1)/2. Any positive integer can be written as (p-1)^2+P(x,y) with p prime and x and y integral, where the polynomial P(x,y) is either of the following ones: T(x)+2*pen(y), 2*T(x)+pen(y), T(x)+y*(5y+1)/2, T(x)+y*(9y+5)/2, pen(x)+y*(5y+j)/2 (j = 1,3), pen(x)+y*(7y+k)/2 (k = 3,5), pen(x)+y*(4y+j) (j = 1,3), pen(x)+y*(5y+r) (r = 1,2,3,4), pen(x)+2y*(3y+i) (i = 1,2), pen(x)+6*pen(y), x*(5x+1)/2+y*(3y+2), x*(5x+1)/2+y*(9y+7)/2, x*(5x+3)/2+y*(3y+i) (i = 1,2), x*(5x+3)/2+y*(9y+5)/2.
%C See also A270928 for a similar conjecture involving T(p-1) = p*(p-1)/2 with p prime.
%H Zhi-Wei Sun, <a href="/A270966/b270966.txt">Table of n, a(n) for n = 1..10000</a>
%H Zhi-Wei Sun, <a href="http://dx.doi.org/10.4064/aa127-2-1">Mixed sums of squares and triangular numbers</a>, Acta Arith. 127(2007), 103-113.
%H Zhi-Wei Sun, <a href="https://doi.org/10.1007/s11425-015-4994-4">On universal sums of polygonal numbers</a>, Sci. China Math. 58(2015), no. 7, 1367-1396.
%e a(1) = 1 since 1 = 0^2 + (2-1)^2 + 0*(3*0+1)/2 with 2 prime.
%e a(12) = 2 since 12 = (2-1)^2 + 2^2 + 2*(2*3+1)/2 = (2-1)^2 + 3^2 + 1*(3*1+1)/2 with 2 prime.
%e a(49) = 1 since 49 = (2-1)^2 + 6^2 + (-3)*(3*(-3)+1)/2 with 2 prime.
%e a(608) = 1 since 608 = (7-1)^2 + 14^2 + (-16)*(3*(-16)+1)/2 with 7 prime.
%t pQ[n_]:=pQ[n]=IntegerQ[Sqrt[24n+1]]
%t Do[r=0;Do[If[(PrimeQ[x+1]||PrimeQ[y+1])&&pQ[n-x^2-y^2],r=r+1],{x,0,Sqrt[n/2]},{y,x,Sqrt[n-x^2]}];Print[n," ",r];Continue,{n,1,70}]
%Y Cf. A000040, A000217, A000290, A001318, A160326, A262813, A262815, A262816, A262827, A270469, A270488, A270516, A270533, A270559, A270566, A270928.
%K nonn
%O 1,2
%A _Zhi-Wei Sun_, Mar 27 2016