login
Table read by rows, T(n,k) = (-1)^(n-k)*2^(2*k-bw(k)), where bw(k) is the binary weight of k (A000120).
2

%I #31 Sep 24 2024 11:23:41

%S 1,-1,2,1,-2,8,-1,2,-8,16,1,-2,8,-16,128,-1,2,-8,16,-128,256,1,-2,8,

%T -16,128,-256,1024,-1,2,-8,16,-128,256,-1024,2048,1,-2,8,-16,128,-256,

%U 1024,-2048,32768,-1,2,-8,16,-128,256,-1024,2048,-32768,65536,1,-2,8,-16,128,-256,1024,-2048,32768,-65536,262144

%N Table read by rows, T(n,k) = (-1)^(n-k)*2^(2*k-bw(k)), where bw(k) is the binary weight of k (A000120).

%C Old name was: Table of the numerators of the higher order differences of the binomial transform of the Madhava-Gregory-Leibniz series for Pi/4.

%C The binomial transform of 1, -1/3, 1/5, -1/7, 1/9 is given by the sequence A046161(n)/A001803(n).

%C This sequence of fractions and its higher order differences in the subsequent rows start as:

%C 1, 2/3, 8/15, 16/35, 128/315, 256/693, 1024/3003, ...

%C -1/3, -2/15, -8/105, -16/315, -128/3465, -256/9009, -1024/45045, ...

%C 1/5, 2/35, 8/315, 16/1155, 128/15015, 256/45045, 1024/255255, ...

%C -1/7, -2/64, -8/693, -16/3003, -128/45045, ...

%C The numerators of this array, read upwards along antidiagonals, define the current sequence.

%H G. C. Greubel, <a href="/A173755/b173755.txt">Rows n = 0..50 of the triangle, flattened</a>

%F T(n,k) = (-1)^(n-k)*denom(binomial(-1/2,k)). _Peter Luschny_, Nov 21 2012

%e Triangle begins:

%e 1;

%e -1, 2;

%e 1, -2, 8;

%e -1, 2, -8, 16;

%e 1, -2, 8, -16, 128;

%e -1, 2, -8, 16, -128, 256;

%e 1, -2, 8, -16, 128, -256, 1024;

%p A173755 := proc(n,k)

%p local L,i;

%p L := [seq((-1)^i/(2*i+1),i=0..n+k)] ;

%p L := BINOMIAL(L);

%p for i from 1 to n do

%p L := DIFF(L) ;

%p end do:

%p op(1+k,L) ;

%p numer(%) ;

%p end proc: # _R. J. Mathar_, Sep 22 2011

%p A173755 := proc(n, k) local w; w := proc(n) option remember;

%p `if`(n=0,1,2^(padic[ordp](2*n,2))*w(n-1)) end: (-1)^(n-k)*w(k) end:

%p for n from 0 to 8 do seq(A173755(n,k),k=0..n) od; # _Peter Luschny_, Nov 16 2012

%t Table[(-1)^(n - k)*2^(2 k - DigitCount[k, 2, 1]), {n, 0, 10}, {k, 0, n}] // Flatten (* _Michael De Vlieger_, Apr 21 2019 *)

%o (Sage)

%o def A173755(n,k):

%o A005187 = lambda n: A005187(n//2) + n if n > 0 else 0

%o return (-1)^(n-k)*2^A005187(k)

%o for n in (0..8):

%o [A173755(n,k) for k in (0..n)] # _Peter Luschny_, Nov 16 2012

%o (Magma)

%o A173755:= func< n,k | (-1)^(n-k)*2^(k + Valuation(Factorial(k), 2)) >;

%o [A173755(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Sep 24 2024

%Y Cf. A001803, A005187, A046161.

%K tabl,sign

%O 0,3

%A _Paul Curtz_, Feb 23 2010

%E Simpler definition by _Peter Luschny_, Nov 21 2012