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.

A340991 Triangle T(n,k) whose k-th column is the k-fold self-convolution of the primes; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 2, 0, 3, 4, 0, 5, 12, 8, 0, 7, 29, 36, 16, 0, 11, 58, 114, 96, 32, 0, 13, 111, 291, 376, 240, 64, 0, 17, 188, 669, 1160, 1120, 576, 128, 0, 19, 305, 1386, 3121, 4040, 3120, 1344, 256, 0, 23, 462, 2678, 7532, 12450, 12864, 8288, 3072, 512, 0, 29, 679, 4851, 16754, 34123, 44652, 38416, 21248, 6912, 1024
Offset: 0

Views

Author

Alois P. Heinz, Feb 01 2021

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  0,  2;
  0,  3,   4;
  0,  5,  12,    8;
  0,  7,  29,   36,   16;
  0, 11,  58,  114,   96,    32;
  0, 13, 111,  291,  376,   240,    64;
  0, 17, 188,  669, 1160,  1120,   576,  128;
  0, 19, 305, 1386, 3121,  4040,  3120, 1344,  256;
  0, 23, 462, 2678, 7532, 12450, 12864, 8288, 3072, 512;
  ...
		

Crossrefs

Columns k=0-4 give (offsets may differ): A000007, A000040, A014342, A014343, A014344.
Main diagonal gives A000079.
Row sums give A030017(n+1).
T(2n,n) gives A340990.

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(k=0, `if`(n=0, 1, 0),
          `if`(k=1, `if`(n=0, 0, ithprime(n)), (q->
           add(T(j, q)*T(n-j, k-q), j=0..n))(iquo(k, 2))))
        end:
    seq(seq(T(n, k), k=0..n), n=0..12);
    # Uses function PMatrix from A357368.
    PMatrix(10, ithprime); # Peter Luschny, Oct 09 2022
  • Mathematica
    T[n_, k_] := T[n, k] = If[k == 0, If[n == 0, 1, 0],
         If[k == 1, If[n == 0, 0, Prime[n]], With[{q = Quotient[k, 2]},
         Sum[T[j, q] T[n - j, k - q], {j, 0, n}]]]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Feb 10 2021, after Alois P. Heinz *)

Formula

T(n,k) = [x^n] (Sum_{j>=1} prime(j)*x^j)^k.
Sum_{k=0..n} k * T(n,k) = A030281(n).
Sum_{k=0..n} (-1)^k * T(n,k) = A030018(n).
Conjecture: row polynomials are x*R(n,1) for n > 0 where R(n,k) = R(n-1,k+1) + x*R(n-1,1)*R(1,k) for n > 1, k > 0 with R(1,k) = prime(k) for k > 0. The same recursion seems to work for self-convolution of any other sequence. - Mikhail Kurkov, Apr 05 2025