A382518 Let N = A001481(n), the n-th number that is the sum of two nonnegative squares. a(n) is the index of the first lattice-edge sequence that will accept N so that no sequence contains the edges of a triangle, otherwise if no such sequence exists, a(n) = 0.
1, 1, 0, 1, 2, 0, 0, 1, 1, 2, 0, 0, 3, 0, 0, 1, 3, 1, 0, 2, 0, 0, 0, 0, 3, 4, 0, 0, 3, 0, 0, 1, 0, 4, 0, 1, 3, 0, 0, 2, 3, 0, 0, 0, 2, 0, 0, 0, 1, 4
Offset: 1
Examples
Let's find a(13). a(13) corresponds to the lattice edge connecting {0,0} to {3,2} because 3^2 = 2^2 = 13. to find a(13) we must know all previous values. a(1), a(2), a(4), a(8) and a(9) are all in bin#1. a(5) and a(10) are both in bin#2. a(13) cannot be in bin#1 because the lattice edges a(1), a(8) and a(13) make a triangle. a(13) cannot be in bin#2 because a(5), a(10) and a(13) form a triangle. a(13) can go into bin#3. a(13) = 3. Let's find a(32). It goes into bin#1 because no combination of previous lattice edges added to that bin form a triangle that includes the lattice edge corresponding with a(32). a(32) = 1.
Comments