The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A337499 a(n) is the number of ballot sequences of length n tied or won by at most 2 votes. 2
1, 2, 4, 6, 14, 20, 50, 70, 182, 252, 672, 924, 2508, 3432, 9438, 12870, 35750, 48620, 136136, 184756, 520676, 705432, 1998724, 2704156, 7696444, 10400600, 29716000, 40116600, 115000920, 155117520, 445962870 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Also the number of n-step walks on a path graph ending within 2 steps of the origin. Also the number of monotonic paths of length n ending within 2 steps of the diagonal.
LINKS
FORMULA
a(n) = A128014(n+1) + ((n+1) mod 2)*2*A001791(ceiling(n/2)).
D-finite with recurrence +(n+2)*a(n) +n*a(n-1) +(-5*n-2)*a(n-2) +4*(-n+1)*a(n-3) +4*(n-3)*a(n-4)=0. - Conjectured by R. J. Mathar, Sep 27 2020, verified by Robert Israel, Oct 08 2020
G.f.: ((4*x + 2)*sqrt(-4*x^2 + 1) + 4*x^2 + 4*x + 2)/(sqrt(-4*x^2 + 1)*(1 + sqrt(-4*x^2 + 1))^2). - Robert Israel, Oct 08 2020
a(n) ~ 2^(n - 1/2) * (5 + (-1)^n) / sqrt(Pi*n). - Vaclav Kotesovec, Mar 08 2023
MAPLE
f:= gfun:-rectoproc({(4 + 4*n)*a(n) + (-12 - 4*n)*a(1 + n) + (-22 - 5*n)*a(2 + n) + (n + 4)*a(n + 3) + (6 + n)*a(n + 4), a(0) = 1, a(1) = 2, a(2) = 4, a(3) = 6}, a(n), remember):
map(f, [$0..100]); # Robert Israel, Oct 08 2020
CROSSREFS
Bisections give A000984 (odd part, starting from second element), A051924 (even part).
Sequence in context: A032353 A062112 A226302 * A284886 A249339 A332754
KEYWORD
nonn,walk
AUTHOR
Nachum Dershowitz, Aug 29 2020
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 30 22:25 EDT 2024. Contains 372980 sequences. (Running on oeis4.)