A057728 A triangular table of decreasing powers of two (with first column all ones).
1, 1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 8, 4, 2, 1, 1, 16, 8, 4, 2, 1, 1, 32, 16, 8, 4, 2, 1, 1, 64, 32, 16, 8, 4, 2, 1, 1, 128, 64, 32, 16, 8, 4, 2, 1, 1, 256, 128, 64, 32, 16, 8, 4, 2, 1, 1, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 1, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 1, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1
Offset: 1
Examples
Triangle starts: 1, 1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 8, 4, 2, 1, 1, 16, 8, 4, 2, 1, 1, 32, 16, 8, 4, 2, 1, 1, 64, 32, 16, 8, 4, 2, 1, 1, 128, 64, 32, 16, 8, 4, 2, 1, 1, 256, 128, 64, 32, 16, 8, 4, 2, 1, 1, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 1, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 1, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, ... - _Joerg Arndt_, May 04 2014 When viewed as a triangular array, row 8 of A023758 is 128 192 224 240 248 252 254 255 so row 8 here is 1 64 32 16 8 4 2 1 From _Mats Granvik_, Jan 19 2009: (Start) Except for the first term the table can also be formatted as: 1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 8, 4, 2, 1, 1, 16, 8, 4, 2, 1, 1, ... (End)
Links
- Reinhard Zumkeller, Rows n = 1..100 of table, flattened
Crossrefs
Programs
-
Haskell
a057728 n k = a057728_tabl !! (n-1) !! (k-1) a057728_row n = a057728_tabl !! (n-1) a057728_tabl = iterate (\row -> zipWith (+) (row ++ [0]) ([0] ++ tail row ++ [1])) [1] -- Reinhard Zumkeller, Aug 08 2013
-
Mathematica
nn=10;Map[Select[#,#>0&]&,CoefficientList[Series[(x-x^2)/(1-2x)/(1-y x),{x,0,nn}],{x,y}]]//Grid (* Geoffrey Critzer, Jan 28 2014 *) Module[{nn=12,ts},ts=2^Range[0,nn];Table[Join[{1},Reverse[Take[ts,n]]],{n,0,nn}]]//Flatten (* Harvey P. Dale, Jan 15 2022 *)
-
Maxima
T(n, k) := if k = 0 then 1 else 2^(n - k - 1)$ create_list(T(n, k), n, 0, 12, k, 0, n - 1); /* Franck Maminirina Ramaharo, Jan 09 2019 */
Formula
G.f.: (x - x^2)/((1 - 2*x)*(1 - y*x)). - Geoffrey Critzer, Jan 28 2014 [This produces the triangle shown by Mats Granvik in example section. - Franck Maminirina Ramaharo, Jan 09 2019]
From Franck Maminirina Ramaharo, Jan 09 2019: (Start)
G.f.: x*(1 - 2*x + y*x^2)/((1 - x)*(1 - 2*x)*(1 - x*y)).
E.g.f.: (exp(2*x)*y - 2*exp(x*y))/(4 - 2*y) + exp(x) - 1/2. (End)
Extensions
More terms from Larry Reeves (larryr(AT)acm.org), Oct 30 2000
Comments