login
Triangle read by rows: T(n, k) = binomial(n,k)*prime(k)*prime(n-k), for 1 <= k <= n-1, n >= 1, with T(0, 0) = 1, T(n, 0) = T(n, n) = prime(n).
5

%I #15 Oct 26 2024 10:45:08

%S 1,2,2,3,8,3,5,18,18,5,7,40,54,40,7,11,70,150,150,70,11,13,132,315,

%T 500,315,132,13,17,182,693,1225,1225,693,182,17,19,272,1092,3080,3430,

%U 3080,1092,272,19,23,342,1836,5460,9702,9702,5460,1836,342,23

%N Triangle read by rows: T(n, k) = binomial(n,k)*prime(k)*prime(n-k), for 1 <= k <= n-1, n >= 1, with T(0, 0) = 1, T(n, 0) = T(n, n) = prime(n).

%C For the purpose of this sequence define prime(0)=1.

%H G. C. Greubel, <a href="/A141617/b141617.txt">Rows n = 0..100 of the triangle, flattened</a>

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

%e Triangle begins as:

%e 1;

%e 2, 2;

%e 3, 8, 3;

%e 5, 18, 18, 5;

%e 7, 40, 54, 40, 7;

%e 11, 70, 150, 150, 70, 11;

%e 13, 132, 315, 500, 315, 132, 13;

%e 17, 182, 693, 1225, 1225, 693, 182, 17;

%e 19, 272, 1092, 3080, 3430, 3080, 1092, 272, 19;

%e 23, 342, 1836, 5460, 9702, 9702, 5460, 1836, 342, 23;

%e 29, 460, 2565, 10200, 19110, 30492, 19110, 10200, 2565, 460, 29;

%e ...

%p p:= n-> `if`(n=0, 1, ithprime(n)):

%p T:= (n, k)-> binomial(n, k)*p(k)*p(n-k):

%p seq(seq(T(n, k), k=0..n), n=0..10); # _Alois P. Heinz_, Apr 26 2023

%t A141617[n_, k_]:= If[n==0, 1, If[k==0 || k==n, Prime[n], Binomial[n, k]*Prime[k]*Prime[n-k]]];

%t Table[A414617[n,k], {n,0,12}, {k,0,n}]//Flatten

%o (Magma)

%o function A141617(n,k)

%o if n eq 0 then return 1;

%o else return Binomial(n,k)*NthPrime(k)*NthPrime(n-k);

%o end if;

%o end function;

%o [A141617(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Oct 26 2024

%o (SageMath)

%o def A141617(n,k):

%o if n==0: return 1

%o elif k==0 or k==n: return nth_prime(n)

%o else: return binomial(n,k)*nth_prime(k)*nth_prime(n-k)

%o flatten([[A141617(n,k) for k in range(n+1)] for n in range(13)]) # _G. C. Greubel_, Oct 26 2024

%Y Cf. A008578, A098350.

%K nonn,easy,tabl

%O 0,2

%A _Roger L. Bagula_ and _Gary W. Adamson_, Aug 23 2008