login
A227506
Schroeder triangle sums: a(2*n-1) = A010683(2*n-2) and a(2*n) = A010683(2*n-1) - A001003(2*n-1).
2
1, 1, 7, 17, 121, 353, 2591, 8257, 61921, 207905, 1582791, 5501073, 42344121, 150827073, 1170747519, 4247388417, 33186295681, 122125206977, 959260792775, 3570473750929, 28167068630713, 105820555054241, 837838806587167, 3172136074486337
OFFSET
1,3
COMMENTS
The terms of this sequence equal the Fi1 sums, see A180662, of the Schroeder triangle A033877 (with offset 1 and n for columns and k for rows).
FORMULA
a(n) = Sum_{k=1..floor((n+1)/2)} A033877(2*k-1,n).
a(2*n-1) = A010683(2*n-2) and a(2*n) = A010683(2*n-1) - A001003(2*n-1).
G.f.: (1-4*x+x^2 - sqrt(1-6*x+x^2) + x*sqrt(1+6*x+x^2))/(8*x).
MAPLE
A227506 := proc(n) local k, T; T := proc(n, k) option remember; if n=1 then return(1) fi; if k<n then return(0) fi; T(n, k-1)+T(n-1, k-1)+T(n-1, k) end; add(T(2*k-1, n), k = 1..iquo(n+1, 2)) end: seq(A227506(n), n = 1..24); # Peter Luschny, Jul 17 2013
A227506 := proc(n): if type(n, odd) then A010683(n-1) else A010683(n-1) - A001003(n-1) fi: end: A010683 := proc(n): if n = 0 then 1 else (2/n)*add(binomial(n, k)* binomial(n+k+1, k-1), k=1..n) fi: end: A001003 := proc(n): if n = 0 then 1 else add(binomial(n, j)*binomial(n+j, n-1), j=0..n)/(2*n) fi: end: seq(A227506(n), n=1..24);
MATHEMATICA
T[n_, k_] := T[n, k] = Which[n == 1, 1, k < n, 0, True, T[n, k - 1] + T[n - 1, k - 1] + T[n - 1, k]];
a[n_] := Sum[T[2 k - 1, n], {k, 1, (n + 1)/2}];
Array[a, 24] (* Jean-François Alcover, Jul 11 2019, from Sage *)
PROG
(Sage)
def A227506(n):
@CachedFunction
def T(n, k):
if n==1: return 1
if k <n: return 0
return T(n, k-1)+T(n-1, k-1)+T(n-1, k)
return add(T(2*k-1, n) for k in (1..(n+1)//2))
[A227506(n) for n in (1..24)] # Peter Luschny, Jul 16 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Johannes W. Meijer, Jul 15 2013
STATUS
approved