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.

A181118 Sequencing of all rational numbers p/q > 0 as ordered pairs (p,q). The rational (p,q) occurs as the n-th ordered pair where n=(p+q-1)*(p+q-2)/2+q.

This page as a plain text file.
%I A181118 #27 Jul 23 2015 12:23:55
%S A181118 1,1,2,1,1,2,3,1,2,2,1,3,4,1,3,2,2,3,1,4,5,1,4,2,3,3,2,4,1,5,6,1,5,2,
%T A181118 4,3,3,4,2,5,1,6,7,1,6,2,5,3,4,4,3,5,2,6,1,7,8,1,7,2,6,3,5,4,4,5,3,6,
%U A181118 2,7,1,8,9,1,8,2,7,3,6,4,5,5,4,6,3,7,2,8,1,9,10,1,9,2,8,3,7,4,6,5,5,6,4,7,3
%N A181118 Sequencing of all rational numbers p/q > 0 as ordered pairs (p,q). The rational (p,q) occurs as the n-th ordered pair where n=(p+q-1)*(p+q-2)/2+q.
%C A181118 From _L. Edson Jeffery_, Dec 17 2011: (Start)
%C A181118 Arrange the ordered pairs in rows
%C A181118 (1,1)
%C A181118 (2,1),(1,2)
%C A181118 (3,1),(2,2),(1,3)
%C A181118 etc., and let the rows be indexed by n=1,2,.... Then the sum of the products of the pairs in row n is equal to A000292(n). For example, for n=3, 3*1+2*2+1*3=A000292(3)=10. (End)
%H A181118 G. H. Hardy, <a href="http://www.archive.org/details/coursepuremath00hardrich">A Course of Pure Mathematics</a> (1921), p. 1.
%F A181118 Triangle format R(n,m) of ordered pairs (R(n,2r-1), R(n,2r)) with R(n,2r-1)=n+1-r and R(n,2r)=r and generating the rational (n+1-r)/r.
%e A181118 Triangle begins:
%e A181118 1,1                  : 1/1;
%e A181118 2,1,1,2              : 2/1, 1/2;
%e A181118 3,1,2,2,1,3          : 3/1, 2/2, 1/3;
%e A181118 4,1,3,2,2,3,1,4      : 4/1, 3/2, 2/3, 1/4;
%e A181118 5,1,4,2,3,3,2,4,1,5  : 5/1, 4/2, 3/3, 2/4, 1/5;
%e A181118 ...
%t A181118 Flatten[Table [{n+1-r, r}, {n, 9}, {r, n}]]
%t A181118 u[x_] := Floor[3/2 + Sqrt[2*x]]; v[x_] := Floor[1/2 + Sqrt[2*x]]; n[x_] := 1 - x + u[x]*(u[x] - 1)/2; k[x_] := x - v[x]*(v[x] - 1)/2; Flatten[Table[{n[m], k[m]}, {m, 45}]] (* _L. Edson Jeffery_, Jun 20 2015 *)
%o A181118 (PARI) for(n=1,9,for(r=1,n,print1(n+1-r", "r", "))) \\ _Charles R Greathouse IV_, Dec 20 2011
%Y A181118 Cf. A000292, A057555.
%K A181118 easy,nonn,tabf
%O A181118 1,3
%A A181118 _Frank M Jackson_, Oct 04 2010
%E A181118 Typo corrected and tabl changed to tabf by _Frank M Jackson_, Oct 07 2010