A332720 Index position of {3}^n within the list of partitions of 3n in canonical ordering.
1, 1, 5, 19, 59, 150, 349, 745, 1515, 2936, 5514, 10036, 17851, 31039, 53006, 88943, 147057, 239701, 385885, 613855, 966137, 1505137, 2323124, 3553914, 5392315, 8117758, 12131618, 18003740, 26543030, 38886999, 56633453, 82009410, 118113488, 169229009, 241264461
Offset: 0
Keywords
Examples
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, ... .
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..4000
- Wikipedia, Integer Partition
Programs
-
Maple
b:= proc(n) option remember; `if`(n=0, 1, b(n-1)+g(3*n, 2)) end: g:= proc(n, i) option remember; `if`(n=0 or i=1, 1, `if`(i<1, 0, g(n-i, min(n-i, i))+g(n, i-1))) end: a:= n-> g(3*n$2)-b(n)+1: seq(a(n), n=0..35);
-
Mathematica
b[n_] := b[n] = If[n == 0, 1, b[n - 1] + g[3n, 2]]; 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]]]; a[n_] := g[3n, 3n] - b[n] + 1; a /@ Range[0, 35] (* Jean-François Alcover, Jan 06 2021, after Alois P. Heinz *)
Formula
a(n) ~ exp(Pi*sqrt(2*n)) / (4*3^(3/2)*n). - Vaclav Kotesovec, Feb 28 2020
Comments