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.

A195040 Square array read by antidiagonals with T(n,k) = k*n^2/4+(k-4)*((-1)^n-1)/8, n>=0, k>=0.

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 3, 2, 1, 0, 1, 4, 5, 3, 1, 0, 0, 7, 8, 7, 4, 1, 0, 1, 9, 13, 12, 9, 5, 1, 0, 0, 13, 18, 19, 16, 11, 6, 1, 0, 1, 16, 25, 27, 25, 20, 13, 7, 1, 0, 0, 21, 32, 37, 36, 31, 24, 15, 8, 1, 0, 1, 25, 41, 48, 49, 45, 37, 28, 17, 9, 1, 0
Offset: 0

Views

Author

Omar E. Pol, Sep 27 2011

Keywords

Comments

Also, if k >= 2 and m = 2*k, then column k lists the numbers of the form k*n^2 and the centered m-gonal numbers interleaved.
For k >= 3, this is also a table of concentric polygonal numbers. Column k lists the concentric k-gonal numbers.
It appears that the first differences of column k are the numbers that are congruent to {1, k-1} mod k, if k >= 3.

Examples

			Array begins:
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0, ...
  1,   1,   1,   1,   1,   1,   1,   1,   1,   1, ...
  0,   1,   2,   3,   4,   5,   6,   7,   8,   9, ...
  1,   3,   5,   7,   9,  11,  13,  15,  17,  19, ...
  0,   4,   8,  12,  16,  20,  24,  28,  32,  36, ...
  1,   7,  13,  19,  25,  31,  37,  43,  49,  55, ...
  0,   9,  18,  27,  36,  45,  54,  63,  72,  81, ...
  1,  13,  25,  37,  49,  61,  73,  85,  97, 109, ...
  0,  16,  32,  48,  64,  80,  96, 112, 128, 144, ...
  1,  21,  41,  61,  81, 101, 121, 141, 161, 181, ...
  0,  25,  50,  75, 100, 125, 150, 175, 200, 225, ...
  ...
		

Crossrefs

Rows n: A000004 (n=0), A000012 (n=1), A001477 (n=2), A005408 (n=3), A008586 (n=4), A016921 (n=5), A008591 (n=6), A017533 (n=7), A008598 (n=8), A215145 (n=9), A008607 (n=10).
Columns k: A000035 (k=0), A004652 (k=1), A000982 (k=2), A077043 (k=3), A000290 (k=4), A032527 (k=5), A032528 (k=6), A195041 (k=7), A077221 (k=8), A195042 (k=9), A195142 (k=10), A195043 (k=11), A195143 (k=12), A195045 (k=13), A195145 (k=14), A195046 (k=15), A195146 (k=16), A195047 (k=17), A195147 (k=18), A195048 (k=19), A195148 (k=20), A195049 (k=21), A195149 (k=22), A195058 (k=23), A195158 (k=24).

Programs

  • GAP
    nmax:=13;; T:=List([0..nmax],n->List([0..nmax],k->k*n^2/4+(k-4)*((-1)^n-1)/8));; b:=List([2..nmax],n->OrderedPartitions(n,2));;
    a:=Flat(List([1..Length(b)],i->List([1..Length(b[i])],j->T[b[i][j][2]][b[i][j][1]]))); # Muniru A Asiru, Jul 19 2018
  • Maple
    A195040 := proc(n,k)
            k*n^2/4+((-1)^n-1)*(k-4)/8 ;
    end proc:
    for d from 0 to 12 do
            for k from 0 to d do
                    printf("%d,",A195040(d-k,k)) ;
            end do:
    end do; # R. J. Mathar, Sep 28 2011
  • Mathematica
    t[n_, k_] := k*n^2/4+(k-4)*((-1)^n-1)/8; Flatten[ Table[ t[n-k, k], {n, 0, 11}, {k, 0, n}]] (* Jean-François Alcover, Dec 14 2011 *)