A230596 Number of ways to write n = x + y + z with 0 < x <= y <= z such that x*y*z is a triangular number, and that x is a triangular number of the form (p^2 - 1)/8 with p an odd prime.
0, 0, 1, 0, 1, 1, 0, 2, 1, 1, 2, 2, 1, 1, 2, 2, 4, 1, 1, 2, 3, 2, 5, 1, 3, 3, 3, 3, 2, 8, 1, 4, 2, 2, 3, 5, 1, 3, 6, 3, 5, 3, 1, 6, 4, 5, 3, 3, 1, 6, 6, 3, 4, 2, 4, 3, 8, 3, 3, 8, 5, 2, 4, 4, 6, 6, 3, 6, 2, 3, 12, 7, 1, 10, 7, 3, 4, 5, 3, 7, 8, 2, 5, 4, 6, 4, 2, 5, 6, 6, 4, 4, 13, 6, 9, 6, 4, 10, 7, 4
Offset: 1
Keywords
Examples
a(10) = 1 since 10 = 3 + 3 + 4, and 3 = (5^2-1)/8 with 5 an odd prime, and 3*3*4 = 8*9/2 is a triangular number. a(31) = 1 since 31 = 3 + 11 + 17, and 3 = (5^2-1)/8 with 5 an odd prime, and 3*11*17 = 33*34/2 is a triangular number.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
TQ[n_]:=IntegerQ[Sqrt[8n+1]] a[n_]:=Sum[If[TQ[(Prime[i]^2-1)/8*y*(n-(Prime[i]^2-1)/8-y)],1,0],{i,2,PrimePi[Sqrt[8n/3+1]]},{y,(Prime[i]^2-1)/8,(n-(Prime[i]^2-1)/8)/2}] Table[a[n],{n,1,100}]
Comments