Present the even number (if it divides by 4) as a difference of two integer squares ?

Alexander Povolotsky apovolot at gmail.com
Thu Apr 24 17:17:53 CEST 2008


Hi,

Does anybody has a good PARI program to present the given even
positive integer (if it divides by 4^k, k >= 1 ) as a difference of
two positive integer squares (desirably generating all "k" variants)
?

I did not see any seq in OEIS which would have "premade" answer to
above question (or did I overlook it ?).

If indeed such seqs are not in the OEIS - then I could imagine (only
of course if highly respected OEIS's seqfan "senior" activists will
not disapprove this humble idea ...) that the terms of such several
sequences could be presented as the function of the quadroupled index
"n", e.g. a(k=4*n).

I used above the word "several" because it would be desirable (I dare
to suggest)  to have several flavors, where the sum of such two
squares (where one square is subtracted from another) is:

a) minimal
b) maximal
c) ? some other condition imposed on those two squares ?

Please forgive me in advance for any errata in my above text.
Best Regards,
AP




ap> From seqfan-owner at ext.jussieu.fr  Thu Apr 24 17:18:42 2008
ap> Date: Thu, 24 Apr 2008 11:17:53 -0400
ap> From: "Alexander Povolotsky" <apovolot at gmail.com>
ap> To: Seqfan <seqfan at ext.jussieu.fr>
ap> Subject: Present the even number (if it divides by 4) as a difference of two integer squares ?
ap> 
ap> Hi,
ap> 
ap> Does anybody has a good PARI program to present the given even
ap> positive integer (if it divides by 4^k, k >= 1 ) as a difference of
ap> two positive integer squares (desirably generating all "k" variants)
ap> ?

I think that searching for the pythagorean triangle side lengths could
reveal a PARI implementation. The one below would decompose an integer n
into all possible n=a^2-b^2 (including positive and negative b) and print them:


/* Print parameters 0<=b<=a such that n=a^2-b^2.
*/
decoSq(n)={
}

{
decoSq(300) ;
}





More information about the SeqFan mailing list