A385736 a(n) is the number of distinct nondegenerate triangles with perimeter n whose side lengths are triangular numbers.
0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 2, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 2, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 2, 1, 2, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 0, 0, 1, 0, 1, 1, 0, 1
Offset: 0
Examples
The a(31) = 2 distinct nondegenerate triangles with perimeter 31 and whose side lengths are triangular numbers are [1, 15, 15] and [6, 10, 15].
Links
- Felix Huber, Table of n, a(n) for n = 0..10000
- Felix Huber, Maple program to compute the counted triangles
- Eric Weisstein's World of Mathematics, Triangular Number
Programs
-
Maple
A385736:=proc(N) # To get the first N + 1 terms. local p,x,y,z,i; p:=[]; for z to floor((sqrt(24*N+9)-3)/6) do for x from z to floor((sqrt(4*N-3)-1)/2) do for y from max(z,floor((sqrt(1+4*(x^2+x-z^2-z))-1)/2)+1) to min(x,floor((sqrt(1+4*(2*N-x^2-x-z^2-z))-1)/2)) do p:=[op(p),z*(z+1)/2+y*(y+1)/2+x*(x+1)/2] od od od; return seq(numboccur(p,i),i=0..N) end proc; A385736(87);
Comments