A101513 a(1) = 1, a(2) = 2, a(3) = 3; triangle where n-th row has lowest n positive integers not yet in the sequence such that each integer has a prime divisor in common with at least one element of the (n-1)th row.
1, 2, 3, 4, 6, 8, 9, 10, 12, 14, 5, 7, 15, 16, 18, 20, 21, 22, 24, 25, 26, 11, 13, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 17, 19, 45, 46, 48, 49, 50, 51, 52, 23, 54, 55, 56, 57, 58, 60, 62, 63, 64, 29, 31, 65, 66, 68, 69, 70, 72, 74, 75, 76, 37, 77, 78, 80, 81, 82
Offset: 1
Examples
Triangle begins: 1; 2, 3; 4, 6, 8; 9, 10, 12, 14; 5, 7, 15, 16, 18; 20, 21, 22, 24, 25, 26; 11, 13, 27, 28, 30, 32, 33; ... 7 is in the 5th row because it does not occur earlier and 14 is in the 4th row.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..11628 (rows 1 <= n <= 150).
Programs
-
Mathematica
f[w_List] := Block[{k = 4, m = {}}, Do[While[Nand[FreeQ[Join[w, m], k], AnyTrue[Last@ w, GCD[k, #] > 1 &]], k++]; AppendTo[m, k], {i, Length@ w + 1}]; m]; Nest[Append[#, f@ #] &, Table[n + k - 1, {n, 2}, {k, n}], 10] // Flatten (* Michael De Vlieger, Sep 25 2017 *)
Extensions
More terms from Joshua Zucker, May 20 2006
Comments