|
|
A204217
|
|
G.f.: Sum_{n>=1} n * x^(n*(n+1)/2) / (1 - x^n).
|
|
37
|
|
|
1, 1, 3, 1, 3, 4, 3, 1, 6, 5, 3, 4, 3, 5, 11, 1, 3, 8, 3, 6, 12, 5, 3, 4, 8, 5, 12, 8, 3, 13, 3, 1, 12, 5, 15, 12, 3, 5, 12, 6, 3, 15, 3, 9, 26, 5, 3, 4, 10, 10, 12, 9, 3, 17, 18, 8, 12, 5, 3, 17, 3, 5, 28, 1, 18, 19, 3, 9, 12, 17, 3, 13, 3, 5, 27, 9, 21, 20, 3, 6, 21, 5, 3, 19, 18, 5, 12, 12, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Conjecture: a(n) is the total number of parts in all partitions of n into consecutive parts. - Omar E. Pol, Apr 23 2017
a(n) = 3 iff n is an odd prime. (End)
|
|
LINKS
|
|
|
FORMULA
|
a(k) = 1 iff k = 2^n for n>=0.
G.f.: (1/Theta4(x)^2) * Sum_{n>=1} (-1)^(n-1)* n*x^(n*(n+1)/2) * (1 - x^n)/(1 + x^n)^2 where Theta4(x) = 1 + 2*Sum_{n>=1} (-x)^(n^2), due to an identity of Ramanujan.
|
|
EXAMPLE
|
G.f.: A(x) = x + x^2 + 3*x^3 + x^4 + 3*x^5 + 4*x^6 + 3*x^7 + x^8 + ...
follows by expanding A(x) = x/(1-x) + 2*x^3/(1-x^2) + 3*x^6/(1-x^3) + 4*x^10/(1-x^4) + ...
Also, by a Ramanujan identity:
A(x)*Theta4(x)^2 = x*(1-x)/(1+x)^2 - 2*x^3*(1-x^2)/(1+x^2)^2 + 3*x^6*(1-x^3)/(1+x^3)^2 - 4*x^10*(1-x^4)/(1+x^4)^2 + 5*x^15*(1-x^5)/(1+x^5)^2 + ...
For n = 15 there are four partitions of 15 into consecutive parts: [15], [8, 7], [6, 5, 4] and [5, 4, 3, 2, 1]. The total number of parts is 11, so a(15) = 11. - Omar E. Pol, Apr 23 2017
Illustration of initial terms:
Diagram
n a(n) _
1 1 _|1
2 1 _|1 _
3 3 _|1 |2
4 1 _|1 _|
5 3 _|1 |2 _
6 4 _|1 _| |3
7 3 _|1 |2 |
8 1 _|1 _| _|
9 6 _|1 |2 |3 _
10 5 |1 | | |4
...
a(n) is the total length of all vertical line segments that are below and that share one vertex with the horizontal line segments that are in the n-th level of the diagram. For more information about the diagram see A286001 and A237593. (End)
|
|
MATHEMATICA
|
terms = 1024; Sum[n*x^(n*(n+1)/2)/(1-x^n), {n, 1, Ceiling[Sqrt[2*terms]]}] + O[x]^(terms+1) // CoefficientList[#, x]& // Rest (* Jean-François Alcover, Jun 04 2017 *)
|
|
PROG
|
(PARI) {a(n)=polcoeff(sum(m=1, n, m*x^(m*(m+1)/2)/(1-x^m+x*O(x^n))), n)}
(PARI) {a(n)=local(Theta4=1+2*sum(m=1, sqrtint(n+1), (-x)^(m^2))+x*O(x^n)); polcoeff(1/Theta4^2*sum(m=1, sqrtint(2*n+1), (-1)^(m-1)*m*x^(m*(m+1)/2)*(1-x^m)/(1+x^m+x*O(x^n))^2), n)}
(PARI) a(n) = {nb = 0; forpart(v=n, nbp = #v; if ((#Set(v)==#v) && (v[nbp] - v[1] == #v-1), nb += #v); ); nb; } \\ Michel Marcus, Apr 23 2017
(PARI) a(n) = {my(i=2, t=1); n--; while(n>0, t += (i*(n%i==0)); n-=i; i++); t} \\ David A. Corneth, Apr 28 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|