OFFSET
1,1
COMMENTS
A260910 gives the triangle of Frobenius numbers of n, T(n,k). - Reinhard Zumkeller, Aug 04 2015
LINKS
Reinhard Zumkeller, Rows n = 1..125 of triangle, flattened
EXAMPLE
Triangle begins:
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;
...
MATHEMATICA
T[n_] := Module[{j, k}, Reap[For[j = n+1; k = 1, k <= n, j++, If[CoprimeQ[n, j], Sow[j]; k++]]][[2, 1]]];
Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Sep 21 2021 *)
PROG
(Haskell)
a077664 n k = a077664_tabl !! (n-1) !! (k-1)
a077664_row n = a077664_tabl !! (n-1)
a077664_tabl = map (\x -> take x $ filter ((== 1). gcd x) [x + 1 ..]) [1..]
-- Reinhard Zumkeller, Aug 03 2015
(Python)
from math import gcd
def arow(n):
rown, k = [], n + 1
while len(rown) < n:
if gcd(k, n) == 1: rown.append(k)
k += 1
return rown
def agen(rows):
for n in range(1, rows+1): yield from arow(n)
print([an for an in agen(12)]) # Michael S. Branicky, Sep 21 2021
CROSSREFS
AUTHOR
Amarnath Murthy, Nov 14 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 03 2003
STATUS
approved