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.

A226314 Triangle read by rows: T(i,j) = j+(i-j)/gcd(i,j) (1<=i<=j).

This page as a plain text file.
%I A226314 #16 Sep 26 2014 16:18:53
%S A226314 1,1,2,1,2,3,1,3,3,4,1,2,3,4,5,1,4,5,5,5,6,1,2,3,4,5,6,7,1,5,3,7,5,7,
%T A226314 7,8,1,2,7,4,5,8,7,8,9,1,6,3,7,9,8,7,9,9,10,1,2,3,4,5,6,7,8,9,10,11,1,
%U A226314 7,9,10,5,11,7,11,11,11,11,12,1,2,3,4,5,6,7,8,9,10,11,12,13,1,8,3,9,5,10,13,11,9,12,11,13,13,14
%N A226314 Triangle read by rows: T(i,j) = j+(i-j)/gcd(i,j) (1<=i<=j).
%C A226314 The triangle of fractions A226314(i,j)/A054531(i,j) is an efficient way to enumerate the rationals [Fortnow].
%C A226314 Sum(A226314(n,k)/A054531(n,k): 1<=k<=n) = A226555(n)/A040001(n). - _Reinhard Zumkeller_, Jun 10 2013
%H A226314 Reinhard Zumkeller, <a href="/A226314/b226314.txt">Rows n = 1..120 of triangle, flattened</a>
%H A226314 Lance Fortnow, <a href="http://blog.computationalcomplexity.org/2004/03/counting-rationals-quickly.html">Counting the Rationals Quickly</a>, Computational Complexity Weblog, Monday, March 01, 2004.
%H A226314 Yoram Sagher, <a href="http://www.jstor.org/stable/2324846">Counting the rationals</a>, Amer. Math. Monthly, 96 (1989), p. 823. Math. Rev. 90i:04001.
%e A226314 Triangle begins:
%e A226314 [1]
%e A226314 [1, 2]
%e A226314 [1, 2, 3]
%e A226314 [1, 3, 3, 4]
%e A226314 [1, 2, 3, 4, 5]
%e A226314 [1, 4, 5, 5, 5, 6]
%e A226314 [1, 2, 3, 4, 5, 6, 7]
%e A226314 [1, 5, 3, 7, 5, 7, 7, 8]
%e A226314 [1, 2, 7, 4, 5, 8, 7, 8, 9]
%e A226314 [1, 6, 3, 7, 9, 8, 7, 9, 9, 10]
%e A226314 ...
%e A226314 The resulting triangle of fractions begins:
%e A226314 1,
%e A226314 1/2, 2,
%e A226314 1/3, 2/3, 3,
%e A226314 1/4, 3/2, 3/4, 4,
%e A226314 1/5, 2/5, 3/5, 4/5, 5,
%e A226314 ...
%p A226314 f:=(i,j) -> j+(i-j)/gcd(i,j);
%p A226314 g:=n->[seq(f(i,n),i=1..n)];
%p A226314 for n from 1 to 20 do lprint(g(n)); od:
%o A226314 (Haskell)
%o A226314 a226314 n k = n - (n - k) `div` gcd n k
%o A226314 a226314_row n = a226314_tabl !! (n-1)
%o A226314 a226314_tabl = map f $ tail a002262_tabl where
%o A226314    f us'@(_:us) = map (v -) $ zipWith div vs (map (gcd v) us)
%o A226314      where (v:vs) = reverse us'
%o A226314 -- _Reinhard Zumkeller_, Jun 10 2013
%Y A226314 Cf. A002262.
%Y A226314 Cf. A037161, A037162, A066657, A066658.
%K A226314 nonn,frac,tabl
%O A226314 1,3
%A A226314 _N. J. A. Sloane_, Jun 09 2013