# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a360371 Showing 1-1 of 1 %I A360371 #41 Mar 30 2023 11:51:56 %S A360371 1,2,3,4,6,5,7,9,10,8,11,12,15,16,13,14,18,20,24,26,17,19,21,25,32,39, %T A360371 34,22,23,27,30,40,52,51,44,28,29,33,35,48,65,68,66,56,31,36,42,45,64, %U A360371 78,85,88,84,62,37,38,54,50,72,91,102,110,112,93,74,41 %N A360371 Triangle read by rows: lexicographically earliest sequence of distinct positive integers such that each column contains only multiples of the first number in that column. See example. %C A360371 A permutation of the natural numbers. %C A360371 Among the first number of columns, are there more primes or composites? Of the first 500 columns, 296 are prime, 203 are composite (first column begins with 1). %H A360371 Rémy Sigrist, Table of n, a(n) for n = 1..10011 (first 141 rows flattened) %H A360371 Samuel Harkness, First 500000 terms %H A360371 Samuel Harkness, MATLAB program %H A360371 Rémy Sigrist, PARI program %H A360371 Index entries for sequences that are permutations of the natural numbers %e A360371 The start of the sequence as a triangular array read by rows: %e A360371 1; %e A360371 2, 3; %e A360371 4, 6, 5; %e A360371 7, 9, 10, 8; %e A360371 11, 12, 15, 16, 13; %e A360371 14, 18, 20, 24, 26, 17; %e A360371 19, 21, 25, 32, 39, 34, 22; %e A360371 23, 27, 30, 40, 52, 51, 44, 28; %e A360371 ... %e A360371 Note that each column contains only multiples of the first number in the column. %e A360371 For a(17), note that we are in the second column, so a(17) must be a positive multiple of 3. No numbers can be repeated, and we see that {3, 6, 9, 12, 15} have already been used, and 18 is the smallest unused positive multiple of 3. Therefore, a(17) = 18. %p A360371 b:= proc() false end: %p A360371 T:= proc(n, k) option remember; local j; %p A360371 if {n, k} = {1} then j:=1 %p A360371 elif n=k then for j from T(n-1$2) while b(j) do od %p A360371 else for j from T(n-1, k) by T(k, k) while b(j) do od %p A360371 fi; b(j):=true; j %p A360371 end: %p A360371 seq(seq(T(n, k), k=1..n), n=1..12); # _Alois P. Heinz_, Mar 19 2023 %o A360371 (MATLAB) See Links section. %Y A360371 Cf. A194982, A361251 (inverse). %K A360371 nonn,tabl %O A360371 1,2 %A A360371 _Samuel Harkness_, Mar 17 2023 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE