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.

A140875 Triangle read by rows: T(n,m) = gcd(n,m+2) - 2*gcd(n,m+1) - gcd(n,m), with diagonal and subdiagonal removed.

Original entry on oeis.org

-2, -4, 0, -4, -4, 0, -6, -2, -2, 2, -6, -2, -6, -6, 2, -8, -2, -2, -2, -2, 4, -8, -4, 0, -8, -4, -4, 4, -10, 0, -6, -4, 0, -6, -4, 6, -10, -4, -2, 0, -10, -8, -2, -4, 6, -12, -2, -2, -2, -2, -2, -2, -2, -2, 8, -12, -2, -4, -10, 0, -12, -4, -6, -8, -6, 8, -14, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, 10
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Jul 21 2008

Keywords

Examples

			{ -2},
{ -4,  0},
{ -4, -4,  0},
{ -6, -2, -2,  2},
{ -6, -2, -6, -6,   2},
{ -8, -2, -2, -2,  -2,  4},
{ -8, -4,  0, -8,  -4, -4,  4},
{-10,  0, -6, -4,   0, -6, -4,  6},
{-10, -4, -2,  0, -10, -8, -2, -4, 6}
		

Crossrefs

Cf. A109004.

Programs

  • Mathematica
    G[n_, m_] := GCD[n, m]
    D2[n_, m_] := If[m + 2 <= n, G[n, m + 2] - 2*G[n, m + 1] - G[n, m], {} ];
    a = Table[Flatten[Table[D2[n, m], {m, 0, n}]], {n, 0, 10}]; Flatten[a]

Extensions

Definition corrected and more terms from Georg Fischer, Jun 08 2023