|
|
A005704
|
|
Number of partitions of 3n into powers of 3.
(Formerly M0639)
|
|
22
|
|
|
1, 2, 3, 5, 7, 9, 12, 15, 18, 23, 28, 33, 40, 47, 54, 63, 72, 81, 93, 105, 117, 132, 147, 162, 180, 198, 216, 239, 262, 285, 313, 341, 369, 402, 435, 468, 508, 548, 588, 635, 682, 729, 783, 837, 891, 954, 1017, 1080, 1152, 1224, 1296, 1377, 1458, 1539, 1632
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Infinite convolution product of [1,2,3,3,3,3,3,3,3,3] aerated A000244 - 1 times, i.e., [1,2,3,3,3,3,3,3,3,3] * [1,0,0,2,0,0,3,0,0,3] * [1,0,0,0,0,0,0,0,0,2] * ... [Mats Granvik, Gary W. Adamson, Aug 07 2009]
|
|
REFERENCES
|
R. K. Guy, personal communication.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = a(n-1)+a(floor(n/3)).
Coefficient of x^(3*n) in prod(k>=0, 1/(1-x^(3^k))). Also, coefficient of x^n in prod(k>=0, 1/(1-x^(3^k)))/(1-x). - Benoit Cloitre, Nov 28 2002
Let T(x) be the g.f., then T(x)=(1-x^3)/(1-x)^2*T(x^3). [Joerg Arndt, May 12 2010]
|
|
MATHEMATICA
|
Fold[Append[#1, Total[Take[Flatten[Transpose[{#1, #1, #1}]], #2]]] &, {1}, Range[2, 55]] (* Birkas Gyorgy, Apr 18 2011 *)
a[n_] := a[n] = If[n <= 2, n + 1, a[n - 1] + a[Floor[n/3]]]; Array[a, 101, 0] (* T. D. Noe, Apr 18 2011 *)
|
|
PROG
|
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|