

A217585


Number of triangles with endpoints of the form (x,x^2), x in {n,...,n}, having at least one angle of 45 degrees.


1



0, 1, 5, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 87, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, 135, 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 183, 187, 191, 195, 199, 203, 207, 211, 215, 219, 223, 227, 231, 235, 239, 243, 247
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


LINKS



FORMULA

a(n) = 4n1 for n > 2.
a(n) = 2*a(n1)  a(n2) for n > 4.
G.f.: x*(2*x^3  2*x^2  3*x  1) / (x1)^2. (End)


EXAMPLE

For n=1, there is one such triangle, having its points at abscissas [a,b,c] = [1,0,1].
For n=2, there are 4 more such triangles, with [a,b,c] = [2, 1, 2], [2, 1, 2], [1, 1, 2] and [2, 1, 1].
For n=3, there are 6 more such triangles, namely [a,b,c] = [3, 0, 2]*, [3, 2, 3], [2, 2, 3] and the symmetric of these. The first one (marked *) is the first instance where the 45degree angle is at the bottom and not on the left or right as for all others so far.


PROG

(PARI) A217585(n, dump=0)={my(c=0, C=180/45/Pi, S=100+n^2); forvec(v=vector(3, i, [if(i<2, n), if(i>1, n)]), bestappr(abs(atan(v[2]+v[1])atan(v[3]+v[1]))*C, S)==1 &c++ &!(dump&print1(v", ")) &(v[2]c=1/2) &next; bestappr(abs(atan(1/(v[2]v[1]))+atan(1/(v[2]+v[3])))*C, S)==1 &c++ &!(dump&print1(v"*, ")) &(v[2]c=1/2) &next, 2); c*2}
(PARI) concat(0, Vec(x*(2*x^32*x^23*x1)/(x1)^2 + O(x^100))) \\ Colin Barker, Sep 20 2014


CROSSREFS



KEYWORD

nonn,easy


AUTHOR



STATUS

approved



