login

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”).

Triangle T(n, k) = 2^(n+k-2)*prime(k) + (n mod 2) if k <= floor(n/2) otherwise 2^(2*n-k-2)*prime(n-k) + (n mod 2), with T(n, 0) = T(n, n) = 1, read by rows.
1

%I #7 Jan 09 2022 02:30:09

%S 1,1,1,1,4,1,1,9,9,1,1,16,48,16,1,1,33,97,97,33,1,1,64,192,640,192,64,

%T 1,1,129,385,1281,1281,385,129,1,1,256,768,2560,7168,2560,768,256,1,1,

%U 513,1537,5121,14337,14337,5121,1537,513,1,1,1024,3072,10240,28672,90112,28672,10240,3072,1024,1

%N Triangle T(n, k) = 2^(n+k-2)*prime(k) + (n mod 2) if k <= floor(n/2) otherwise 2^(2*n-k-2)*prime(n-k) + (n mod 2), with T(n, 0) = T(n, n) = 1, read by rows.

%H G. C. Greubel, <a href="/A157192/b157192.txt">Rows n = 0..50 of the triangle, flattened</a>

%F T(n, k) = 2^(n+k-2)*prime(k) + (n mod 2) if k <= floor(n/2) otherwise 2^(2*n-k-2)*prime(n-k) + (n mod 2), with T(n, 0) = T(n, n) = 1.

%F T(n, n-k) = T(n, k).

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, 4, 1;

%e 1, 9, 9, 1;

%e 1, 16, 48, 16, 1;

%e 1, 33, 97, 97, 33, 1;

%e 1, 64, 192, 640, 192, 64, 1;

%e 1, 129, 385, 1281, 1281, 385, 129, 1;

%e 1, 256, 768, 2560, 7168, 2560, 768, 256, 1;

%e 1, 513, 1537, 5121, 14337, 14337, 5121, 1537, 513, 1;

%e 1, 1024, 3072, 10240, 28672, 90112, 28672, 10240, 3072, 1024, 1;

%t f[n_, k_]:= Prime[k]*2^(n+k-2) + Mod[n,2];

%t T[n_, k_]:= If[k==0 || k==n, 1, If[k<=Floor[n/2], f[n, k], f[n, n-k] ]];

%t Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* modified by _G. C. Greubel_, Jan 09 2022 *)

%o (Sage)

%o def f(n,k): return 2^(n+k-2)*nth_prime(k) + (n%2)

%o def T(n,k):

%o if (k==0 or k==n): return 1

%o elif (k <= n//2): return f(n,k)

%o else: return f(n,n-k)

%o flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, Jan 09 2022

%K nonn,tabl

%O 0,5

%A _Roger L. Bagula_, Feb 24 2009

%E Edited by _G. C. Greubel_, Jan 09 2022