|
|
A277557
|
|
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
|
|
|
8, 18, 19, 32, 33, 34, 50, 52, 53, 72, 73, 74, 75, 76, 98, 99, 100, 101, 102, 103, 128, 131, 133, 134, 162, 163, 164, 165, 166, 167, 168, 169, 200, 201, 202, 203, 204, 205, 206, 207, 208, 242, 244, 247, 248, 250, 251, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 338
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
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.
|
|
LINKS
|
|
|
EXAMPLE
|
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).
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
|
|
MATHEMATICA
|
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]}]
|
|
PROG
|
(Scheme, with Antti Karttunen's IntSeq-library)
(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
|
|
CROSSREFS
|
Cf. A020882 (is obtained when A048147(a(n)) is sorted into ascending order), A008846 (same with duplicates removed).
Cf. A020887, A020888, A120427, A024362, A024406, A046079, A046087, A070151, A156678, A156679, A156680, A156683, A156685, A222946, A278147.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|