cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A297294 Number of primitive Pythagorean triples (PPTs) that have 2^n-1 as the length of their odd leg where n is the sequence index.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 4, 2, 4, 2, 8, 1, 4, 4, 8, 1, 8, 1, 16, 4, 8, 2, 32, 4, 4, 4, 32, 4, 32, 1, 16, 8, 4, 8, 128, 2, 4, 8, 64, 2, 32, 4, 64, 32, 8, 4, 256, 2, 64, 16, 64, 4, 32, 32, 128, 8, 32, 2, 1024, 1, 4, 32, 64, 4, 128, 2, 64, 8, 256, 4, 2048, 4, 16, 64, 64, 8, 64, 4, 256, 32, 16, 2, 2048, 4, 16, 32, 512, 1, 1024
Offset: 1

Views

Author

Frank M Jackson, Jan 04 2018

Keywords

Comments

2^n-1 for n = 0 and 1 give the Mersenne numbers 0 and 1, neither of which can be the side length of a PPT. For n > 1, all Mersenne numbers are congruent to 3 mod 4. Consequently, no Mersenne number can be the length of the hypotenuse of a PPT.
If 2^n-1 is the length of the odd leg of a PPT its divisors can provide a set of pairs {x, y} such that for each pair, x*y = 2^n-1, x < y and gcd(x, y) = 1. Using Euclid's parametric generators for PPTs (s^2+t^2, 2s*t, s^2-t^2) with s > t > 0 as positive integers, gcd(s, t) = 1 and s+t odd it is possible to generate all PPTs with 2^n-1 as the length of the odd leg providing that s = (x+y)/2 and t = (y-x)/2.
If 2^n-1 has d distinct prime factors (A046800(n)), then the set of pairs {x, y} such that x*y = 2^n-1, x < y and gcd(x, y) = 1 has a cardinality of 2^(d-1). This is because an integer m consisting of d distinct factors will have 2^d divisors and will generate pairs {x', y'} such that x'*y' = m, x' < y' and gcd(x', y') = 1 with a cardinality of 2^(d-1). Let m be the product of the distinct factor of 2^n-1 and r be the remainder consisting of the remaining repeated prime factors where m*r = 2^n-1. Then there has to be a 1 to 1 correspondence between the set of pairs {x', y'} created from the distinct prime factors of 2^n-1 and {x, y} created from all the prime factors of 2^n-1 whenever the repeated prime factors of r are combined with the distinct factors of m in the pairs {x, y} in order to preserve gcd(x, y) = 1.

Examples

			a(6)=2, because 2^6-1 = 63 gives pairs {1, 63}, {3, 21}, {7, 9} whose members when multiplied give 63. However, only two of these pairs are coprime and will generate PPTs.
		

Crossrefs

Programs

  • Mathematica
    pairs[n_] := Module[{m=2^n-1, lst=Divisors[2^n-1]}, Table[{lst[[l]], m/lst[[l]]}, {l, 1, Length[lst]/2}]]; Table[Length@Select[pairs[n], GCD@@#==1 &], {n, 1, 100}]
    a[n_] := If[n==1, 0, 2^(Length@FactorInteger[2^n-1]-1)]; Array[a, 100]

Formula

For n=1, a(n)=0 otherwise a(n)=2^(A046800(n)-1).