OFFSET
1,2
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..1000
Joseph Myers, BMO 2008--2009 Round 1 Problem 1---Generalisation
FORMULA
a(n) = (2n+1)2^(2n-2) - 2(2n-1)binomial(2n-2,n-1).
EXAMPLE
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
MATHEMATICA
Table[(2n+1) 2^(2n-2)-2(2n-1) Binomial[2n-2, n-1], {n, 1, 22}] (* Indranil Ghosh, Feb 19 2017 *)
PROG
(Python)
import math
def C(n, r):
....f=math.factorial
....return f(n)/f(r)/f(n-r)
def A153336(n):
....return str((2*n+1)*2**(2*n-2)-2*(2*n-1)*C(2*n-2, n-1)) # Indranil Ghosh, Feb 19 2017
(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
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Joseph Myers, Dec 24 2008, Dec 31 2008
STATUS
approved