# Tunnell's theorem

Is it possible in some way, to use Tunnells's theorem to determine how long it will take a computer, to determine whether a number n, is a possible area of a rational right triangle?

-
Using BSD or unconditionally? –  Alex B. Dec 7 '10 at 13:32
Assuming BSD, the answer is YES! You have to compute the number of times 2 positive ternary quadratic forms represent a number. I think roughly speaking this takes O(n^{3/2}). There was a project in a SAGE days to compute the q-expansion of the ternary form from Tunnell up to 10^{12} (the only reference I found is wiki.l-functions.org/LfunctionsAndModularFormsIII/CentralValues may be there are newer ones) –  A. Pacetti Dec 7 '10 at 17:29
Thanks a lot! Think that is all I need.. –  Nøhr Dec 8 '10 at 12:03
I have explained in ias.ac.in/resonance/December2009/p1183-1205.pdf how BSD and Tunnell's theorem imply that an integer $\alpha=jn$, with $j\in\{1,2\}$ and $n$ odd, is congruent if and only if $c_j(n)=0$, where $c_j(n)$ is the coefficient of $T^n$ in the formal series $g(T)\theta_j(T)$, with $$g(T)=T\prod_{n=1}^{+\infty}(1-T^{8n})(1-T^{16n})\quad\hbox{and}\quad \theta_j(T)=1+2\sum_{n=1}^{+\infty}T^{2jn^2}.$$ –  Chandan Singh Dalawat Jan 25 '11 at 14:19
@Pacetti: using Chandan's description we have a $\tilde{O}(n)$ algorithm - compute the product mod $T^{n+1}$ using FFT. –  Dror Speiser Feb 26 '11 at 15:24