|
|
A327993
|
|
a(n) = [x^n] ((x - 1)*(x + 1)*(2*x^2 - 1))/(2*x^4 + 4*x^3 - x^2 - 3*x + 1).
|
|
1
|
|
|
1, 3, 7, 20, 55, 151, 414, 1133, 3099, 8472, 23155, 63275, 172894, 472393, 1290663, 3526256, 9634071, 26321031, 71910814, 196464677, 536752579, 1466437096, 4006383531, 10945648019, 29904074046, 81699461841, 223207100431, 609813170912, 1666040617711, 4551707698639
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
a(n) is the sum of row n of A327992 if the decimal digits of A327992(n, k) are read as the binary digits of an integer.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 3*a(n-1) + a(n-2) - 4*a(n-3) - 2*a(n-4) for n >= 4.
|
|
EXAMPLE
|
a(6) = 414 = Sum([19, 21, 25, 47, 55, 59, 61, 127]) where the summands correspond to row 6 of A327992: [11001, 10101, 10011, 111101, 111011, 110111, 101111, 1111111].
|
|
MAPLE
|
gf := ((x - 1)*(x + 1)*(2*x^2 - 1))/(2*x^4 + 4*x^3 - x^2 - 3*x + 1):
ser := series(gf, x, 32): seq((coeff(ser, x, n)), n=0..29);
|
|
MATHEMATICA
|
LinearRecurrence[{3, 1, -4, -2}, {1, 3, 7, 20, 55}, 30]
|
|
PROG
|
(SageMath)
@cached_function
def a(n):
if n < 5: return [1, 3, 7, 20, 55][n]
return -2*a(n-4) - 4*a(n-3) + a(n-2) + 3*a(n-1)
print([a(n) for n in (0..29)])
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|