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.

A335616 a(n) is twice the number of partitions of n into consecutive parts, minus the number of partitions of n into consecutive parts that contain 1 as a part.

This page as a plain text file.
%I A335616 #197 Sep 03 2023 18:20:38
%S A335616 1,2,3,2,4,3,4,2,6,3,4,4,4,4,7,2,4,6,4,4,7,4,4,4,6,4,8,3,4,8,4,2,8,4,
%T A335616 8,5,4,4,8,4,4,8,4,4,11,4,4,4,6,6,8,4,4,8,7,4,8,4,4,8,4,4,12,2,8,7,4,
%U A335616 4,8,8,4,6,4,4,12,4,8,7,4,4,10,4,4,8,8,4,8,4,4,12,7,4,8,4,8,4,4,6,12,6
%N A335616 a(n) is twice the number of partitions of n into consecutive parts, minus the number of partitions of n into consecutive parts that contain 1 as a part.
%C A335616 a(n) is twice the number of partitions of n into consecutive parts, minus the number of partitions of n into distinct parts such that the greatest part equals the number of all parts.
%C A335616 For a visualization of the sequence, consider a diagram formed for infinitely many double staircases as shown in the Example section.
%C A335616 a(n) is the number of horizontal line segments (or steps) that are only in the n-th level of the structure, starting from the top.
%C A335616 The total length of all vertical line segments that are adjacent and below the steps of the n-th level of the structure equals twice the total number of parts in all partitions of n into consecutive parts.
%C A335616 Note that in the n-th double staircase the top step is located in the level A000217(n), n >= 1, every horizontal line segment has length 1, and every vertical line segment has length n.
%C A335616 a(n) is also the number of horizontal line segments of length 1 or 2 in the n-th level of the similar diagram used to represent the sequence A237593 and other isosceles triangles related to A237593.
%C A335616 a(n) is odd if and only if n is a nonzero triangular number (A000217).
%C A335616 Double-staircases theorem of the sum of divisors: the total number of steps from level n to the top of all the odd-indexed double staircases that have at least one step in the level n, minus the total number of steps from the level n to the top of all the even-indexed double staircases that have at least one step in the level n equals sigma(n) = A000203(n).
%C A335616 The above theorem shows a symmetry of sigma in accordance with the symmetric Dyck Paths described in A237593 and with the pyramid described in A245092.
%C A335616 For the connection with the partitions into consecutive integers see also A196020, since we can see here that A196020(n,k) is also the number of steps in the first n levels of the k-th double staircase that has at least one step in the n-th level of the diagram, otherwise A196020(n,k) = 0. Also, it is the width of the mentioned staircase in n-th level of the diagram.
%C A335616 It appears that odd primes (A065091) are also the levels where there are steps in the staircases 1 and 2, but no step from other staircases.
%C A335616 It appears that powers of 2 (A000079) are also the levels where there are only one or two steps in total.
%C A335616 This sequence could be related to several other sequences (see the Crossrefs section of A262626).
%H A335616 Paolo Xausa, <a href="/A335616/b335616.txt">Table of n, a(n) for n = 1..10000</a>
%F A335616 a(n) = 2*A001227(n) - A010054(n).
%F A335616 a(n) = A054844(n) - A010054(n).
%F A335616 a(n) = 2*A136107(n) + A010054(n). - _Omar E. Pol_, Nov 27 2020
%F A335616 G.f.: Sum_{n >= 1} x^(n*(n+1)/2)*(1 + x^n)/(1 - x^n). Cf. A000005 with g.f. Sum_{n >= 1} x^(n^2)*(1 + x^n)/(1 - x^n). - _Peter Bala_, Jan 20 2021
%e A335616 Illustration of initial terms:
%e A335616 n   a(n)                               Diagram
%e A335616                                           _
%e A335616 1     1                                 _|1|_
%e A335616 2     2                               _|1 _ 1|_
%e A335616 3     3                             _|1  |1|  1|_
%e A335616 4     2                           _|1   _| |_   1|_
%e A335616 5     4                         _|1    |1 _ 1|    1|_
%e A335616 6     3                       _|1     _| |1| |_     1|_
%e A335616 7     4                     _|1      |1  | |  1|      1|_
%e A335616 8     2                   _|1       _|  _| |_  |_       1|_
%e A335616 9     6                 _|1        |1  |1 _ 1|  1|        1|_
%e A335616 10    3               _|1         _|   | |1| |   |_         1|_
%e A335616 11    4             _|1          |1   _| | | |_   1|          1|_
%e A335616 12    4           _|1           _|   |1  | |  1|   |_           1|_
%e A335616 13    4         _|1            |1    |  _| |_  |    1|            1|_
%e A335616 14    4       _|1             _|    _| |1 _ 1| |_    |_             1|_
%e A335616 15    7     _|1              |1    |1  | |1| |  1|    1|              1|_
%e A335616 16    2    |1                |     |   | | | |   |     |                1|
%e A335616 ...
%e A335616 For n = 6 (above), the total number of steps in all double staircases that have at least one step in the 6th level of the structure is equal to 3, since there are two steps in the first double staircase, there are no steps in the second double staircase, and there is only one step in the third double staircase, so a(3) = 2 + 0 + 1 = 3.
%e A335616 From the theorem (see comments) for n = 6, let s(k) = A196020(6,k) be the total number of steps from level n to the top, in the k-th double staircase that has at least a step in the 6th level of the structure, otherwise s(k) = 0. We have that s(1) = 11, s(2) = 0 and s(3) = 1. So the alternating sum is 11 - 0 + 1 = 12, which equals sigma(6) = 1 + 2 + 3 + 6 = 12.
%e A335616 Note that to evaluate sigma(n), it is sufficient to have only the n-th level of the diagram, since the width of the base level of a double staircase equals the number of its steps. See below:
%e A335616 For n = 6 the 6th level of the above diagram looks like this:
%e A335616                                 _         _         _
%e A335616                                |1      | |1| |      1|
%e A335616 .
%e A335616 Width of the 1st staircase:    |<-------- 11 ------->|
%e A335616 .
%e A335616 Width of the 3rd staircase:          --->|1|<---
%e A335616 .
%e A335616 The width of the first double staircase is 11, the width of the second double staircase does not count, and the width of the third double staircase is 1, so the alternating sum is 11 - 0 + 1 = 12 = sigma(6).
%e A335616 For n = 15 the alternating sum is 29 - 13 + 7 - 0 + 1 = 24 = sigma(15).
%e A335616 For n = 16 the alternating sum is 31 -  0 + 0 - 0 + 0 = 31 = sigma(16).
%e A335616 For more information about these alternating sums see A196020.
%p A335616 N:= 100:
%p A335616 S := convert(series( add( x^(n*(n+1)/2)*(1 + x^n)/(1 - x^n), n = 1..floor(sqrt(2*N)) ), x, N+1 ), polynom):
%p A335616 seq(coeff(S, x, n), n = 1..N); # _Peter Bala_, Jan 20 2021
%t A335616 A335616[n_]:=2DivisorSigma[0,n/2^IntegerExponent[n,2]]-Boole[IntegerQ[(Sqrt[8n+1]-1)/2]];Array[A335616,100] (* _Paolo Xausa_, Sep 03 2023 *)
%Y A335616 Row sums of A339275.
%Y A335616 Partial sums give A338722.
%Y A335616 Cf. A000079, A000203, A000217, A001227, A054843, A054844, A065091, A136107. A196020, A204217, A236104, A235791, A237048, A237593, A237593, A245092, A249351, A262611, A262626, A279693, A279733, A281010, A281011, A286001, A299765, A338721.
%K A335616 nonn,easy
%O A335616 1,2
%A A335616 _Omar E. Pol_, Oct 02 2020
%E A335616 Simpler definition from _Omar E. Pol_, Nov 27 2020