A153338
Number of zig-zag paths from top to bottom of a 2n-1 by 2n-1 square whose color is not that of the top right corner.
Original entry on oeis.org
0, 2, 18, 116, 650, 3372, 16660, 79592, 371034, 1697660, 7654460, 34106712, 150499908, 658707896, 2863150440, 12371226064, 53178791162, 227561427612, 969890051884, 4119092850680, 17438036501676, 73611934643368, 309935825654168, 1301878616066736
Offset: 1
a(3) = 3*2 ^ (2*3 - 2) - (2*3 - 1) * binomial(2*3 - 2, 3 - 1) = 18. - _Indranil Ghosh_, Feb 19 2017
-
[(n)*2^(2*n-2)-(2*n-1)*Binomial(2*n-2, n-1): n in [1..30]]; // Vincenzo Librandi, Sep 18 2015
-
Table[n 2^(2 n - 2) - (2 n - 1) Binomial[2 n - 2, n - 1], {n, 22}] (* Michael De Vlieger, Sep 17 2015 *)
-
import math
def C(n,r):
f=math.factorial
return f(n)/f(r)/f(n-r)
def A153338(n):
return str(n*2**(2*n-2)-(2*n-1)*C(2*n-2,n-1)) # Indranil Ghosh, Feb 19 2017
A153334
Number of zig-zag paths from top to bottom of an n X n square whose color is that of the top right corner.
Original entry on oeis.org
1, 1, 4, 8, 24, 52, 136, 296, 720, 1556, 3624, 7768, 17584, 37416, 83024, 175568, 383904, 807604, 1746280, 3657464, 7839216, 16357496, 34812144, 72407728, 153204064, 317777032, 669108496, 1384524656, 2903267040, 5994736336
Offset: 1
-
Table[If[Mod[n,2]==0, (n+1)*2^(n-2)-2(n-1) Binomial[n-2,(n-2)/2], (n+1)*2^(n-2)-(n-1) Binomial[n-1,(n-1)/2]],{n,1,30}] (* Indranil Ghosh, Feb 19 2017 *)
-
import math
def C(n,r):
f=math.factorial
return f(n)/f(r)/f(n-r)
def A153334(n):
if n%2==0: return str(int((n+1)*2**(n-2)-2*(n-1)*C(n-2,(n-2)/2)))
else: return str(int((n+1)*2**(n-2)-(n-1)*C(n-1,(n-1)/2))) # Indranil Ghosh, Feb 19 2017
A153335
Number of zig-zag paths from top to bottom of an n X n square whose color is not that of the top right corner.
Original entry on oeis.org
0, 1, 2, 8, 18, 52, 116, 296, 650, 1556, 3372, 7768, 16660, 37416, 79592, 175568, 371034, 807604, 1697660, 3657464, 7654460, 16357496, 34106712, 72407728, 150499908, 317777032, 658707896, 1384524656, 2863150440, 5994736336
Offset: 1
-
Table[If[Mod[n,2]==0, (n+1)*2^(n-2)-2(n-1) Binomial[n-2,(n-2)/2], (n+1)*2^(n-2)-(n) Binomial[n-1,(n-1)/2]],{n,1,30}] (* Indranil Ghosh, Feb 19 2017 *)
-
a(n) = if (n % 2, (n+1)*2^(n-2) - n*binomial(n-1,(n-1)/2), (n+1)*2^(n-2) - 2*(n-1)*binomial(n-2,(n-2)/2)); \\ Michel Marcus, Feb 19 2017
-
import math
def C(n, r):
f=math.factorial
return f(n)/f(r)/f(n-r)
def A153335(n):
if n%2==0: return str(int((n+1)*2**(n-2)-2*(n-1)*C(n-2, (n-2)/2)))
else: return str(int((n+1)*2**(n-2)-(n)*C(n-1, (n-1)/2))) # Indranil Ghosh, Feb 19 2017
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.
Original entry on oeis.org
1, 4, 24, 136, 720, 3624, 17584, 83024, 383904, 1746280, 7839216, 34812144, 153204064, 669108496, 2903267040, 12526343584, 53779871552, 229895033832, 978965187184, 4154438114480, 17575883030496, 74150192517808
Offset: 1
a(3) = 3 * 2 ^ (2*3 - 2) - 2* (3 - 1) * binomial(2*3 - 2, 3 - 1) = 24. - _Indranil Ghosh_, Feb 19 2017
-
Table[(n)2^(2n-2)-2(n-1) Binomial[2n-2,n-1],{n,1,22}] (* Indranil Ghosh, Feb 19 2017 *)
-
a(n) = n*2^(2*n-2) - 2*(n-1)*binomial(2*n-2,n-1); \\ Michel Marcus, Feb 19 2017
-
import math
def C(n,r):
f=math.factorial
return f(n)/f(r)/f(n-r)
def A153337(n):
return str(n*2**(2*n-2)-2*(n-1)*C(2*n-2,n-1)) # Indranil Ghosh, Feb 19 2017
Showing 1-4 of 4 results.