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.

A319895 a(n) is the number of partitions of n into consecutive parts, plus the total number of parts in those partitions.

Original entry on oeis.org

2, 2, 5, 2, 5, 6, 5, 2, 9, 7, 5, 6, 5, 7, 15, 2, 5, 11, 5, 8, 16, 7, 5, 6, 11, 7, 16, 10, 5, 17, 5, 2, 16, 7, 19, 15, 5, 7, 16, 8, 5, 19, 5, 11, 32, 7, 5, 6, 13, 13, 16, 11, 5, 21, 22, 10, 16, 7, 5, 21, 5, 7, 34, 2, 22, 23, 5, 11, 16, 21, 5, 16, 5, 7, 33, 11, 25, 24, 5, 8, 26, 7, 5, 23, 22, 7, 16, 14, 5
Offset: 1

Views

Author

Omar E. Pol, Sep 30 2018

Keywords

Comments

a(n) is also the total length of all pairs of orthogonal line segments whose horizontal and upper parts are in the n-th row of the diagram associated to partitions into consecutive parts as shown in the Example section.
a(n) = 2 iff n is a power of 2.
a(n) = 5 iff n is an odd prime.

Examples

			Illustration of a diagram of partitions into consecutive parts (first 28 rows):
.                                                           _
.                                                         _|1
.                                                       _|2 _
.                                                     _|3  |2
.                                                   _|4   _|1
.                                                 _|5    |3 _
.                                               _|6     _|2|3
.                                             _|7      |4  |2
.                                           _|8       _|3 _|1
.                                         _|9        |5  |4 _
.                                       _|10        _|4  |3|4
.                                     _|11         |6   _|2|3
.                                   _|12          _|5  |5  |2
.                                 _|13           |7    |4 _|1
.                               _|14            _|6   _|3|5 _
.                             _|15             |8    |6  |4|5
.                           _|16              _|7    |5  |3|4
.                         _|17               |9     _|4 _|2|3
.                       _|18                _|8    |7  |6  |2
.                     _|19                 |10     |6  |5 _|1
.                   _|20                  _|9     _|5  |4|6 _
.                 _|21                   |11     |8   _|3|5|6
.               _|22                    _|10     |7  |7  |4|5
.             _|23                     |12      _|6  |6  |3|4
.           _|24                      _|11     |9    |5 _|2|3
.         _|25                       |13       |8   _|4|7  |2
.       _|26                        _|12      _|7  |8  |6 _|1
.     _|27                         |14       |10   |7  |5|7 _
.    |28                           |13       |9    |6  |4|6|7
...
For n = 21 we have that there are four partitions of 21 into consecutive parts, they are [21], [11, 10], [8, 7, 6], [6, 5, 4, 3, 2, 1]. The total number of parts is 1 + 2 + 3 + 6 = 12. Therefore the number of partitions plus the total number of parts is 4 + 12 = 16, so a(21) = 16.
On the other hand, in the above diagram there are four pairs of orthogonal line segments whose horizontal upper part are located on the 21st row, as shown below:
.                   _                     _       _         _
.                  |21                   |11     |8        |6
.                                        |10     |7        |5
.                                                |6        |4
.                                                          |3
.                                                          |2
.                                                          |1
.
The four horizontal line segments have length 1, and the vertical line segments have lengths 1, 2, 3, 6 respectively. Therefore the total length of the line segments is 1 + 1 + 1 + 1 + 1 + 2 + 3 + 6 = 16, so a(21) = 16.
		

Crossrefs

For tables of partitions into consecutive parts see A286000 and A286001.

Programs

Formula

a(n) = A001227(n) + A204217(n).

Extensions

Term a(87) corrected from 6 to 16 by Antti Karttunen, Dec 06 2021