cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

Peter Luschny, Dec 26 2024

Keywords

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]
		

Crossrefs

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

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.