OFFSET
1,1
LINKS
Reinhard Zumkeller, Rows n = 1..150 of triangle, flattened
EXAMPLE
See A255313.
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] = Union[2 MovingAverage[
Table[A[n+1, k], {k, 1, n+1}], {1, 1}]];
Array[T, 20] // Flatten (* Jean-François Alcover, Aug 02 2021 *)
PROG
(Haskell)
import Data.List (nub, sort)
a255316 n k = a255316_tabf !! (n-1) !! (k-1)
a255316_row n = a255316_tabf !! (n-1)
a255316_tabf = map (sort . nub) a255313_tabl
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Reinhard Zumkeller, Feb 22 2015
STATUS
approved