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.
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
Keywords
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.
Links
- Frank M Jackson, Table of n, a(n) for n = 1..928
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).
Comments