Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #7 Aug 02 2021 07:56:16
%S 3,3,5,3,5,7,5,7,5,7,11,5,7,11,13,3,5,7,11,13,3,5,7,11,13,17,3,5,7,11,
%T 13,17,19,5,7,11,13,17,19,5,7,11,13,17,19,23,5,7,11,13,17,19,23,3,7,
%U 11,13,17,19,23,3,7,11,13,17,19,23,29,3,7,11,13,17
%N Distinct terms in triangle A255313, table read by rows.
%H Reinhard Zumkeller, <a href="/A255316/b255316.txt">Rows n = 1..150 of triangle, flattened</a>
%e See A255313.
%t (* A is A088643 *)
%t A[n_, 1] := n;
%t A[n_, k_] := A[n, k] = For[m = n - 1, m >= 1, m--,
%t If[PrimeQ[m + A[n, k - 1]] &&
%t FreeQ[Table[A[n, j], {j, 1, k - 1}], m], Return[m]]];
%t T[n_] := T[n] = Union[2 MovingAverage[
%t Table[A[n+1, k], {k, 1, n+1}], {1, 1}]];
%t Array[T, 20] // Flatten (* _Jean-François Alcover_, Aug 02 2021 *)
%o (Haskell)
%o import Data.List (nub, sort)
%o a255316 n k = a255316_tabf !! (n-1) !! (k-1)
%o a255316_row n = a255316_tabf !! (n-1)
%o a255316_tabf = map (sort . nub) a255313_tabl
%Y Cf. A255313, A255395 (row lengths), A255427 (row products).
%K nonn,tabf
%O 1,1
%A _Reinhard Zumkeller_, Feb 22 2015