Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #9 Oct 04 2024 07:41:06
%S 1,1,1,1,17,1,1,129,129,1,1,833,1025,833,1,1,5121,6657,6657,5121,1,1,
%T 30977,40961,43265,40961,30977,1,1,186369,247809,266241,266241,247809,
%U 186369,1,1,1119233,1490945,1610753,1638401,1610753,1490945,1119233,1
%N Triangle read by rows: T(n, k) = 2^n*(q^k - 1)*(q^(n - k) - 1) + 1, where q = 3.
%H G. C. Greubel, <a href="/A176794/b176794.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 = 3.
%F From _G. C. Greubel_, Oct 02 2024: (Start)
%F T(n, k) = 2^n*(3^k - 1)*(3^(n-k) - 1) + 1.
%F T(2*n, n) = 1 + 4^n*(3^n - 1)^2 = 1 + 16*A144843(n).
%F Sum_{k=0..n} T(n, k) = 2^n*(n + 2 + (n-2)*3^n) + (n+1).
%F Sum_{k=0..n} (-1)^k*T(n, k) = (1/4)*(1 + (-1)^n)*(2 + 2^n - 6^n). (End)
%e Triangle begins as:
%e 1;
%e 1, 1;
%e 1, 17, 1;
%e 1, 129, 129, 1;
%e 1, 833, 1025, 833, 1;
%e 1, 5121, 6657, 6657, 5121, 1;
%e 1, 30977, 40961, 43265, 40961, 30977, 1;
%e 1, 186369, 247809, 266241, 266241, 247809, 186369, 1;
%e 1, 1119233, 1490945, 1610753, 1638401, 1610753, 1490945, 1119233, 1;
%t T[n_, k_, q_] := 2^n*(q^k - 1)*(q^(n - k) - 1) + 1;
%t Table[T[n,k,3], {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 A176794:= func< n,k | f(n,k,3) >;
%o [A176794(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 A176794(n,k): return f(n,k,3)
%o flatten([[A176794(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), this sequence (q=3), A176795 (q=4).
%Y Cf. A144843.
%K nonn,tabl
%O 0,5
%A _Roger L. Bagula_, Apr 26 2010
%E Edited by _G. C. Greubel_, Oct 03 2024