OFFSET
1,1
LINKS
G. C. Greubel, Rows n = 1..100 of the irregular triangle, flattened
FORMULA
T(n, k) = prime(k) + 2*Sum_{j=1..n-1} j, for n >= 1 and 1 <= k <= 1 + A000720(n).
T(n, k) = prime(n) + k*(k-1).
EXAMPLE
Irregular triangle begins as:
2;
3, 5;
5, 7, 11;
7, 9, 13;
11, 13, 17, 23;
13, 15, 19, 25;
17, 19, 23, 29, 37;
19, 21, 25, 31, 39;
23, 25, 29, 35, 43;
29, 31, 35, 41, 49;
MATHEMATICA
T[n_, k_]:= Prime[n] + k*(k-1);
Table[T[n, k], {n, 20}, {k, PrimePi[n]+1}]//Flatten
PROG
(Magma)
A120724:= func< n, k | NthPrime(n) +k*(k-1) >;
[A120724(n, k): k in [1..#PrimesUpTo(n)+1], n in [1..20]]; // G. C. Greubel, Jul 20 2023
(SageMath)
def A120724(n, k): return nth_prime(n) + k*(k-1)
flatten([[A120724(n, k) for k in range(1, prime_pi(n)+2)] for n in range(1, 21)]) # G. C. Greubel, Jul 20 2023
CROSSREFS
KEYWORD
nonn,tabf,easy
AUTHOR
Roger L. Bagula, Aug 18 2006
EXTENSIONS
Edited by G. C. Greubel, Jul 20 2023
STATUS
approved