For some positive integers $p$, there is a quadrilateral $ABCD$ with positive integer side lengths, perimeter $p$, right angles at $B$ and $C$, $AB=3$, and $CD=AD$. How many different values of $p<2015$ are possible?
As in the main problem, $ABCD$ is a right trapezoid with $AB=3$, $CD=AD=x$ and height $BC=b$. Then $(x-3)^2+b^2=x^2$, so $b^2=6x-9$.
Since $3\mid b^2$, $b=3m$, and then $x=\dfrac{3m^2+3}2$; this is an integer exactly when $m$ is odd. Write $m=2j+1$: $b=6j+3$, $x=6j^2+6j+3$.
The perimeter is $p=3+b+2x=12j^2+18j+12$. Then $p<2015$ means $12j^2+18j<2003$, i.e. $j\le12$ (for $j=12$: $1728+216=1944<2003$; for $j=13$: $2028+234>2003$).
So $j=0,1,\dots,12$ and there are $\boxed{13}$ values.