Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #28 Dec 31 2022 01:45:29
%S 1,2,6,1,3,9,2,6,18,54,1,3,9,27,81,2,6,18,54,162,486,1,3,9,27,81,243,
%T 729,2,6,18,54,162,486,1458,4374,1,3,9,27,81,243,729,2187,6561,2,6,18,
%U 54,162,486,1458,4374,13122,39366,1,3,9,27,81,243,729,2187,6561,19683,59049
%N Triangular read by rows: T(n, k) = 3^k * (1 + (n mod 2)).
%D Lynn Arthur Steen and J. Arthur Seebach, Jr., Counterexamples in Topology, Dover, New York, 1978, pp. 57-58.
%H G. C. Greubel, <a href="/A122761/b122761.txt">Rows n = 0..50 of the triangle, flattened</a>
%F T(n, k) = 3^k * (1 + (n mod 2)).
%F From _G. C. Greubel_, Dec 30 2022: (Start)
%F T(n, k) = 3^k*(3 - (-1)^n)/2.
%F T(n, 0) = (3 - (-1)^n)/2.
%F T(n, n) = 3^n*(3 - (-1)^n)/2.
%F T(2*n, n) = A000244(n).
%F T(2*n+1, n+1) = 6*T(2*n, n).
%F T(2*n+1, n) = 2*T(2*n, n).
%F T(2*n+1, n-1) = 6*T(2*n, n).
%F Sum_{k=0..n} T(n, k) = (1/4)*(3 - (-1)^n)*(3^(n+1) - 1).
%F Sum_{k=0..n} (-1)^k*T(n, k) = (1/8)*(3 - (-1)^n)*(1 + (-1)^n*3^(n+1)).
%F Sum_{k=0..floor(n/2)} T(n-k, k) = (1/8)*(3*(6 - (-1)^binomial(n+1, 2))*3^floor(n/2) - (6 + (-1)^n)). (End)
%e Triangle begins as:
%e 1;
%e 2, 6;
%e 1, 3, 9;
%e 2, 6, 18, 54;
%e 1, 3, 9, 27, 81;
%e 2, 6, 18, 54, 162, 486;
%e 1, 3, 9, 27, 81, 243, 729;
%t Table[3^k*(1+Mod[n,2]), {n,0,10}, {k,0,n}]//Flatten
%o (Magma) [3^k*(3-(-1)^n)/2: k in [0..n], n in [0..12]]; // _G. C. Greubel_, Dec 30 2022
%o (SageMath)
%o def A122761(n,k): return 3^k*(3-(-1)^n)/2
%o flatten([[A122761(n,k) for k in range(n+1)] for n in range(13)]) # _G. C. Greubel_, Dec 30 2022
%Y Cf. A000244.
%K nonn,tabl,easy
%O 0,2
%A _Roger L. Bagula_, Sep 21 2006
%E Name and formula corrected by _Jon Perry_, Oct 15 2012
%E Edited by _G. C. Greubel_, Dec 30 2022