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.

A140682 Triangle T(n,k) = gcd(n,k)-binomial(n,k), 0<=k<=n.

Original entry on oeis.org

-1, 0, 0, 1, -1, 1, 2, -2, -2, 2, 3, -3, -4, -3, 3, 4, -4, -9, -9, -4, 4, 5, -5, -13, -17, -13, -5, 5, 6, -6, -20, -34, -34, -20, -6, 6, 7, -7, -26, -55, -66, -55, -26, -7, 7, 8, -8, -35, -81, -125, -125, -81, -35, -8, 8, 9, -9, -43, -119, -208, -247, -208, -119, -43, -9, 9
Offset: 0

Views

Author

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

Keywords

Comments

Row sums are -1, 0, 1, 0, -4, -18, -43, -108, -228, -482, -987...

Examples

			-1;
0, 0;
1, -1, 1;
2, -2, -2, 2;
3, -3, -4, -3, 3;
4, -4, -9, -9, -4, 4;
5, -5, -13, -17, -13, -5, 5;
6, -6, -20, -34, -34, -20, -6, 6;
7, -7, -26, -55, -66, -55, -26, -7, 7;
8, -8, -35, -81, -125, -125, -81, -35, -8, 8;
9, -9, -43, -119, -208, -247, -208, -119, -43, -9, 9;
		

Crossrefs

Cf. A109004.

Programs

  • Maple
    A140682 := proc(n,k)
        igcd(n,k)-binomial(n,k) ;
    end proc: # R. J. Mathar, Jan 17 2013
  • Mathematica
    Clear[p, x, n] p[x_, n_] = Sum[(GCD[n, i] - Binomial[n, i])*x^i, {i, 0, n}]; Table[ExpandAll[p[x, n]], {n, 1, 10}]; a = Table[CoefficientList[p[x, n], x], {n, 1, 10}]; Flatten[a]

Formula

T(n,k) = T(n,n-k).
T(n,k) = A109004(n,k)-A007318(n,k). - R. J. Mathar, Jan 17 2013

Extensions

New name, editing, and missing leading terms added. - R. J. Mathar, Jan 17 2013