OFFSET
1,1
LINKS
G. C. Greubel, Rows n = 1..50 of the triangle, flattened
FORMULA
Form an array t(m,n) (n >= 1, 1 <= m <= n) by: t(1,n) = prime(n) for all n; t(m+1,n) = (n-m)*floor( (t(m,n) - 1)/(n-m) ) for 1 <= m <= n-1.
EXAMPLE
Triangle begins as:
2;
2, 3;
3, 4, 5;
3, 4, 6, 7;
3, 4, 6, 8, 11;
3, 4, 6, 8, 10, 13;
3, 4, 6, 8, 10, 12, 17;
3, 4, 6, 8, 10, 12, 14, 19;
3, 4, 6, 8, 10, 12, 14, 16, 23;
7, 8, 9, 12, 15, 18, 21, 24, 27, 29;
MATHEMATICA
t[n_, k_]:= t[n, k]= If[k==1, Prime[n], (n-k+1)*Floor[(t[n, k-1] -1)/(n -k+1)]];
Table[t[n, n-k+1], {n, 15}, {k, n}]//Flatten (* G. C. Greubel, Apr 07 2023 *)
PROG
(Magma)
function t(n, k) // t = A119444
if k eq 1 then return NthPrime(n);
else return (n-k+1)*Floor((t(n, k-1) -1)/(n-k+1));
end if;
end function;
[t(n, n-n+1): k in [1..n], n in [1..15]]; // G. C. Greubel, Apr 07 2023
(SageMath)
def t(n, k):
if (k==1): return nth_prime(n)
else: return (n-k+1)*((t(n, k-1) -1)//(n-k+1))
flatten([[t(n, n-k+1) for k in range(1, n+1)] for n in range(1, 16)]) # G. C. Greubel, Apr 07 2023
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Joshua Zucker, May 20 2006
STATUS
approved