OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Stefano Bilotta, Variable-length Non-overlapping Codes, arXiv preprint arXiv:1605.03785 [cs.IT], 2016 [See Table 2].
Index entries for linear recurrences with constant coefficients, signature (0,1,2,3,2,1).
FORMULA
G.f.: 1/((1+x)*(1+x^2)*(1-x-x^2-x^3)). - Alois P. Heinz, Mar 25 2017
a(n) = (1/4)*((-1)^n + i^n*(n+1 mod 2) - i^(n+3)*(n mod 2) + 2*A000073(n+2)). - G. C. Greubel, Feb 09 2023
MATHEMATICA
CoefficientList[Series[1/((1+x)*(1+x^2)*(1-x-x^2-x^3)), {x, 0, 50}], x] (* Indranil Ghosh, Mar 26 2017 *)
PROG
(PARI) Vec(1/((1+x)*(1+x^2)*(1-x-x^2-x^3)) + O(x^50)) \\ Indranil Ghosh, Mar 26 2017
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( 1/((1+x)*(1+x^2)*(1-x-x^2-x^3)) )); // G. C. Greubel, Feb 09 2023
(SageMath)
@CachedFunction
def b(n): # b = A000073
if (n<3): return (0, 0, 1)[n]
else: return b(n-1) + b(n-2) + b(n-3)
def A283834(n): return (1/4)*((-1)^n +i^n*((n+1)%2) -i^(n+3)*(n%2) +2*b(n+2))
[A283834(n) for n in range(41)] # G. C. Greubel, Feb 09 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 25 2017
EXTENSIONS
More terms from Alois P. Heinz, Mar 25 2017
STATUS
approved