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.

Showing 1-7 of 7 results.

A228370 Toothpick sequence from a diagram of compositions of the positive integers (see Comments lines for definition).

Original entry on oeis.org

0, 1, 2, 4, 6, 7, 8, 11, 15, 16, 17, 19, 21, 22, 23, 27, 35, 36, 37, 39, 41, 42, 43, 46, 50, 51, 52, 54, 56, 57, 58, 63, 79, 80, 81, 83, 85, 86, 87, 90, 94, 95, 96, 98, 100, 101, 102, 106, 114, 115, 116, 118, 120, 121, 122, 125, 129, 130, 131, 133, 135, 136, 137, 143, 175
Offset: 0

Views

Author

Omar E. Pol, Aug 21 2013

Keywords

Comments

In order to construct this sequence we use the following rules:
We start in the first quadrant of the square grid with no toothpicks, so a(0) = 0.
If n is odd then at stage n we place the smallest possible number of toothpicks of length 1 connected by their endpoints in horizontal direction starting from the grid point (0, (n+1)/2) such that the x-coordinate of the exposed endpoint of the last toothpick is not equal to the x-coordinate of any outer corner of the structure.
If n is even then at stage n we place toothpicks of length 1 connected by their endpoints in vertical direction, starting from the exposed toothpick endpoint, downward up to touch the structure or up to touch the x-axis.
Note that the number of toothpick of added at stage (n+1)/2 in horizontal direction is also A001511(n) and the number of toothpicks added at stage n/2 in vertical direction is also A006519(n).
The sequence gives the number of toothpicks after n stages. A228371 (the first differences) gives the number of toothpicks added at the n-th stage.
After 2^k stages a new section of the structure is completed, so the structure can be interpreted as a diagram of the 2^(k-1) compositions of k in colexicographic order, if k >= 1 (see A228525). The infinite diagram can be interpreted as a table of compositions of the positive integers.
The equivalent sequence for partitions is A225600.

Examples

			For n = 32 the diagram represents the 16 compositions of 5. The structure has 79 toothpicks, so a(32) = 79. Note that the k-th horizontal line segment has length A001511(k) equals the largest part of the k-th region, and the k-th vertical line segment has length A006519(k) equals the number of parts of the k-th region.
----------------------------------------------------------
.                                    Triangle
Compositions                  of compositions (rows)
of 5          Diagram          and regions (columns)
----------------------------------------------------------
.            _ _ _ _ _
5            _        |                                 5
1+4          _|_      |                               1 4
2+3          _  |     |                             2   3
1+1+3        _|_|_    |                           1 1   3
3+2          _    |   |                         3       2
1+2+2        _|_  |   |                       1 2       2
2+1+2        _  | |   |                     2   1       2
1+1+1+2      _|_|_|_  |                   1 1   1       2
4+1          _      | |                 4               1
1+3+1        _|_    | |               1 3               1
2+2+1        _  |   | |             2   2               1
1+1+2+1      _|_|_  | |           1 1   2               1
3+1+1        _    | | |         3       1               1
1+2+1+1      _|_  | | |       1 2       1               1
2+1+1+1      _  | | | |     2   1       1               1
1+1+1+1+1     | | | | |   1 1   1       1               1
.
Illustration of initial terms (n = 1..16):
.
.                                   _        _
.                   _ _    _ _      _ _      _|_
.       _     _     _      _  |     _  |     _  |
.              |     |      | |      | |      | |
.
.       1      2     4      6        7        8
.
.
.                                            _ _
.                        _         _         _
.     _ _ _    _ _ _     _ _ _     _|_ _     _|_ _
.     _        _    |    _    |    _    |    _    |
.     _|_      _|_  |    _|_  |    _|_  |    _|_  |
.     _  |     _  | |    _  | |    _  | |    _  | |
.      | |      | | |     | | |     | | |     | | |
.
.       11       15        16        17        19
.
.
.                                _ _ _ _    _ _ _ _
.             _        _         _          _      |
.    _ _      _ _      _|_       _|_        _|_    |
.    _  |     _  |     _  |      _  |       _  |   |
.    _|_|_    _|_|_    _|_|_     _|_|_      _|_|_  |
.    _    |   _    |   _    |    _    |     _    | |
.    _|_  |   _|_  |   _|_  |    _|_  |     _|_  | |
.    _  | |   _  | |   _  | |    _  | |     _  | | |
.     | | |    | | |    | | |     | | |      | | | |
.
.      21       22       23        27          35
.
		

