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.

A308230 Irregular triangle: row n shows the alternating sums of partitions of n when the parts are arranged in nonincreasing order and the partitions are arranged lexicographically from [n] to [1,1,1,...,1].

Original entry on oeis.org

1, 2, 0, 3, 1, 1, 4, 2, 0, 2, 0, 5, 3, 1, 3, 1, 1, 1, 6, 4, 2, 4, 0, 2, 2, 2, 0, 2, 0, 7, 5, 3, 5, 1, 3, 3, 1, 3, 1, 3, 1, 1, 1, 1, 8, 6, 4, 6, 2, 4, 4, 0, 2, 4, 2, 4, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 9, 7, 5, 7, 3, 5, 5, 1, 3, 5, 3, 5, 1, 3, 1, 3, 3, 3, 3, 1
Offset: 1

Views

Author

Clark Kimberling, May 17 2019

Keywords

Comments

Row n consists of A000041(n) numbers, for n >= 1. The numbers in row n have the parity of n. Regarding row sums, see Comments at A066897.

Examples

			First 8 rows:
  1
  2  0
  3  1  1
  4  2  0  2  0
  5  3  1  3  1  1  1
  6  4  2  4  0  2  2  2  0  2  0
  7  5  3  5  1  3  3  1  3  1  3  1  1  1  1
  8  6  4  6  2  4  4  0  2  4  2  4  2  0  2  2  2  0  2  0  2  0
Row 5 comes from arranging the 7 partitions of 5 is this order:
[5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], [1,1,1,1,1] and taking alternating sums: 5, 4-1, 3-1, 3-1+1, 2-2+1, 2-1+1-1, 1-1+1-1.
		

Crossrefs

Programs

  • Mathematica
    r[n_] := Map[Total[Map[Total, {Take[##], Drop[##]} &[#, {1, -1, 2}] {1, -1}]] &, IntegerPartitions[n]]; Column[Table[r[n], {n, 10}]] (* Peter J. C. Moses, May 15 2019 *)