[go: up one dir, main page]

login
A166692
Triangle T(n,k) read by rows: T(n,k) = 2^(k-1), k>0, T(n,0) = (n+1) mod 2.
3
1, 0, 1, 1, 1, 2, 0, 1, 2, 4, 1, 1, 2, 4, 8, 0, 1, 2, 4, 8, 16, 1, 1, 2, 4, 8, 16, 32, 0, 1, 2, 4, 8, 16, 32, 64, 1, 1, 2, 4, 8, 16, 32, 64, 128, 0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024
OFFSET
0,6
COMMENTS
Variant of A166918.
FORMULA
T(2n, k) = A011782(k).
T(2n+1, k) = A131577(k).
Sum_{k=0..n} T(n,k) = A051049(n).
From G. C. Greubel, Apr 24 2023: (Start)
T(2*n, n) = A011782(n).
Sum_{k=0..n} (-1)^k*T(n, k) = (-1)^n * A005578(n).
Sum_{k=0..n} T(n-k, k) = A106624(n). (End)
EXAMPLE
Triangle begins as:
1;
0, 1;
1, 1, 2;
0, 1, 2, 4;
1, 1, 2, 4, 8;
0, 1, 2, 4, 8, 16;
MATHEMATICA
Join[{1, 0}, Flatten[Riffle[Table[2^Range[0, n], {n, 0, 10}], {1, 0}]]] (* Harvey P. Dale, Jan 18 2015 *)
PROG
(Magma)
A166692:= func< n, k | k eq 0 select ((n+1) mod 2) else 2^(k-1) >;
[A166692(n, k): k in [0..n], n in [0..15]]; // G. C. Greubel, Apr 24 2023
(SageMath)
def A166692(n, k): return ((n+1)%2) if (k==0) else 2^(k-1)
flatten([[A166692(n, k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Apr 24 2023
KEYWORD
nonn,easy,tabl
AUTHOR
Paul Curtz, Oct 18 2009
EXTENSIONS
More terms from Harvey P. Dale, Jan 18 2015
STATUS
approved