login
Sum of products of terms in all partitions of 3*n into powers of 3.
3

%I #39 Nov 23 2020 06:57:19

%S 1,4,13,49,157,481,1534,4693,14170,43357,130918,393601,1188454,

%T 3573013,10726690,32248957,96815758,290516161,872169223,2617128409,

%U 7852005967,23561605318,70690403371,212076797530,636280680100,1908892327810,5726727270940,17180634420931

%N Sum of products of terms in all partitions of 3*n into powers of 3.

%H Seiichi Manyama, <a href="/A294298/b294298.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = [x^(3*n)] Product_{k>=0} 1/(1 - 3^k*x^(3^k)). - _Ilya Gutkovskiy_, Sep 10 2018

%F a(n) ~ c * 3^n, where c = 2.2530906593645919365992433370928351696108819534655299832797806149219665... - _Vaclav Kotesovec_, Jun 18 2019

%e n | partitions of 3*n into powers of 3 | a(n)

%e ----------------------------------------------------------------------------------

%e 1 | 3 , 1+1+1 | 3+1 = 4.

%e 2 | 3+3, 3+1+1+1, 1+1+1+1+1+1 | 9+3+1 = 13.

%e 3 | 9 , 3+3+3 , 3+3+1+1+1 , 3+1+1+1+1+1+1, 1+1+1+1+1+1+1+1+1 | 9+27+9+3+1 = 49.

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

%p `if`(i<1, 0, add(b(n-j*i, i/3, p*i^j), j=0..n/i)))

%p end:

%p a:= n-> (t-> b(t, 3^ilog[3](t), 1))(3*n):

%p seq(a(n), n=0..33); # _Alois P. Heinz_, Oct 27 2017

%t b[n_, i_, p_] := b[n, i, p] = If[n == 0, p, If[i < 1, 0, Sum[b[n - j i, i/3, p i^j], {j, 0, n/i}]]];

%t a[n_] := b[3n, 3^Floor@Log[3, 3n], 1];

%t a /@ Range[0, 33] (* _Jean-François Alcover_, Nov 23 2020, after _Alois P. Heinz_ *)

%Y Cf. A005704, A062051, A289842.

%K nonn

%O 0,2

%A _Seiichi Manyama_, Oct 27 2017