A378068 Table read by row: T(n, k) = Sum_{j=0..k} A217831(n, j). Partial row sums of Euclid's triangle.
0, 1, 2, 0, 1, 1, 0, 1, 2, 2, 0, 1, 1, 2, 2, 0, 1, 2, 3, 4, 4, 0, 1, 1, 1, 1, 2, 2, 0, 1, 2, 3, 4, 5, 6, 6, 0, 1, 1, 2, 2, 3, 3, 4, 4, 0, 1, 2, 2, 3, 4, 4, 5, 6, 6, 0, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4
Offset: 0
Examples
Triangle starts: [0] [0] [1] [1, 2] [2] [0, 1, 1] [3] [0, 1, 2, 2] [4] [0, 1, 1, 2, 2] [5] [0, 1, 2, 3, 4, 4] [6] [0, 1, 1, 1, 1, 2, 2] [7] [0, 1, 2, 3, 4, 5, 6, 6] [8] [0, 1, 1, 2, 2, 3, 3, 4, 4] [9] [0, 1, 2, 2, 3, 4, 4, 5, 6, 6] [10] [0, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4]
Programs
-
Maple
aRow := n -> local k; ListTools:-PartialSums([seq(if NumberTheory:-AreCoprime(n, k) then 1 else 0 fi, k = 0..n)]): seq(print(aRow(n)), n = 0..10);
-
Mathematica
aRow[n_] := Accumulate[Table[If[CoprimeQ[n, k], 1, 0], {k, 0, n}]]; Table[aRow[n], {n, 0, 10}] // Flatten
Formula
Prepending [0, 3] and setting offset = 0 sequence A092790 becomes the row sums.