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.

A154221 A simple Pascal-like triangle.

This page as a plain text file.
%I A154221 #13 Sep 08 2022 08:45:40
%S A154221 1,1,1,1,2,1,1,3,3,1,1,5,5,5,1,1,9,9,9,9,1,1,17,17,17,17,17,1,1,33,33,
%T A154221 33,33,33,33,1,1,65,65,65,65,65,65,65,1,1,129,129,129,129,129,129,129,
%U A154221 129,1,1,257,257,257,257,257,257,257,257,257,1
%N A154221 A simple Pascal-like triangle.
%C A154221 First column is A094373. Central coefficients are A123166.
%C A154221 Row sums are A154222. Diagonal sums are A154223.
%H A154221 G. C. Greubel, <a href="/A154221/b154221.txt">Table of n, a(n) for the first 50 rows</a>
%F A154221 T(n,k)= 1 + (2^(k-1)-0^k/2)*(2^(n-k-1)-0^(n-k)/2).
%e A154221 Triangle begins
%e A154221 1,
%e A154221 1, 1,
%e A154221 1, 2, 1,
%e A154221 1, 3, 3, 1,
%e A154221 1, 5, 5, 5, 1,
%e A154221 1, 9, 9, 9, 9, 1,
%e A154221 1, 17, 17, 17, 17, 17, 1,
%e A154221 1, 33, 33, 33, 33, 33, 33, 1,
%e A154221 1, 65, 65, 65, 65, 65, 65, 65, 1
%p A154221 A154221 := proc(n,k)
%p A154221     local f1,f2 ;
%p A154221     f1 := 2^(k-1) ;
%p A154221     if k = 0 then
%p A154221         f1 := f1-1/2 ;
%p A154221     end if;
%p A154221     f2 := 2^(n-k-1) ;
%p A154221     if n-k = 0 then
%p A154221         f2 := f2-1/2 ;
%p A154221     end if;
%p A154221     1+f1*f2 ;
%p A154221 end proc:
%p A154221 seq(seq(A154221(n,k),k=0..n),n=0..10) ; # _R. J. Mathar_, Feb 05 2015
%t A154221 f[n_, k_] := 1 + (1/4)*(2^(k) - 0^k)*(2^(n - k) - 0^(n - k)); Table[f[n, i], {n, 0, 49}, {i, 0, n}] // Flatten (* _G. C. Greubel_, Sep 06 2016 *)
%o A154221 (Magma) /* As triangle */ [[1+(2^(k-1)-0^k/2)*(2^(n-k-1)-0^(n-k)/2): k in [0..n]]: n in [0.. 15]]; // _Vincenzo Librandi_, Sep 06 2016
%K A154221 easy,nonn,tabl
%O A154221 0,5
%A A154221 _Paul Barry_, Jan 05 2009