login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Index position of {3}^n within the list of partitions of 3n in canonical ordering.
2

%I #16 Jan 06 2021 02:12:31

%S 1,1,5,19,59,150,349,745,1515,2936,5514,10036,17851,31039,53006,88943,

%T 147057,239701,385885,613855,966137,1505137,2323124,3553914,5392315,

%U 8117758,12131618,18003740,26543030,38886999,56633453,82009410,118113488,169229009,241264461

%N Index position of {3}^n within the list of partitions of 3n in canonical ordering.

%C The canonical ordering of partitions is described in A080577.

%H Alois P. Heinz, <a href="/A332720/b332720.txt">Table of n, a(n) for n = 0..4000</a>

%H Wikipedia, <a href="https://www.wikipedia.org/wiki/integer_partition">Integer Partition</a>

%F a(n) ~ exp(Pi*sqrt(2*n)) / (4*3^(3/2)*n). - _Vaclav Kotesovec_, Feb 28 2020

%e a(2) = 5, because 33 has position 5 within the list of partitions of 6 in canonical ordering: 6, 51, 42, 411, 33, 321, 3111, 222, ... .

%p b:= proc(n) option remember;

%p `if`(n=0, 1, b(n-1)+g(3*n, 2))

%p end:

%p g:= proc(n, i) option remember; `if`(n=0 or i=1, 1,

%p `if`(i<1, 0, g(n-i, min(n-i, i))+g(n, i-1)))

%p end:

%p a:= n-> g(3*n$2)-b(n)+1:

%p seq(a(n), n=0..35);

%t b[n_] := b[n] = If[n == 0, 1, b[n - 1] + g[3n, 2]];

%t g[n_, i_] := g[n, i] = If[n == 0 || i == 1, 1, If[i < 1, 0, g[n - i, Min[n - i, i]] + g[n, i - 1]]];

%t a[n_] := g[3n, 3n] - b[n] + 1;

%t a /@ Range[0, 35] (* _Jean-François Alcover_, Jan 06 2021, after _Alois P. Heinz_ *)

%Y Cf. A000041, A080577, A322761, A330661, A332706, A332719.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Feb 20 2020