login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A135231
Row sums of triangle A135230.
2
1, 2, 4, 6, 12, 22, 44, 86, 172, 342, 684, 1366, 2732, 5462, 10924, 21846, 43692, 87382, 174764, 349526, 699052, 1398102, 2796204, 5592406, 11184812, 22369622, 44739244, 89478486, 178956972, 357913942, 715827884, 1431655766, 2863311532, 5726623062, 11453246124, 22906492246, 45812984492
OFFSET
0,2
LINKS
FORMULA
a(2*n+1) = A005578(n+1) if n is odd.
Conjectures from Chai Wah Wu, Aug 31 2023: (Start)
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n > 3.
G.f.: (-2*x^3 - x^2 + 1)/((x - 1)*(x + 1)*(2*x - 1)). (End)
EXAMPLE
a(3) = 6 = sum of row 4 terms of triangle A135230; (1 + 2 + 2 + 1).
a(5) = 22 = A005578(6).
a(6) = 44 = A005578(7) + 1.
MAPLE
T:= proc(n, k) option remember;
if k=n then 1
elif k=0 then (3+(-1)^n)/2
else add(binomial(n-2*j-1, k-1), j=0..floor((n-1)/2))
fi; end:
seq( add(T(n, j), j=0..n), n=0..40); # G. C. Greubel, Nov 20 2019
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==n, 1, If[k==0, (3+(-1)^n)/2, Sum[Binomial[n-1 - 2*j, k-1], {j, 0, Floor[(n-1)/2]}]]]; Table[Sum[T[n, j], {j, 0, n}], {n, 0, 40}] (* G. C. Greubel, Nov 20 2019 *)
PROG
(PARI) T(n, k) = if(k==n, 1, if(k==0, (3+(-1)^n)/2, sum(j=0, (n-1)\2, binomial( n-2*j-1, k-1)) )); \\ G. C. Greubel, Nov 20 2019
(Magma)
function T(n, k)
if k eq n then return 1;
elif k eq 0 then return (3+(-1)^n)/2;
else return (&+[Binomial(n-2*j-1, k-1): j in [0..Floor((n-1)/2)]]);
end if; return T; end function;
[(&+[T(n, j): j in [0..n]]): n in [0..40]]; // G. C. Greubel, Nov 20 2019
(Sage)
@CachedFunction
def T(n, k):
if (k==n): return 1
elif (k==0): return (3+(-1)^n)/2
else: return sum(binomial(n-2*j-1, k-1) for j in (0..floor((n-1)/2)))
[sum(T(n, j) for j in (0..n)) for n in (0..40)] # G. C. Greubel, Nov 20 2019
CROSSREFS
Sequence in context: A341582 A370648 A326114 * A326489 A217356 A030793
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Nov 23 2007
EXTENSIONS
Terms a(16) onward added and offset changed by G. C. Greubel, Nov 20 2019
STATUS
approved