login
A153654
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 = 9, read by rows.
14
2, 23, 23, 2, 1054, 2, 2, 12165, 12165, 2, 2, 13041, 484928, 13041, 2, 2, 13917, 5814074, 5814074, 13917, 2, 2, 14793, 11526908, 223541684, 11526908, 14793, 2, 2, 15669, 17623430, 2775818930, 2775818930, 17623430, 15669, 2, 2, 16545, 24103640, 7830701156, 103239353768, 7830701156, 24103640, 16545, 2
OFFSET
1,1
FORMULA
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 = 9.
From G. C. Greubel, Mar 04 2021: (Start)
Sum_{k=0..n} T(n, k, 10) = -(68/361)*[n=0] - (92/19)*[n=1] + 1058*(i*sqrt(437))^(n-2)*(ChebyshevU(n-2, -i/sqrt(437)) - (21*i/sqrt(437))*ChebyshevU(n-3, -i/sqrt(437) )).
Row sums satisfy the recurrence S(n) = 2*S(n-1) + 437*S(n-2) for n>4 with S(0) = 2, S(1) = 46, S(2) = 1058, S(3) = 24334. (End)
EXAMPLE
Triangle begins as:
2;
23, 23;
2, 1054, 2;
2, 12165, 12165, 2;
2, 13041, 484928, 13041, 2;
2, 13917, 5814074, 5814074, 13917, 2;
2, 14793, 11526908, 223541684, 11526908, 14793, 2;
2, 15669, 17623430, 2775818930, 2775818930, 17623430, 15669, 2;
2, 16545, 24103640, 7830701156, 103239353768, 7830701156, 24103640, 16545, 2;
MATHEMATICA
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] ]]];
Table[T[n, k, 9], {n, 12}, {k, n}]//Flatten (* modified by G. C. Greubel, Mar 03 2021 *)
PROG
(Sage)
@CachedFunction
def f(n, j): return ((3-(-1)^n)/2)*nth_prime(j)^(n-1) - 2^((3-(-1)^n)/2)
def T(n, k, j):
if (n==2): return nth_prime(j)
elif (n==3 and k==2 or n==4 and 2<=k<=3): return f(n, j)
elif (k==1 or k==n): return 2
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)
flatten([[T(n, k, 9) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Mar 03 2021
(Magma)
f:= func< n, j | Round(((3-(-1)^n)/2)*NthPrime(j)^(n-1) - 2^((3-(-1)^n)/2)) >;
function T(n, k, j)
if n eq 2 then return NthPrime(j);
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);
elif (k eq 1 or k eq n) then return 2;
else return T(n-1, k, j) + T(n-1, k-1, j) + (2*j+1)*NthPrime(j)*T(n-2, k-1, j);
end if; return T;
end function;
[T(n, k, 9): k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 03 2021
CROSSREFS
Cf. A153652 (j=7), A153653 (j=8), this sequence (j=9), A153655 (j=10).
Sequence in context: A158992 A128365 A326954 * A153656 A242037 A233692
KEYWORD
nonn,tabl,easy,less
AUTHOR
Roger L. Bagula, Dec 30 2008
EXTENSIONS
Edited by G. C. Greubel, Mar 03 2021
STATUS
approved