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 A153336 #12 Jul 22 2025 06:16:46 %S A153336 1,8,52,296,1556,7768,37416,175568,807604,3657464,16357496,72407728, %T A153336 317777032,1384524656,5994736336,25816193952,110652549620, %U A153336 472302724408,2008499580504,8513063608304,35975584631128,151621915797840 %N A153336 Number of zig-zag paths from top to bottom of a 2n by 2n square whose color is that of the top right corner. %H A153336 Indranil Ghosh, <a href="/A153336/b153336.txt">Table of n, a(n) for n = 1..1000</a> %H A153336 Joseph Myers, <a href="http://www.polyomino.org.uk/publications/2008/bmo1-2009-q1.pdf">BMO 2008--2009 Round 1 Problem 1---Generalisation</a> %F A153336 a(n) = (2n+1)2^(2n-2) - 2(2n-1)binomial(2n-2,n-1). %e A153336 a(3) = (2*3 + 1)*2 ^ (2*3 - 2) - 2*(2*3 - 1) * binomial(2*3 - 2, 3 - 1) = 52. - _Indranil Ghosh_, Feb 19 2017 %t A153336 Table[(2n+1) 2^(2n-2)-2(2n-1) Binomial[2n-2,n-1],{n,1,22}] (* _Indranil Ghosh_, Feb 19 2017 *) %o A153336 (Python) %o A153336 import math %o A153336 def C(n,r): %o A153336 f=math.factorial %o A153336 return f(n)/f(r)/f(n-r) %o A153336 def A153336(n): %o A153336 return str((2*n+1)*2**(2*n-2)-2*(2*n-1)*C(2*n-2,n-1)) # _Indranil Ghosh_, Feb 19 2017 %o A153336 (PARI) a(n) = (2*n+1)*2^(2*n-2) - 2*(2*n-1)*binomial(2*n-2, n-1); \\ _Michel Marcus_, Feb 19 2017 %Y A153336 Cf. A102699, A153334, A153335, A153337, A153338. %K A153336 easy,nonn %O A153336 1,2 %A A153336 _Joseph Myers_, Dec 24 2008, Dec 31 2008