A270928 Number of ways to write n = x*(x-1)/2 + y*(y-1)/2 + z*(z-1)/2, where 0 < x <= y <= z, and one of x, y, z is prime.
1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 3, 2, 1, 2, 1, 3, 3, 2, 2, 2, 2, 2, 2, 1, 3, 4, 2, 2, 2, 2, 1, 4, 2, 3, 2, 2, 3, 2, 2, 2, 4, 2, 3, 3, 1, 2, 5, 1, 2, 3, 3, 4, 3, 3, 1, 5, 1, 3, 2, 3, 3, 5, 2, 2, 4
Offset: 1
Keywords
Examples
a(1) = 1 since 1 = 1*(1-1)/2 + 1*(1-1)/2 + 2*(2-1)/2 with 2 prime. a(4) = 1 since 4 = 1*(1-1)/2 + 2*(2-1)/2 + 3*(3-1)/2 with 2 and 3 prime. a(29) = 1 since 29 = 1*(1-1)/2 + 2*(2-1)/2 + 8*(8-1)/2 with 2 prime. a(50) = 1 since 50 = 2*(2-1)/2 + 7*(7-1)/2 + 8*(8-1)/2 with 2 and 7 prime. a(119) = 1 since 119 = 8*(8-1)/2 + 9*(9-1)/2 + 11*(11-1)/2 with 11 prime. a(411) = 1 since 411 = 16*(16-1)/2 + 16*(16-1)/2 + 19*(19-1)/2 with 19 prime. a(1125) = 1 since 1125 = 3*(3-1)/2 + 34*(34-1)/2 + 34*(34-1)/2 with 3 prime. a(1590) = 1 since 1590 = 7*(7-1)/2 + 37*(37-1)/2 + 43*(43-1)/2 with 7, 37 and 43 prime. a(2346) = 1 since 2346 = 6*(6-1)/2 + 16*(16-1)/2 + 67*(67-1)/2 with 67 prime. a(4068) = 1 since 4068 = 7*(7-1)/2 + 34*(34-1)/2 + 84*(84-1)/2 with 7 prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Mixed sums of squares and triangular numbers, Acta Arith. 127(2007), 103-113.
- Zhi-Wei Sun, On universal sums of polygonal numbers, Sci. China Math. 58(2015), no. 7, 1367-1396.
- Zhi-Wei Sun, On x(ax+1)+y(by+1)+z(cz+1) and x(ax+b)+y(ay+c)+z(az+d), J. Number Theory 171(2017), 275-283.
Crossrefs
Programs
-
Mathematica
TQ[n_]:=TQ[n]=IntegerQ[Sqrt[8n+1]] Do[r=0;Do[If[TQ[n-x(x-1)/2-y(y-1)/2]&&(PrimeQ[x]||PrimeQ[y]||PrimeQ[(Sqrt[8(n-x(x-1)/2-y(y-1)/2)+1]+1)/2]),r=r+1],{x,1,(Sqrt[8n/3+1]+1)/2},{y,x,(Sqrt[8(n-x(x-1)/2)/2+1]+1)/2}];Print[n," ",r];Continue,{n,1,70}]
Comments