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.

A055801 Triangle T read by rows: T(i,0)=T(i,i)=1, T(i,j) = Sum_{k=1..floor(n/2)} T(i-2k, j-2k+1) for 1<=j<=i-1, where T(m,n) := 0 if m<0 or n<0.

This page as a plain text file.
%I A055801 #23 Jan 05 2025 19:51:36
%S A055801 1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,2,2,1,1,1,1,2,3,3,1,1,1,1,2,3,4,
%T A055801 3,1,1,1,1,2,3,5,6,4,1,1,1,1,2,3,5,7,7,4,1,1,1,1,2,3,5,8,11,10,5,1,1,
%U A055801 1,1,2,3,5,8,12,14,11,5,1,1,1,1,2,3,5,8,13,19,21,15,6,1
%N A055801 Triangle T read by rows: T(i,0)=T(i,i)=1, T(i,j) = Sum_{k=1..floor(n/2)} T(i-2k, j-2k+1) for 1<=j<=i-1, where T(m,n) := 0 if m<0 or n<0.
%C A055801 T(i+j,j) is the number of strings (s(1),...,s(m)) of nonnegative integers s(k) such that m<=i+1, s(m)=j and s(k)-s(k-1) is an odd positive integer for k=2,3,...,m.
%C A055801 T(i+j,j) is the number of compositions of numbers <=j using up to i parts, each an odd positive integer.
%H A055801 G. C. Greubel, <a href="/A055801/b055801.txt">Rows n = 0..100 of triangle, flattened</a>
%H A055801 Clark Kimberling, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/40-4/kimberling.pdf">Path-counting and Fibonacci numbers</a>, Fib. Quart. 40 (4) (2002) 328-338, Example 2B.
%e A055801 Rows:
%e A055801   1
%e A055801   1  1
%e A055801   1  1  1
%e A055801   1  1  1  1
%e A055801   1  1  1  2  1
%e A055801   1  1  1  2  2  1
%e A055801   1  1  1  2  3  3  1
%e A055801   1  1  1  2  3  4  3  1
%e A055801   1  1  1  2  3  5  6  4  1
%e A055801   1  1  1  2  3  5  7  7  4  1
%e A055801   1  1  1  2  3  5  8 11 10  5  1
%e A055801   1  1  1  2  3  5  8 12 14 11  5  1
%e A055801   1  1  1  2  3  5  8 13 19 21 15  6  1
%e A055801   1  1  1  2  3  5  8 13 20 26 25 16  6  1
%e A055801   1  1  1  2  3  5  8 13 21 32 40 36 21  7  1
%e A055801   1  1  1  2  3  5  8 13 21 33 46 51 41 22  7  1
%e A055801 T(9,6) counts the strings 3456, 1236, 1256, 1456, 036, 016, 056.
%e A055801 T(9,6) counts the compositions 111, 113, 131, 311, 33, 15, 51.
%p A055801 A055801 := proc(i,j) option remember;
%p A055801     if j =0 or j = i then 1;
%p A055801     elif i < 0 or j < 0 then 0;
%p A055801     else add(procname(i-2*k,j-2*k+1),k=1..floor(i/2)) ;
%p A055801     end if;
%p A055801 end proc:
%p A055801 seq(seq(A055801(n,k), k=0..n),n=0..20); # _R. J. Mathar_, Feb 11 2018
%t A055801 T[n_, k_]:= T[n, k]= If[n<0 || k<0, 0, If[k==0 || k==n, 1, Sum[T[n-2*j, k-2*j+1 ], {j, Floor[n/2]}]]]; Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* _G. C. Greubel_, Jan 23 2020 *)
%o A055801 (PARI) T(n,k) = if(n<0 || k<0, 0, if(k==0 || k==n, 1, sum(j=1, n\2, T(n-2*j, k-2*j+1))));
%o A055801 for(n=0,15, for(k=0,n, print1(T(n,k), ", "))) \\ _G. C. Greubel_, Jan 23 2020
%o A055801 (Magma)
%o A055801 function T(n,k)
%o A055801   if n lt 0 or k lt 0 then return 0;
%o A055801   elif k eq 0 or k eq n then return 1;
%o A055801   else return (&+[T(n-2*j, k-2*j+1): j in [1..Floor(n/2)]]);
%o A055801   end if; return T; end function;
%o A055801 [T(n,k): k in [0..n], n in [0..15]]; // _G. C. Greubel_, Jan 23 2020
%o A055801 (Sage)
%o A055801 @CachedFunction
%o A055801 def T(n, k):
%o A055801     if (n<0 or k<0): return 0
%o A055801     elif (k==0 or k==n): return 1
%o A055801     else: return sum(T(n-2*j, k-2*j+1) for j in (1..floor(n/2)))
%o A055801 [[T(n, k) for k in (0..n)] for n in (0..15)] # _G. C. Greubel_, Jan 23 2020
%o A055801 (GAP)
%o A055801 T:= function(n,k)
%o A055801     if n<0 or k<0 then return 0;
%o A055801     elif k=0 or k=n then return 1;
%o A055801     else return Sum([1..Int(n/2)], j-> T(n-2*j, k-2*j+1));
%o A055801     fi; end;
%o A055801 Flat(List([0..15], n-> List([0..n], k-> T(n,k) ))); # _G. C. Greubel_, Jan 23 2020
%Y A055801 Infinitely many of the columns are (1, 1, 1, 2, 3, 5, 8, ..., Fibonacci numbers)
%Y A055801 Essentially a reflected version of A011794.
%Y A055801 Cf. A055802, A055803, A055804, A055805, A055806.
%K A055801 nonn,tabl,easy
%O A055801 0,14
%A A055801 _Clark Kimberling_, May 28 2000