login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 3
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.

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

See also the triangle T(y, x) with the values for PPTs given in A278147. - Wolfdieter Lang, Nov 24 2016

LINKS

Table of n, a(n) for n=1..59.

Wikipedia, Cantor's pairing function, and Pythagorean triple

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. A001477, A002262, A025581, A243808, A277632.

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.

Sequence in context: A251258 A101241 A031258 * A108060 A279688 A178180

Adjacent sequences:  A277554 A277555 A277556 * A277558 A277559 A277560

KEYWORD

nonn

AUTHOR

Frank M Jackson, Oct 19 2016

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 16 00:11 EST 2018. Contains 317252 sequences. (Running on oeis4.)