login
A077664
Triangle in which the n-th row contains n smallest numbers greater than n and coprime to n.
6
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, 9, 11, 13, 15, 17, 19, 21, 23, 10, 11, 13, 14, 16, 17, 19, 20, 22, 11, 13, 17, 19, 21, 23, 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
OFFSET
1,1
COMMENTS
A260910 gives the triangle of Frobenius numbers of n, T(n,k). - Reinhard Zumkeller, Aug 04 2015
LINKS
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
Cf. A077581, A260895 (number of primes per row), A260910.
Sequence in context: A263279 A262507 A151679 * A329402 A339263 A179475
KEYWORD
nonn,tabl,look
AUTHOR
Amarnath Murthy, Nov 14 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 03 2003
STATUS
approved