Crossrefs

Programs

  • Python
    def A228370(n): return sum(((m:=(i>>1)+1)&-m).bit_length() if i&1 else (m:=i>>1)&-m for i in range(1,n+1)) # Chai Wah Wu, Jul 14 2022

Formula

a(n) = sum_{k=1..n} A228371(k), n >= 1.
a(2n-1) = A005187(n) + A006520(n+1) - A006519(n), n >= 1.
a(2n) = A005187(n) + A006520(n+1), n >= 1.

A228349 Triangle read by rows: T(j,k) is the k-th part in nondecreasing order of the j-th region of the set of compositions (ordered partitions) of n in colexicographic order, if 1<=j<=2^(n-1) and 1<=k<=A006519(j).

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 3, 4, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 5, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 3, 4, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Omar E. Pol, Aug 26 2013

Keywords

Comments

Triangle read by rows in which row n lists the A006519(n) elements of the row A001511(n) of triangle A090996, n >= 1.
The equivalent sequence for partitions is A220482.

Examples

			----------------------------------------------------------
.             Diagram                Triangle
Compositions    of            of compositions (rows)
of 5          regions          and regions (columns)
----------------------------------------------------------
.            _ _ _ _ _
5           |_        |                                 5
1+4         |_|_      |                               1 4
2+3         |_  |     |                             2   3
1+1+3       |_|_|_    |                           1 1   3
3+2         |_    |   |                         3       2
1+2+2       |_|_  |   |                       1 2       2
2+1+2       |_  | |   |                     2   1       2
1+1+1+2     |_|_|_|_  |                   1 1   1       2
4+1         |_      | |                 4               1
1+3+1       |_|_    | |               1 3               1
2+2+1       |_  |   | |             2   2               1
1+1+2+1     |_|_|_  | |           1 1   2               1
3+1+1       |_    | | |         3       1               1
1+2+1+1     |_|_  | | |       1 2       1               1
2+1+1+1     |_  | | | |     2   1       1               1
1+1+1+1+1   |_|_|_|_|_|   1 1   1       1               1
.
Written as an irregular triangle in which row n lists the parts of the n-th region the sequence begins:
1;
1,2;
1;
1,1,2,3;
1;
1,2;
1;
1,1,1,1,2,2,3,4;
1;
1,2;
1;
1,1,2,3;
1;
1,2;
1;
1,1,1,1,1,1,1,1,2,2,2,2,3,3,4,5;
...
Alternative interpretation of this sequence:
Triangle read by rows in which row r lists the regions of the last section of the set of compositions of r:
[1];
[1,2];
[1],[1,1,2,3];
[1],[1,2],[1],[1,1,1,1,2,2,3,4];
[1],[1,2],[1],[1,1,2,3],[1],[1,2],[1],[1,1,1,1,1,1,1,1,2,2,2,2,3,3,4,5];
		

Crossrefs

Main triangle: Right border gives A001511. Row j has length A006519(j). Row sums give A038712.

