A173540 Triangle read by rows in which row n lists the proper nondivisors of n, or zero if n <= 2.
0, 0, 2, 3, 2, 3, 4, 4, 5, 2, 3, 4, 5, 6, 3, 5, 6, 7, 2, 4, 5, 6, 7, 8, 3, 4, 6, 7, 8, 9, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5, 7, 8, 9, 10, 11, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 2, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 2, 3, 4, 5, 6, 7
Offset: 1
Examples
If written as a triangle: 0; 0; 2; 3; 2, 3, 4; 4, 5; 2, 3, 4, 5, 6; 3, 5, 6, 7; 2, 4, 5, 6, 7, 8; 3, 4, 6, 7, 8, 9; 2, 3, 4, 5, 6, 7, 8, 9, 10; 5, 7, 8, 9, 10, 11; 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12; 3, 4, 5, 6, 8, 9, 10, 11, 12, 13; 2, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14; 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15;
Links
- Reinhard Zumkeller, Rows n=1..150 of triangle, flattened
Programs
-
Haskell
a173540 n k = a173540_row n !! (k-1) a173540_row n = a173540_tabf !! (n-1) a173540_tabf = [0] : [0] : map (\v -> [w | w <- [2 .. v - 1], mod v w > 0]) [3..] -- Reinhard Zumkeller, Oct 02 2015, Feb 06 2012
-
Mathematica
Join[{0, 0}, Flatten[Table[Complement[Range[n], Divisors[n]], {n, 1, 20}]]] (* Geoffrey Critzer, Dec 13 2014 *)
Comments