cp's OEIS Frontend

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.

A153337 Number of zig-zag paths from top to bottom of a 2n-1 by 2n-1 square whose color is that of the top right corner.

This page as a plain text file.
%I A153337 #12 Jul 22 2025 06:16:54
%S A153337 1,4,24,136,720,3624,17584,83024,383904,1746280,7839216,34812144,
%T A153337 153204064,669108496,2903267040,12526343584,53779871552,229895033832,
%U A153337 978965187184,4154438114480,17575883030496,74150192517808
%N A153337 Number of zig-zag paths from top to bottom of a 2n-1 by 2n-1 square whose color is that of the top right corner.
%H A153337 Indranil Ghosh, <a href="/A153337/b153337.txt">Table of n, a(n) for n = 1..1000</a>
%H A153337 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 A153337 a(n) = n*2^(2n-2) - 2(n-1)*binomial(2n-2,n-1).
%e A153337 a(3) = 3 * 2 ^ (2*3 - 2) - 2* (3 - 1) * binomial(2*3 - 2, 3 - 1) = 24. - _Indranil Ghosh_, Feb 19 2017
%t A153337 Table[(n)2^(2n-2)-2(n-1) Binomial[2n-2,n-1],{n,1,22}] (* _Indranil Ghosh_, Feb 19 2017 *)
%o A153337 (Python)
%o A153337 import math
%o A153337 def C(n,r):
%o A153337     f=math.factorial
%o A153337     return f(n)/f(r)/f(n-r)
%o A153337 def A153337(n):
%o A153337     return str(n*2**(2*n-2)-2*(n-1)*C(2*n-2,n-1)) # _Indranil Ghosh_, Feb 19 2017
%o A153337 (PARI) a(n) = n*2^(2*n-2) - 2*(n-1)*binomial(2*n-2,n-1); \\ _Michel Marcus_, Feb 19 2017
%Y A153337 Cf. A102699, A153334, A153335, A153336, A153338.
%K A153337 easy,nonn
%O A153337 1,2
%A A153337 _Joseph Myers_, Dec 24 2008