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.

A199333 Triangle read by rows: T(n,0) = T(n,n) = 1, 0 < k < n: T(n,k) = smallest prime not less than T(n-1,k) + T(n-1,k-1).

This page as a plain text file.
%I A199333 #25 Apr 15 2025 19:13:20
%S A199333 1,1,1,1,2,1,1,3,3,1,1,5,7,5,1,1,7,13,13,7,1,1,11,23,29,23,11,1,1,13,
%T A199333 37,53,53,37,13,1,1,17,53,97,107,97,53,17,1,1,19,71,151,211,211,151,
%U A199333 71,19,1,1,23,97,223,367,431,367,223,97,23,1,1,29,127
%N A199333 Triangle read by rows: T(n,0) = T(n,n) = 1, 0 < k < n: T(n,k) = smallest prime not less than T(n-1,k) + T(n-1,k-1).
%C A199333 T(n,k) = T(n,n-k);
%C A199333 T(n,0) = 1, cf. A000012;
%C A199333 T(n,1) = A008578(n), n > 0;
%C A199333 A199424(n) = first row in triangle A199302 containing n-th prime;
%C A199333 A199425(n) = number of distinct primes in rows 0 through n;
%C A199333 large terms in the b-file are probable primes only, row number > 50.
%H A199333 Reinhard Zumkeller, <a href="/A199333/b199333.txt">Rows n = 0..150 of triangle, flattened</a>
%H A199333 <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>
%F A199333 T(n,k) = A007918(T(n-1,k) + T(n-1,k-1)), 0 < k < n, T(n,0) = T(n,n) = 1.
%e A199333 0:                 1
%e A199333 1:               1   1
%e A199333 2:             1   2   1
%e A199333 3:           1   3   3   1
%e A199333 4:         1   5   7   5   1
%e A199333 5:       1   7  13  13   7   1
%e A199333 6:     1  11  23  29  23  11   1
%e A199333 7:   1  13  37  53  53  37  13   1
%e A199333 8: 1  17  53  97 107  97  53  17   1
%e A199333 primes in 8th row:
%e A199333 T(7,0) + T(7,1) = 1+13 = 14 --> T(8,1) = T(8,7) = 19;
%e A199333 T(7,1) + T(7,2) = 13+37 = 50 --> T(8,2) = T(8,6) = 53, already in row 7;
%e A199333 T(7,2) + T(7,3) = 37+53 = 90 --> T(8,3) = T(8,5) = 97;
%e A199333 T(7,3) + T(7,4) = 53+53 = 106 --> T(8,4) = 107.
%t A199333 T[n_, k_] := T[n, k] = Switch[k, 0|n, 1, _, With[{m = T[n-1, k] + T[n-1, k-1]}, If[PrimeQ[m], m, NextPrime[m]]]];
%t A199333 Table[T[n, k], {n, 0, 13}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Sep 19 2021 *)
%o A199333 (Haskell)
%o A199333 a199333 n k = a199333_tabl !! n !! k
%o A199333 a199333_row n = a199333_tabl !! n
%o A199333 a199333_list = concat a199333_tabl
%o A199333 a199333_tabl = iterate
%o A199333    (\row -> map a159477 $ zipWith (+) ([0] ++ row) (row ++ [0])) [1]
%Y A199333 Cf. A159477; A199581 & A199582 (central terms), A199694 (row sums), A199695 & A199696 (row products); A007318.
%Y A199333 Cf. A132403, A362034.
%K A199333 nonn,tabl
%O A199333 0,5
%A A199333 _Reinhard Zumkeller_, Nov 09 2011