login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A033303 Expansion of (1 + x)/(1 - 2*x - x^2 + x^3). 5
1, 3, 7, 16, 36, 81, 182, 409, 919, 2065, 4640, 10426, 23427, 52640, 118281, 265775, 597191, 1341876, 3015168, 6775021, 15223334, 34206521, 76861355, 172705897, 388066628, 871977798, 1959316327 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Also the number of one-sided n-step prudent walks that avoid 3 or more consecutive east steps. - Shanzhen Gao, Apr 27 2011

Equivalently, number of ternary strings of length n with subwords (0,0) and (1,2) not allowed. - Olivier Gérard, Aug 28 2012

First differences are in A052534.

REFERENCES

S. Gao, H. Niederhausen, Sequences Arising From Prudent Self-Avoiding Walks (submitted to INTEGERS: The Electronic Journal of Combinatorial Number Theory).

R. P. Stanley, Enumerative Combinatorics I, p. 244.

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (2,1,-1)

FORMULA

a(0)=1, a(1)=h(n), and a(n) = h(n) + h(n-1) for n >= 2, where h(n) = Sum_{k=1..n} Sum_{j=0..k} binomial(k, j) * binomial(j, n-3*k+2*j) * 2^(3*k-n-j) * (-1)^(k-j). - Vladimir Kruchinin, Sep 09 2010

a(0)=1, a(1)=3, a(2)=7, a(n) = 2*a(n-1) + a(n-2) - a(n-3). - Harvey P. Dale, Oct 31 2013

MATHEMATICA

CoefficientList[Series[(1 + x)/(1 - 2*x - x^2 + x^3), {x, 0, 100}], x] (* Vincenzo Librandi, Oct 20 2012 *)

LinearRecurrence[{2, 1, -1}, {1, 3, 7}, 40] (* Harvey P. Dale, Oct 31 2013 *)

PROG

(Maxima) h(n):=sum(sum(binomial(k, j)*binomial(j, n-3*k+2*j)*2^(3*k-n-j)*(-1)^(k-j), j, 0, k), k, 1, n); a(n):=if n=0 then 1 else if n=2 then h(n) else h(n)+h(n-1); /* Vladimir Kruchinin, Sep 09 2010 */

(PARI) a(n)=([0, 1, 0; 0, 0, 1; -1, 1, 2]^n*[1; 3; 7])[1, 1] \\ Charles R Greathouse IV, Feb 19 2017

CROSSREFS

Sequence in context: A077852 A218983 A020746 * A078056 A173761 A124671

Adjacent sequences:  A033300 A033301 A033302 * A033304 A033305 A033306

KEYWORD

nonn,nice,easy

AUTHOR

N. J. A. Sloane

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 20 15:02 EST 2018. Contains 299380 sequences. (Running on oeis4.)