login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A071977
Triangle in which first row is {1}; to get n-th row take first n numbers greater than last number in previous row which are relatively prime to n.
5
1, 3, 5, 7, 8, 10, 11, 13, 15, 17, 18, 19, 21, 22, 23, 25, 29, 31, 35, 37, 41, 43, 44, 45, 46, 47, 48, 50, 51, 53, 55, 57, 59, 61, 63, 65, 67, 68, 70, 71, 73, 74, 76, 77, 79, 81, 83, 87, 89, 91, 93, 97, 99, 101, 103, 104, 105, 106, 107, 108, 109, 111, 112, 113, 114, 115
OFFSET
1,2
LINKS
EXAMPLE
Triangle begins 1; 3 5; 7 8 10; 11 13 15 17; 18 19 21 22 23; 25 29 31 35 37 41; ....
MATHEMATICA
a = {1}; k = 2; Do[i = 1; While[i < n + 1, If[ GCD[k, n] == 1, a = Append[a, k]; i++ ]; k++ ], {n, 2, 12}]; a
PROG
(Haskell)
a071977 n k = a071977_tabl !! (n-1) !! (k-1)
a071977_row n = a071977_tabl !! (n-1)
a071977_tabl = f 1 [1..] where
f k xs = ys : f (k+1) (dropWhile (<= last ys) xs) where
ys = take k $ filter ((== 1) . (gcd k)) xs
-- Reinhard Zumkeller, Jan 18 2012
CROSSREFS
Diagonals give A071978, A071979.
Sequence in context: A185602 A225554 A257019 * A183423 A109404 A377286
KEYWORD
nonn,tabl
AUTHOR
Amarnath Murthy, Jun 18 2002
EXTENSIONS
Edited by Robert G. Wilson v, Jun 28 2002
STATUS
approved