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.

A089818 T(n,k) = number of subsets of {1,..., n} containing exactly k primes, triangle read by rows, 0<=k

Original entry on oeis.org

2, 2, 2, 2, 4, 2, 4, 8, 4, 0, 4, 12, 12, 4, 0, 8, 24, 24, 8, 0, 0, 8, 32, 48, 32, 8, 0, 0, 16, 64, 96, 64, 16, 0, 0, 0, 32, 128, 192, 128, 32, 0, 0, 0, 0, 64, 256, 384, 256, 64, 0, 0, 0, 0, 0, 64, 320, 640, 640, 320, 64, 0, 0, 0, 0, 0, 128, 640, 1280, 1280, 640, 128, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 12 2003

Keywords

Comments

T(n,k) = T(n, A000720(n)-k) for 0<=k<=A000720(n);
T(n,k) = 0 iff k > A000720(n);
A089819(n) = T(n,0); A089821(n) = T(n,1) for n>1; A089822(n) = T(n,2) for n>2;
A089820(n) = Sum(T(n,k): 1<=k<=A000720(n));
T(n,k) = A007318(A000720(n),k) * A000079(n-A000720(n)).

Crossrefs

Cf. A000040.

Programs

  • Mathematica
    T[n_, k_] := Binomial[PrimePi[n], k] 2^(n - PrimePi[n]);
    Table[T[n, k], {n, 1, 12}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Nov 04 2020 *)

Formula

T(n, k) = binomial(pi(n), k)*2^(n-pi(n)), with pi = A000720.