OFFSET
6,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 6..3779
FORMULA
G.f.: C({1,2,3},x) = (x^6/(-x^3 - x^2 - x + 1)) *
(1/((1 - x)*(-x^2 - x + 1)) +
1/((1 - x)*(-x^3 - x + 1)) +
1/((1 - x^2)*(-x^2 - x + 1)) +
1/((1 - x^2)*(-x^3 - x^2 + 1)) +
1/((1 - x^3)*(-x^3 - x + 1)) +
1/((1 - x^3)*(-x^3 - x^2 + 1))).
Where C({s},x) = Sum_{i in {s}} (C({s}-{i},x)*x^i)/(1 - Sum_{i in {s}} (x^i)).
MAPLE
b:= proc(n, t) option remember; `if`(n=0, `if`(t=7, 1, 0),
add(b(n-j, Bits[Or](t, 2^(j-1))), j=1..min(n, 3)))
end:
a:= n-> b(n, 0):
seq(a(n), n=6..42); # Alois P. Heinz, May 25 2024
PROG
(PARI)
C_x(s, N)={my(x='x+O('x^N), g=if(#s <1, 1, sum(i=1, #s, C_x(setminus(s, [s[i]]), N) * x^(s[i]) )/(1-sum(i=1, #s, x^(s[i]))))); return(g)}
B_x(n) ={my(h=C_x([1, 2, 3], n)); Vec(h)}
B_x(40)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
John Tyler Rascoe, May 25 2024
STATUS
approved