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.

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

Original entry on oeis.org

2, 2, 2, 2, 5, 2, 2, 7, 7, 2, 2, 11, 17, 11, 2, 2, 13, 29, 29, 13, 2, 2, 17, 43, 59, 43, 17, 2, 2, 19, 61, 103, 103, 61, 19, 2, 2, 23, 83, 167, 211, 167, 83, 23, 2, 2, 29, 107, 251, 379, 379, 251, 107, 29, 2, 2, 31, 137, 359, 631, 761, 631, 359, 137, 31, 2
Offset: 0

Views

Author

Jack Braxton, Apr 05 2023

Keywords

Comments

In order to get the next number in the row, you add the two numbers above it, and find the next prime.
3 is the only prime number that never shows up.
5 is the only prime number that only shows up once; every prime number above 5 shows up at least twice.

Examples

			Triangle begins:
      k=0  1   2   3   4   5   6   7   8  9 10
  n=0:  2
  n=1:  2  2
  n=2:  2  5   2
  n=3:  2  7   7   2
  n=4:  2 11  17  11   2
  n=5:  2 13  29  29  13   2
  n=6:  2 17  43  59  43  17   2
  n=7:  2 19  61 103 103  61  19   2
  n=8:  2 23  83 167 211 167  83  23   2
  n=9:  2 29 107 251 379 379 251 107  29  2
 n=10:  2 31 137 359 631 761 631 359 137 31  2
		

Crossrefs

Programs

  • Maple
    for n from 0 to 10 do
      T[n,0]:= 2: T[n,n]:= 2:
      for k from 1 to n-1 do
        T[n,k]:= nextprime(T[n-1,k-1]+T[n-1,k]-1)
      od
    od:
    for n from 0 to 10 do
      seq(T[n,k],k=0..n)
    od; # Robert Israel, Apr 05 2023
  • Mathematica
    T[n_, 0] := T[n, n] = 2; T[n_, k_] := T[n, k] = NextPrime[T[n - 1, k - 1] + T[n - 1, k] - 1]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Apr 06 2023, after Maple *)
  • PARI
    T(n,k) = if (n==0, 2, if (k==0, 2, if (k==n, 2, nextprime(T(n-1,k-1) + T(n-1,k))))); \\ Michel Marcus, Apr 07 2023

Formula

T(n,k) = A007918(T(n-1,k-1) + T(n-1,k)) for 0 < k < n. - Robert Israel, Apr 05 2023