This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A337499 #25 Mar 08 2023 05:43:41 %S A337499 1,2,4,6,14,20,50,70,182,252,672,924,2508,3432,9438,12870,35750,48620, %T A337499 136136,184756,520676,705432,1998724,2704156,7696444,10400600, %U A337499 29716000,40116600,115000920,155117520,445962870 %N A337499 a(n) is the number of ballot sequences of length n tied or won by at most 2 votes. %C A337499 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. %H A337499 Robert Israel, <a href="/A337499/b337499.txt">Table of n, a(n) for n = 0..3323</a> %F A337499 a(n) = A128014(n+1) + ((n+1) mod 2)*2*A001791(ceiling(n/2)). %F A337499 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 %F A337499 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 %F A337499 a(n) ~ 2^(n - 1/2) * (5 + (-1)^n) / sqrt(Pi*n). - _Vaclav Kotesovec_, Mar 08 2023 %p A337499 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): %p A337499 map(f, [$0..100]); # _Robert Israel_, Oct 08 2020 %Y A337499 Cf. A001791, A128014. %Y A337499 Bisections give A000984 (odd part, starting from second element), A051924 (even part). %K A337499 nonn,walk %O A337499 0,2 %A A337499 _Nachum Dershowitz_, Aug 29 2020