Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #8 Oct 04 2024 07:41:24
%S 1,1,1,1,37,1,1,361,361,1,1,3025,3601,3025,1,1,24481,30241,30241,
%T 24481,1,1,196417,244801,254017,244801,196417,1,1,1572481,1964161,
%U 2056321,2056321,1964161,1572481,1,1,12582145,15724801,16498945,16646401,16498945,15724801,12582145,1
%N Triangle read by rows: T(n, k) = 2^n*(q^k - 1)*(q^(n - k) - 1) + 1, where q = 4.
%H G. C. Greubel, <a href="/A176795/b176795.txt">Rows n = 0..50 of the triangle, flattened</a>
%F T(n, k) = 1 - (f(n+1, 2*k+1, q) - f(n+1, 1, q)) - (f(n+1, 2*n-2*k+1, q) - f(n+1, 2*n+1, q)), where f(n, k, q) = 2^(n-1) * q^((k-1)/2), and q = 4.
%F From _G. C. Greubel_, Oct 03 2024: (Start)
%F T(n, k) = 2^n*(4^k - 1)*(4^(n-k) - 1) + 1.
%F T(2*n, n) = 1 + 4^n*(4^n - 1)^2.
%F Sum_{k=0..n} T(n, k) = (1/3)*((3*n + 5)*2^n + (3*n - 5)*8^n) + (n + 1).
%F Sum_{k=0..n} (-1)^k*T(n, k) = (1/10)*(1 + (-1)^n)*(5 + 3*2^n - 3*8^n). (End)
%e Triangle begins as:
%e 1;
%e 1, 1;
%e 1, 37, 1;
%e 1, 361, 361, 1;
%e 1, 3025, 3601, 3025, 1;
%e 1, 24481, 30241, 30241, 24481, 1;
%e 1, 196417, 244801, 254017, 244801, 196417, 1;
%e 1, 1572481, 1964161, 2056321, 2056321, 1964161, 1572481, 1;
%e 1, 12582145, 15724801, 16498945, 16646401, 16498945, 15724801, 12582145, 1;
%t T[n_, k_, q_] := 2^n*(q^k - 1)*(q^(n - k) - 1) + 1;Table[T[n, k, 4], {n,0,12}, {k,0,n}]//Flatten
%o (Magma)
%o f:= func< n,k,q | 1 + (q^k-1)*(q^(n-k)-1)*2^n >;
%o A176795:= func< n,k | f(n,k,4) >;
%o [A176795(n,k): k in [0..n], n in [0..13]]; // _G. C. Greubel_, Oct 03 2024
%o (SageMath)
%o def f(n, k, q): return 1 + (q^k -1)*(q^(n-k) -1)*2^n
%o def A176795(n,k): return f(n,k,4)
%o flatten([[A176795(n, k) for k in range(n+1)] for n in range(14)]) # _G. C. Greubel_, Oct 03 2024
%Y Cf. A000012 (q=1), A176793 (q=2), A176794 (q=3), this sequence (q=4).
%K nonn,tabl
%O 0,5
%A _Roger L. Bagula_, Apr 26 2010
%E Edited by _G. C. Greubel_, Oct 04 2024