login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Triangle T(n, k, j) = T(n-1, k, j) + T(n-1, k-1, j) + (2*j + 1)*prime(j)*T(n-2, k-1, j) with T(2, k, j) = prime(j) and j = 10, read by rows.
14

%I #19 Mar 04 2021 10:59:46

%S 2,29,29,2,1678,2,2,24387,24387,2,2,25607,1070676,25607,2,2,26827,

%T 15947966,15947966,26827,2,2,28047,31569456,683937616,31569456,28047,

%U 2,2,29267,47935146,10427818366,10427818366,47935146,29267,2,2,30487,65045036,29701552216,437373644876,29701552216,65045036,30487,2

%N Triangle T(n, k, j) = T(n-1, k, j) + T(n-1, k-1, j) + (2*j + 1)*prime(j)*T(n-2, k-1, j) with T(2, k, j) = prime(j) and j = 10, read by rows.

%H G. C. Greubel, <a href="/A153655/b153655.txt">Rows n = 1..50 of the triangle, flattened</a>

%F T(n, k, j) = T(n-1, k, j) + T(n-1, k-1, j) + (2*j + 1)*prime(j)*T(n-2, k-1, j) with T(2, k, j) = prime(j), T(3, 2, j) = 2*prime(j)^2 - 4, T(4, 2, j) = T(4, 3, j) = prime(j)^2 - 2, T(n, 1, j) = T(n, n, j) = 2 and j = 10.

%F From _G. C. Greubel_, Mar 04 2021: (Start)

%F Sum_{k=0..n} T(n, k, 10) = -(76/147)*[n=0] - (116/7)*[n=1] + 1682*(i*sqrt(609))^(n-2)*(ChebyshevU(n-2, -i/sqrt(609)) - (27*i/sqrt(609))*ChebyshevU(n-3, -i/sqrt(609) )).

%F Row sums satisfy the recurrence S(n) = 2*S(n-1) + 609*S(n-2) for n>4 with S(0) = 2, S(1) = 58, S(2) = 1682, S(3) = 48778. (End)

%e Triangle begins as:

%e 2;

%e 29, 29;

%e 2, 1678, 2;

%e 2, 24387, 24387, 2;

%e 2, 25607, 1070676, 25607, 2;

%e 2, 26827, 15947966, 15947966, 26827, 2;

%e 2, 28047, 31569456, 683937616, 31569456, 28047, 2;

%e 2, 29267, 47935146, 10427818366, 10427818366, 47935146, 29267, 2;

%e 2, 30487, 65045036, 29701552216, 437373644876, 29701552216, 65045036, 30487, 2;

%t T[n_, k_, j_]:= T[n,k,j]= If[n==2, Prime[j], If[n==3 && k==2 || n==4 && 2<=k<=3, ((3-(-1)^n)/2)*Prime[j]^(n-1) -2^((3-(-1)^n)/2), If[k==1 || k==n, 2, T[n-1,k,j] + T[n-1,k-1,j] + (2*j+1)*Prime[j]*T[n-2,k-1,j] ]]];

%t Table[T[n,k,10], {n,12}, {k,n}]//Flatten (* modified by _G. C. Greubel_, Mar 03 2021 *)

%o (Sage)

%o @CachedFunction

%o def f(n,j): return ((3-(-1)^n)/2)*nth_prime(j)^(n-1) - 2^((3-(-1)^n)/2)

%o def T(n,k,j):

%o if (n==2): return nth_prime(j)

%o elif (n==3 and k==2 or n==4 and 2<=k<=3): return f(n,j)

%o elif (k==1 or k==n): return 2

%o else: return T(n-1,k,j) + T(n-1,k-1,j) + (2*j+1)*nth_prime(j)*T(n-2,k-1,j)

%o flatten([[T(n,k,10) for k in (1..n)] for n in (1..12)]) # _G. C. Greubel_, Mar 03 2021

%o (Magma)

%o f:= func< n,j | Round(((3-(-1)^n)/2)*NthPrime(j)^(n-1) - 2^((3-(-1)^n)/2)) >;

%o function T(n,k,j)

%o if n eq 2 then return NthPrime(j);

%o elif (n eq 3 and k eq 2 or n eq 4 and k eq 2 or n eq 4 and k eq 3) then return f(n,j);

%o elif (k eq 1 or k eq n) then return 2;

%o else return T(n-1,k,j) + T(n-1,k-1,j) + (2*j+1)*NthPrime(j)*T(n-2,k-1,j);

%o end if; return T;

%o end function;

%o [T(n,k,10): k in [1..n], n in [1..12]]; // _G. C. Greubel_, Mar 03 2021

%Y Cf. A153652 (j=7), A153653 (j=8), A153654 (j=9), this sequence (j=10).

%Y Cf. A153516, A153518, A153520, A153521, A153648, A153649, A153650, A153651, A153656, A153657.

%K nonn,tabl,easy,less

%O 1,1

%A _Roger L. Bagula_, Dec 30 2008

%E Edited by _G. C. Greubel_, Mar 03 2021