cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A255316 Distinct terms in triangle A255313, table read by rows.

This page as a plain text file.
%I A255316 #7 Aug 02 2021 07:56:16
%S A255316 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 A255316 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 A255316 11,13,17,19,23,3,7,11,13,17,19,23,29,3,7,11,13,17
%N A255316 Distinct terms in triangle A255313, table read by rows.
%H A255316 Reinhard Zumkeller, <a href="/A255316/b255316.txt">Rows n = 1..150 of triangle, flattened</a>
%e A255316 See A255313.
%t A255316 (* A is A088643 *)
%t A255316 A[n_, 1] := n;
%t A255316 A[n_, k_] := A[n, k] = For[m = n - 1, m >= 1, m--,
%t A255316      If[PrimeQ[m + A[n, k - 1]] &&
%t A255316      FreeQ[Table[A[n, j], {j, 1, k - 1}], m], Return[m]]];
%t A255316 T[n_] := T[n] = Union[2 MovingAverage[
%t A255316      Table[A[n+1, k], {k, 1, n+1}], {1, 1}]];
%t A255316 Array[T, 20] // Flatten (* _Jean-François Alcover_, Aug 02 2021 *)
%o A255316 (Haskell)
%o A255316 import Data.List (nub, sort)
%o A255316 a255316 n k = a255316_tabf !! (n-1) !! (k-1)
%o A255316 a255316_row n = a255316_tabf !! (n-1)
%o A255316 a255316_tabf = map (sort . nub) a255313_tabl
%Y A255316 Cf. A255313, A255395 (row lengths), A255427 (row products).
%K A255316 nonn,tabf
%O A255316 1,1
%A A255316 _Reinhard Zumkeller_, Feb 22 2015