OFFSET
0,4
COMMENTS
Let M be an infinite matrix with (1, 1, 1, 1, 0, 0, 0, ...) in each column shifted down thrice from the previous column (for k>0). Then A054390 = lim_{n->infinity} M^n, the left-shifted vector considered as a sequence. - Gary W. Adamson, Apr 14 2010
Conjecture: Number of ways of partitioning n into distinct parts of A038754. - R. J. Mathar, Mar 01 2023
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
Karl Dilcher, Larry Ericksen, Polynomials Characterizing Hyper b-ary Representations, J. Int. Seq., Vol. 21 (2018), Article 18.4.3.
Timothy B. Flowers, Extending a Recent Result on Hyper m-ary Partition Sequences, Journal of Integer Sequences, Vol. 20 (2017), #17.6.7.
FORMULA
a(0)=1, a(1)=1, a(2)=1 and, for n>0, a(3n)=a(n)+a(n-1), a(3n+1)=a(n), a(3n+2)=a(n).
G.f.: Product_{j >= 0} (1+x^(3^j)+x^(2*(3^j))+x^(3*(3^j))). - Emeric Deutsch, Apr 02 2006
G.f. A(x) satisfies: A(x) = (1 + x + x^2 + x^3) * A(x^3). - Ilya Gutkovskiy, Jul 09 2019
EXAMPLE
a(33) = 4 because we have 33 = 27+3+3 = 27+3+1+1+1 = 9+9+9+3+3 = 9+9+9+3+1+1+1.
MAPLE
a[0]:=1: a[1]:=1: a[2]:=1: for n from 1 to 35 do a[3*n]:=a[n]+a[n-1]: a[3*n+1]:=a[n]: a[3*n+2]:=a[n] od: A:=[seq(a[n], n=0..104)]; # Emeric Deutsch, Apr 02 2006
g:=product((1+x^(3^j)+x^(2*(3^j))+x^(3*(3^j))), j=0..10): gser:=series(g, x=0, 125): seq(coeff(gser, x, n), n=0..104); # Emeric Deutsch, Apr 02 2006
# third Maple program:
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<0, 0,
add(`if`(n-j*3^i<0, 0, b(n-j*3^i, i-1)), j=0..3)))
end:
a:= n-> b(n, ilog[3](n)):
seq(a(n), n=0..100); # Alois P. Heinz, Jun 21 2012
MATHEMATICA
a[0]=1; a[1]=1; a[2]=1; For[n=1, n <= 35, n++, a[3*n] = a[n] + a[n-1]; a[3*n+1] = a[n]; a[3*n+2] = a[n]]; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Dec 20 2016, after Emeric Deutsch *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
John W. Layman, May 09 2000
STATUS
approved