Programs

  • Mathematica
    Table[Map[Length@ TakeWhile[IntegerDigits[#, 2], # == 1 &] &, Range[2^(# - 1), 2^# - 1]] &@ IntegerExponent[2 n, 2], {n, 32}] // Flatten (* Michael De Vlieger, May 23 2017 *)

A228347 Triangle of regions and compositions of the positive integers (see Comments lines for definition).

Original entry on oeis.org

1, 1, 2, 0, 0, 1, 1, 1, 2, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Omar E. Pol, Aug 26 2013

Keywords

Comments

Triangle read by rows in which row n lists A129760(n) zeros followed by the A006519(n) elements of the row A001511(n) of triangle A090996, n >= 1.
The equivalent sequence for partitions is A186114.

Examples

			----------------------------------------------------------
.             Diagram                Triangle
Compositions    of            of compositions (rows)
of 5          regions          and regions (columns)
----------------------------------------------------------
.            _ _ _ _ _
5           |_        |                                 5
1+4         |_|_      |                               1 4
2+3         |_  |     |                             2 0 3
1+1+3       |_|_|_    |                           1 1 0 3
3+2         |_    |   |                         3 0 0 0 2
1+2+2       |_|_  |   |                       1 2 0 0 0 2
2+1+2       |_  | |   |                     2 0 1 0 0 0 2
1+1+1+2     |_|_|_|_  |                   1 1 0 1 0 0 0 2
4+1         |_      | |                 4 0 0 0 0 0 0 0 1
1+3+1       |_|_    | |               1 3 0 0 0 0 0 0 0 1
2+2+1       |_  |   | |             2 0 2 0 0 0 0 0 0 0 1
1+1+2+1     |_|_|_  | |           1 1 0 2 0 0 0 0 0 0 0 1
3+1+1       |_    | | |         3 0 0 0 1 0 0 0 0 0 0 0 1
1+2+1+1     |_|_  | | |       1 2 0 0 0 1 0 0 0 0 0 0 0 1
2+1+1+1     |_  | | | |     2 0 1 0 0 0 1 0 0 0 0 0 0 0 1
1+1+1+1+1   |_|_|_|_|_|   1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 1
.
For the positive integer k consider the first 2^(k-1) rows of triangle, as shown below. The positive terms of the n-th row are the parts of the n-th region of the diagram of regions of the set of compositions of k. The positive terms of the n-th column are the parts of the n-th composition of k, with compositions in colexicographic order.
Triangle begins:
1;
1,2;
0,0,1;
1,1,2,3;
0,0,0,0,1;
0,0,0,0,1,2;
0,0,0,0,0,0,1;
1,1,1,1,2,2,3,4;
0,0,0,0,0,0,0,0,1;
0,0,0,0,0,0,0,0,1,2;
0,0,0,0,0,0,0,0,0,0,1;
0,0,0,0,0,0,0,0,1,1,2,3;
0,0,0,0,0,0,0,0,0,0,0,0,1;
0,0,0,0,0,0,0,0,0,0,0,0,1,2;
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1;
1,1,1,1,1,1,1,1,2,2,2,2,3,3,4,5;
...
		

Crossrefs

Mirror of A228348. Column 1 is A036987. Also column 1 gives A209229, n >= 1. Right border gives A001511. Positive terms give A228349.

A228348 Triangle of regions and compositions of the positive integers (see Comments lines for definition).

Original entry on oeis.org

1, 2, 1, 1, 0, 0, 3, 2, 1, 1, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 4, 3, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Omar E. Pol, Aug 21 2013

Keywords

Comments

Triangle read by rows in which row n lists the A006519(n) elements of the row A001511(n) of triangle A065120 followed by A129760(n) zeros, n >= 1.
The equivalent sequence for integer partitions is A193870.

Examples

			----------------------------------------------------------
.             Diagram                Triangle
Compositions    of            of compositions (rows)
of 5          regions          and regions (columns)
----------------------------------------------------------
.            _ _ _ _ _
5           |_        |                                 5
1+4         |_|_      |                               1 4
2+3         |_  |     |                             2 0 3
1+1+3       |_|_|_    |                           1 1 0 3
3+2         |_    |   |                         3 0 0 0 2
1+2+2       |_|_  |   |                       1 2 0 0 0 2
2+1+2       |_  | |   |                     2 0 1 0 0 0 2
1+1+1+2     |_|_|_|_  |                   1 1 0 1 0 0 0 2
4+1         |_      | |                 4 0 0 0 0 0 0 0 1
1+3+1       |_|_    | |               1 3 0 0 0 0 0 0 0 1
2+2+1       |_  |   | |             2 0 2 0 0 0 0 0 0 0 1
1+1+2+1     |_|_|_  | |           1 1 0 2 0 0 0 0 0 0 0 1
3+1+1       |_    | | |         3 0 0 0 1 0 0 0 0 0 0 0 1
1+2+1+1     |_|_  | | |       1 2 0 0 0 1 0 0 0 0 0 0 0 1
2+1+1+1     |_  | | | |     2 0 1 0 0 0 1 0 0 0 0 0 0 0 1
1+1+1+1+1   |_|_|_|_|_|   1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 1
.
For the positive integer k consider the first 2^(k-1) rows of triangle, as shown below. The positive terms of the n-th row are the parts of the n-th region of the diagram of regions of the set of compositions of k. The positive terms of the n-th diagonal are the parts of the n-th composition of k, with compositions in colexicographic order.
Triangle begins:
1;
2,1;
1,0,0;
3,2,1,1;
1,0,0,0,0;
2,1,0,0,0,0;
1,0,0,0,0,0,0;
4,3,2,2,1,1,1,1;
1,0,0,0,0,0,0,0,0;
2,1,0,0,0,0,0,0,0,0;
1,0,0,0,0,0,0,0,0,0,0;
3,2,1,1,0,0,0,0,0,0,0,0;
1,0,0,0,0,0,0,0,0,0,0,0,0;
2,1,0,0,0,0,0,0,0,0,0,0,0,0;
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
5,4,3,3,2,2,2,2,1,1,1,1,1,1,1,1;
...
		

Crossrefs

Mirror of A228347. Column 1 is A001511. Right border gives A036987. Also right border gives A209229, n >= 1. Positive terms give A228350.

A228527 Triangle read by rows: T(n,k) is the sum of all parts of size k of the n-th section of the set of compositions ( ordered partitions) of any integer >= n.

Original entry on oeis.org

1, 1, 2, 3, 2, 3, 7, 6, 3, 4, 16, 14, 9, 4, 5, 36, 32, 21, 12, 5, 6, 80, 72, 48, 28, 15, 6, 7, 176, 160, 108, 64, 35, 18, 7, 8, 384, 352, 240, 144, 80, 42, 21, 8, 9, 832, 768, 528, 320, 180, 96, 49, 24, 9, 10, 1792, 1664, 1152, 704, 400, 216, 112, 56, 27, 10, 11
Offset: 1

Views

Author

Omar E. Pol, Sep 01 2013

Keywords

Comments

In other words, T(n,k) is the sum of all parts of size k of the last section of the set of compositions (ordered partitions) of n.
For the definition of "section of the set of compositions" see A228524.
The equivalent sequence for partitions is A207383.

Examples

			Illustration (using the colexicograpical order of compositions A228525) of the four sections of the set of compositions of 4:
.
.            1      2        3          4
.            _      _        _          _
.           |_|   _| |      | |        | |
.                |_ _|   _ _| |        | |
.                       |_|   |        | |
.                       |_ _ _|   _ _ _| |
.                                |_| |   |
.                                |_ _|   |
.                                |_|     |
.                                |_ _ _ _|
.
For n = 4 and k = 2, T(4,2) = 6 because there are 3 parts of size 2 in the last section of the set of compositions of 4, so T(4,2) = 3*2 = 6, see below:
--------------------------------------------------------
.                         The last section      Sum of
.   Composition of 4        of the set of      parts of
.                         compositions of 4     size k
. --------------------   -------------------
.            Diagram             Diagram    k = 1 2 3 4
. ------------------------------------------------------
.            _ _ _ _                    _
.  1+1+1+1  |_| | | |         1        | |      1 0 0 0
.    2+1+1  |_ _| | |         1        | |      1 0 0 0
.    1+2+1  |_|   | |         1        | |      1 0 0 0
.      3+1  |_ _ _| |         1   _ _ _| |      1 0 0 0
.    1+1+2  |_| |   |     1+1+2  |_| |   |      2 2 0 0
.      2+2  |_ _|   |       2+2  |_ _|   |      0 4 0 0
.      1+3  |_|     |       1+3  |_|     |      1 0 3 0
.        4  |_ _ _ _|         4  |_ _ _ _|      0 0 0 4
.                                              ---------
.                      Column sums give row 4:  7,6,3,4
.
Triangle begins:
1;
1,       2;
3,       2,    3;
7,       6,    3,   4;
16,     14,    9,   4,   5;
36,     32,   21,  12,   5,   6;
80,     72,   48,  28,  15,   6,   7;
176,   160,  108,  64,  35,  18,   7,  8;
384,   352,  240, 144,  80,  42,  21,  8,  9;
832,   768,  528, 320, 180,  96,  49, 24,  9, 10;
1792, 1664, 1152, 704, 400, 216, 112, 56, 27, 10, 11;
...
		

Crossrefs

Formula

T(n,k) = k*A045891(n-k) = k*A228524(n,k), n>=1, 1<=k<=n.

A228524 Triangle read by rows: T(n,k) = total number of occurrences of parts k in the n-th section of the set of compositions (ordered partitions) of any integer >= n.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 7, 3, 1, 1, 16, 7, 3, 1, 1, 36, 16, 7, 3, 1, 1, 80, 36, 16, 7, 3, 1, 1, 176, 80, 36, 16, 7, 3, 1, 1, 384, 176, 80, 36, 16, 7, 3, 1, 1, 832, 384, 176, 80, 36, 16, 7, 3, 1, 1, 1792, 832, 384, 176, 80, 36, 16, 7, 3, 1, 1, 3840, 1792, 832, 384, 176, 80, 36, 16, 7, 3, 1, 1
Offset: 1

Views

Author

Omar E. Pol, Aug 26 2013

Keywords

Comments

Here, define "n-th section of the set of compositions of any integer >= n" to be the set formed by all parts that occur as a result of taking all compositions (ordered partitions) of n and then remove all parts of the compositions of n-1, if n >= 1. Hence the n-th section of the set of compositions of any integer >= n is also the last section of the set of compositions of n. Note that by definition the ordering of compositions is not relevant. For the visualization of the sections here we use a dissection of the diagram of compositions of n in colexicographic order, see example.
The equivalent sequence for partitions is A182703.
Row n lists the first n terms of A045891 in decreasing order.

Examples

			Illustration (using the colexicograpical order of compositions A228525) of the four sections of the set of compositions of 4, also the first four sections of the set of compositions of any integer >= 4:
.
.            1      2        3          4
.            _      _        _          _
.           |_|   _| |      | |        | |
.                |_ _|   _ _| |        | |
.                       |_|   |        | |
.                       |_ _ _|   _ _ _| |
.                                |_| |   |
.                                |_ _|   |
.                                |_|     |
.                                |_ _ _ _|
.
For n = 4 and k = 2, T(4,2) = 3 because there are 3 parts of size 2 in all compositions of 4, see below:
--------------------------------------------------------
.                         The last section    Number of
.   Composition of 4        of the set of      parts of
.                         compositions of 4     size k
. --------------------   -------------------
.            Diagram             Diagram    k = 1 2 3 4
. ------------------------------------------------------
.            _ _ _ _                    _
.  1+1+1+1  |_| | | |         1        | |      1 0 0 0
.    2+1+1  |_ _| | |         1        | |      1 0 0 0
.    1+2+1  |_|   | |         1        | |      1 0 0 0
.      3+1  |_ _ _| |         1   _ _ _| |      1 0 0 0
.    1+1+2  |_| |   |     1+1+2  |_| |   |      2 1 0 0
.      2+2  |_ _|   |       2+2  |_ _|   |      0 2 0 0
.      1+3  |_|     |       1+3  |_|     |      1 0 1 0
.        4  |_ _ _ _|         4  |_ _ _ _|      0 0 0 1
.                                              ---------
.                      Column sums give row 4:  7,3,1,1
.
Triangle begins:
1;
1,       1;
3,       1,   1;
7,       3,   1,   1;
16,      7,   3,   1,  1;
36,     16,   7,   3,  1,  1;
80,     36,  16,   7,  3,  1,   1;
176,    80,  36,  16,  7,  3,   1,  1;
384,   176,  80,  36, 16,  7,   3,  1,  1;
832,   384, 176,  80, 36, 16,   7,  3,  1,  1;
1792,  832, 384, 176, 80, 36,  16,  7,  3,  1, 1;
3840, 1792, 832, 384,176, 80,  36, 16,  7,  3, 1, 1;
8192, 3840,1792, 832,384,176,  80, 36, 16,  7, 3, 1, 1;
...
		

Crossrefs

Row sums give A045623. Every column gives A045891.

Formula

T(n,k) = A045891(n-k), n >= 1, 1<=k<=n.

A244968 Area between two valleys at height 0 under the infinite Dyck path related to partitions in which the k-th ascending line segment has A141285(k) steps and the k-th descending line segment has A194446(k) steps, k >= 1, multiplied by 2.

Original entry on oeis.org

1, 4, 9, 28, 54, 151
Offset: 1

Views

Author

Omar E. Pol, Nov 08 2014

Keywords

Examples

			For k = 6, the diagram 1 represents the partitions of 6. The diagram 2 is a minimalist version of the structure which does not contain the axes [X, Y], see below:
.
.  j     Diagram 1        Partitions          Diagram 2
.      _ _ _ _ _ _                           _ _ _ _ _ _
. 11  |_ _ _      |       6                  _ _ _      |
. 10  |_ _ _|_    |       3+3                _ _ _|_    |
.  9  |_ _    |   |       4+2                _ _    |   |
.  8  |_ _|_ _|_  |       2+2+2              _ _|_ _|_  |
.  7  |_ _ _    | |       5+1                _ _ _    | |
.  6  |_ _ _|_  | |       3+2+1              _ _ _|_  | |
.  5  |_ _    | | |       4+1+1              _ _    | | |
.  4  |_ _|_  | | |       2+2+1+1            _ _|_  | | |
.  3  |_ _  | | | |       3+1+1+1            _ _  | | | |
.  2  |_  | | | | |       2+1+1+1+1          _  | | | | |
.  1  |_|_|_|_|_|_|       1+1+1+1+1+1         | | | | | |
.
Then we use the elements from the above diagram to draw an infinite Dyck path in which the j-th odd-indexed segment has A141285(j) up-steps and the j-th even-indexed segment has A194446(j) down-steps.
For the illustration of initial terms we use two opposite Dyck paths, as shown below:
11 ...........................................................
.                                                            /\
.                                                           /
.                                                          /
7 ..................................                      /
.                                  /\                    /
5 ....................            /  \                /\/
.                    /\          /    \          /\  /
3 ..........        /  \        /      \        /  \/
2 .....    /\      /    \    /\/        \      /
1 ..  /\  /  \  /\/      \  /            \  /\/
0  /\/  \/    \/          \/              \/
.  \/\  /\    /\          /\              /\
.     \/  \  /  \/\      /  \            /  \/\
.   1      \/      \    /    \/\        /      \
.      4            \  /        \      /        \  /\
.           9        \/          \    /          \/  \
.                                 \  /                \/\
.                    28            \/                    \
.                                                         \
.                                  54                      \
.                                                           \
.                                                            \/
.
The diagram is infinite. Note that the n-th largest peak between two valleys at height 0 is also the partition number A000041(n).
Calculations:
a(1) = 1.
a(2) = 2^2 = 4.
a(3) = 3^2 = 9.
a(4) = 2^2-1^2+5^2 = 4-1+25 = 28.
a(5) = 3^2-2^2+7^2 = 9-4+49 = 54.
a(6) = 2^2-1^2+5^2-3^2+6^2-5^2+11^2 = 4-1+25-9+36-25+121 = 151.
		

Crossrefs

Showing 1-7 of 7 results.