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.

A027057 a(n) = (1/2) * A027052(n, 2n-1).

This page as a plain text file.
%I A027057 #11 Nov 06 2019 04:26:42
%S A027057 1,2,4,9,21,51,128,329,861,2285,6132,16606,45313,124446,343680,953753,
%T A027057 2658133,7436541,20875972,58783892,165989825,469903672,1333359488,
%U A027057 3791535934,10802911297,30836181436,88169413364,252500533673,724182805389,2079862921763,5981150599872
%N A027057 a(n) = (1/2) * A027052(n, 2n-1).
%H A027057 G. C. Greubel, <a href="/A027057/b027057.txt">Table of n, a(n) for n = 2..750</a>
%p A027057 T:= proc(n, k) option remember;
%p A027057       if k<0 or k>2*n then 0
%p A027057     elif k=0 or k=2 or k=2*n then 1
%p A027057     elif k=1 then 0
%p A027057     else add(T(n-1, k-j), j=1..3)
%p A027057       fi
%p A027057     end:
%p A027057 seq( T(n,2*n-1)/2, n=2..30); # _G. C. Greubel_, Nov 06 2019
%t A027057 T[n_, k_]:= T[n, k]= If[k<0 || k>2*n, 0, If[k==0 || k==2 || k==2*n, 1, If[k==1, 0, Sum[T[n-1, k-j], {j, 3}]]]]; Table[T[n,2*n-1]/2, {n,2,30}] (* _G. C. Greubel_, Nov 06 2019 *)
%o A027057 (Sage)
%o A027057 @CachedFunction
%o A027057 def T(n, k):
%o A027057     if (k<0 or k>2*n): return 0
%o A027057     elif (k==0 or k==2 or k==2*n): return 1
%o A027057     elif (k==1): return 0
%o A027057     else: return sum(T(n-1, k-j) for j in (1..3))
%o A027057 [T(n,2*n-1)/2 for n in (2..30)] # _G. C. Greubel_, Nov 06 2019
%K A027057 nonn
%O A027057 2,2
%A A027057 _Clark Kimberling_
%E A027057 More terms from _Sean A. Irvine_, Oct 22 2019