login
The ordered image of the 1-to-1 mapping of an integer ordered pair (x,y) into an integer using Cantor's pairing function, where 0 < x < y, gcd(x,y)=1 and x+y odd.
4

%I #29 Aug 01 2019 04:08:51

%S 8,18,19,32,33,34,50,52,53,72,73,74,75,76,98,99,100,101,102,103,128,

%T 131,133,134,162,163,164,165,166,167,168,169,200,201,202,203,204,205,

%U 206,207,208,242,244,247,248,250,251,288,289,290,291,292,293,294,295,296,297,298,338

%N The ordered image of the 1-to-1 mapping of an integer ordered pair (x,y) into an integer using Cantor's pairing function, where 0 < x < y, gcd(x,y)=1 and x+y odd.

%C The mapping of the ordered pair (x,y) to an integer uses Cantor's pairing function to generate the integer as (x+y)(x+y+1)/2+y. Also for every ordered pair (x,y) such that 0 < x < y, gcd(x,y)=1 and x+y odd, there exists a primitive Pythagorean triple (PPT) (a, b, c) such that a = y^2-x^2, b = 2xy, c = x^2+y^2. Therefore each term in the sequence represents a unique PPT.

%C Numbers n for which 0 < A025581(n) < A002262(n) and A025581(n)+A002262(n) is odd, and gcd(A025581(n), A002262(n)) = 1. [The definition expressed with A-numbers.] - _Antti Karttunen_, Nov 02 2016

%C See also the triangle T(y, x) with the values for PPTs given in A278147. - _Wolfdieter Lang_, Nov 24 2016

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Pairing_function#Cantor_pairing_function">Cantor's pairing function</a>, and <a href="http://en.wikipedia.org/wiki/Pythagorean_triple">Pythagorean triple</a>

%e a(5)=33 because the ordered pair (2,5) maps to 33 by Cantor's pairing function (see below) and is the 5th such occurrence. Also x=2, y=5 generates a PPT with sides (21,20,29).

%e Note: Cantor's pairing function is simply A001477 in its two-argument tabular form A001477(k, n) = n + (k+n)*(k+n+1)/2, thus A001477(2,5) = 5 + (2+5)*(2+5+1)/2 = 33. - _Antti Karttunen_, Nov 02 2016

%t Cantor[{i_, j_}] := (i+j)(i+j+1)/2+j; getparts[n_] := Reverse@Select[Reverse[IntegerPartitions[n, {2}], 2], GCD@@#==1 &]; pairs=Flatten[Table[getparts[2n+1], {n, 1, 20}], 1]; Table[Cantor[pairs[[n]]], {n, 1, Length[pairs]}]

%o (Scheme, with Antti Karttunen's IntSeq-library)

%o (define A277557 (MATCHING-POS 1 1 (lambda (n) (let ((x (A025581 n)) (y (A002262 n))) (and (not (zero? x)) (< x y) (odd? (+ x y)) (= 1 (gcd x y))))))) ;; _Antti Karttunen_, Nov 02 2016

%Y Cf. A001477, A002262, A025581, A243808, A277632.

%Y Cf. A020882 (is obtained when A048147(a(n)) is sorted into ascending order), A008846 (same with duplicates removed).

%Y Cf. A020887, A020888, A120427, A024362, A024406, A046079, A046087, A070151, A156678, A156679, A156680, A156683, A156685, A222946, A278147.

%K nonn

%O 1,1

%A _Frank M Jackson_, Oct 19 2016