login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Table read by row: T(n, k) = Sum_{j=0..k} A217831(n, j). Partial row sums of Euclid's triangle.
1

%I #10 Dec 26 2024 16:36:09

%S 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,

%T 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,

%U 2,3,4,5,6,7,8,9,10,10,0,1,1,1,1,2,2,3,3,3,3,4,4

%N Table read by row: T(n, k) = Sum_{j=0..k} A217831(n, j). Partial row sums of Euclid's triangle.

%F Prepending [0, 3] and setting offset = 0 sequence A092790 becomes the row sums.

%e Triangle starts:

%e [0] [0]

%e [1] [1, 2]

%e [2] [0, 1, 1]

%e [3] [0, 1, 2, 2]

%e [4] [0, 1, 1, 2, 2]

%e [5] [0, 1, 2, 3, 4, 4]

%e [6] [0, 1, 1, 1, 1, 2, 2]

%e [7] [0, 1, 2, 3, 4, 5, 6, 6]

%e [8] [0, 1, 1, 2, 2, 3, 3, 4, 4]

%e [9] [0, 1, 2, 2, 3, 4, 4, 5, 6, 6]

%e [10] [0, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4]

%p 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);

%t aRow[n_] := Accumulate[Table[If[CoprimeQ[n, k], 1, 0], {k, 0, n}]];

%t Table[aRow[n], {n, 0, 10}] // Flatten

%Y Cf. A000010 (subdiagonal), A217831 (Euclid's triangle), A092790 (row sums)

%K nonn,tabl

%O 0,3

%A _Peter Luschny_, Dec 26 2024