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.
%I A077664 #17 Sep 21 2021 19:55:21 %S A077664 2,3,5,4,5,7,5,7,9,11,6,7,8,9,11,7,11,13,17,19,23,8,9,10,11,12,13,15, %T A077664 9,11,13,15,17,19,21,23,10,11,13,14,16,17,19,20,22,11,13,17,19,21,23, %U A077664 27,29,31,33,12,13,14,15,16,17,18,19,20,21,23,13,17,19,23,25,29,31,35,37,41,43,47 %N A077664 Triangle in which the n-th row contains n smallest numbers greater than n and coprime to n. %C A077664 A260910 gives the triangle of Frobenius numbers of n, T(n,k). - _Reinhard Zumkeller_, Aug 04 2015 %H A077664 Reinhard Zumkeller, <a href="/A077664/b077664.txt">Rows n = 1..125 of triangle, flattened</a> %e A077664 Triangle begins: %e A077664 2; %e A077664 3, 5; %e A077664 4, 5, 7; %e A077664 5, 7, 9, 11; %e A077664 6, 7, 8, 9, 11; %e A077664 7, 11, 13, 17, 19, 23; %e A077664 8, 9, 10, 11, 12, 13, 15; %e A077664 ... %t A077664 T[n_] := Module[{j, k}, Reap[For[j = n+1; k = 1, k <= n, j++, If[CoprimeQ[n, j], Sow[j]; k++]]][[2, 1]]]; %t A077664 Table[T[n], {n, 1, 12}] // Flatten (* _Jean-François Alcover_, Sep 21 2021 *) %o A077664 (Haskell) %o A077664 a077664 n k = a077664_tabl !! (n-1) !! (k-1) %o A077664 a077664_row n = a077664_tabl !! (n-1) %o A077664 a077664_tabl = map (\x -> take x $ filter ((== 1). gcd x) [x + 1 ..]) [1..] %o A077664 -- _Reinhard Zumkeller_, Aug 03 2015 %o A077664 (Python) %o A077664 from math import gcd %o A077664 def arow(n): %o A077664 rown, k = [], n + 1 %o A077664 while len(rown) < n: %o A077664 if gcd(k, n) == 1: rown.append(k) %o A077664 k += 1 %o A077664 return rown %o A077664 def agen(rows): %o A077664 for n in range(1, rows+1): yield from arow(n) %o A077664 print([an for an in agen(12)]) # _Michael S. Branicky_, Sep 21 2021 %Y A077664 Cf. A077665, A077666. %Y A077664 Cf. A077581, A260895 (number of primes per row), A260910. %K A077664 nonn,tabl,look %O A077664 1,1 %A A077664 _Amarnath Murthy_, Nov 14 2002 %E A077664 More terms from _Sascha Kurz_, Jan 03 2003