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.

A135231 Row sums of triangle A135230.

This page as a plain text file.
%I A135231 #11 Sep 01 2023 04:10:59
%S A135231 1,2,4,6,12,22,44,86,172,342,684,1366,2732,5462,10924,21846,43692,
%T A135231 87382,174764,349526,699052,1398102,2796204,5592406,11184812,22369622,
%U A135231 44739244,89478486,178956972,357913942,715827884,1431655766,2863311532,5726623062,11453246124,22906492246,45812984492
%N A135231 Row sums of triangle A135230.
%H A135231 G. C. Greubel, <a href="/A135231/b135231.txt">Table of n, a(n) for n = 0..500</a>
%F A135231 a(2*n+1) = A005578(n+1) if n is odd.
%F A135231 Conjectures from _Chai Wah Wu_, Aug 31 2023: (Start)
%F A135231 a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n > 3.
%F A135231 G.f.: (-2*x^3 - x^2 + 1)/((x - 1)*(x + 1)*(2*x - 1)). (End)
%e A135231 a(3) = 6 = sum of row 4 terms of triangle A135230; (1 + 2 + 2 + 1).
%e A135231 a(5) = 22 = A005578(6).
%e A135231 a(6) = 44 = A005578(7) + 1.
%p A135231 T:= proc(n, k) option remember;
%p A135231       if k=n then 1
%p A135231     elif k=0 then (3+(-1)^n)/2
%p A135231     else add(binomial(n-2*j-1, k-1), j=0..floor((n-1)/2))
%p A135231       fi; end:
%p A135231 seq( add(T(n, j), j=0..n), n=0..40); # _G. C. Greubel_, Nov 20 2019
%t A135231 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 *)
%o A135231 (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
%o A135231 (Magma)
%o A135231 function T(n,k)
%o A135231   if k eq n then return 1;
%o A135231   elif k eq 0 then return (3+(-1)^n)/2;
%o A135231   else return (&+[Binomial(n-2*j-1, k-1): j in [0..Floor((n-1)/2)]]);
%o A135231   end if; return T; end function;
%o A135231 [(&+[T(n,j): j in [0..n]]): n in [0..40]]; // _G. C. Greubel_, Nov 20 2019
%o A135231 (Sage)
%o A135231 @CachedFunction
%o A135231 def T(n, k):
%o A135231     if (k==n): return 1
%o A135231     elif (k==0): return (3+(-1)^n)/2
%o A135231     else: return sum(binomial(n-2*j-1, k-1) for j in (0..floor((n-1)/2)))
%o A135231 [sum(T(n, j) for j in (0..n)) for n in (0..40)] # _G. C. Greubel_, Nov 20 2019
%Y A135231 Cf. A005578, A135230.
%K A135231 nonn
%O A135231 0,2
%A A135231 _Gary W. Adamson_, Nov 23 2007
%E A135231 Terms a(16) onward added and offset changed by _G. C. Greubel_, Nov 20 2019