OFFSET
1,1
COMMENTS
LINKS
Reinhard Zumkeller, Rows n = 1..125 of triangle, flattened
EXAMPLE
. n | T(n,k) | A255316
. ---+--------------------------------------------+----------------------
. 1 | 3 | 3
. 2 | 5 3 | 3 5
. 3 | 7 5 3 | 3 5 7
. 4 | 7 5 7 5 | 5 7
. 5 | 11 7 5 7 5 | 5 7 11
. 6 | 13 11 7 5 7 5 | 5 7 11 13
. 7 | 13 11 13 11 7 5 3 | 3 5 7 11 13
. 8 | 17 13 11 13 11 7 5 3 | 3 5 7 11 13 17
. 9 | 19 17 13 11 13 11 7 5 3 | 3 5 7 11 13 17 19
. 10 | 19 17 19 17 13 11 7 5 7 5 | 5 7 11 13 17 19
. 11 | 23 19 17 19 17 13 11 7 5 7 5 | 5 7 11 13 17 19 23
. 12 | 23 19 17 19 23 19 13 11 7 5 7 5 | 5 7 11 13 17 19 23
. 13 | 23 19 23 19 17 23 19 11 7 11 13 7 3 | 3 7 11 13 17 19 23
. 14 | 29 23 19 23 19 17 23 19 11 7 11 13 7 3 | 3 7 11 13 17 19 23 29
MATHEMATICA
(* A is A088643 *)
A[n_, 1] := n;
A[n_, k_] := A[n, k] = For[m = n-1, m >= 1, m--, If[PrimeQ[m + A[n, k-1]] && FreeQ[Table[A[n, j], {j, 1, k-1}], m], Return[m]]];
T[n_] := T[n] = 2 MovingAverage[Table[A[n+1, k], {k, 1, n+1}], {1, 1}];
Array[T, 14] // Flatten (* Jean-François Alcover, Aug 02 2021 *)
PROG
(Haskell)
a255313 n k = a255313_tabl !! (n-1) !! (k-1)
a255313_row n = a255313_tabl !! (n-1)
a255313_tabl = zipWith (zipWith (+)) tss $ map tail tss
where tss = tail a088643_tabl
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Reinhard Zumkeller, Feb 22 2015
STATUS
approved