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.

A382817 a(n) = number of primes among the partial sums of row n of Pascal's triangle (A007318).

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 1, 2, 2, 0, 2, 1, 3, 2, 3, 2, 3, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 3, 0, 2, 7, 2, 0, 0, 1, 1, 0, 0, 0, 2, 0, 1, 1, 1, 0, 1, 3, 1, 0, 1, 1, 1, 1, 1, 1, 5, 3, 3, 2, 3, 2, 3, 3, 10, 0, 1, 0, 1, 0, 2, 2, 2, 0, 0, 1, 1, 0, 2, 1, 1, 1, 2, 1, 2, 0
Offset: 0

Views

Author

Clark Kimberling, Apr 07 2025

Keywords

Examples

			The numbers in A008949 (partial sums of Pascal's triangle) begin thus:
  1
  1    2
  1    3     4
  1    4     7     8
  1    5    11    15    16
  1    6    16    26    31    32
  1    7    22    42    57    63    64
Row n=4 includes exactly 2 primes, so a(4) = 2.
		

Crossrefs

Programs

  • Maple
    a:= n-> nops(select(isprime, ListTools[PartialSums]
                ([seq(binomial(n, k), k=0..n)]))):
    seq(a(n), n=0..100);  # Alois P. Heinz, Apr 07 2025
  • Mathematica
    t = Accumulate /@ Table[Binomial[n, i], {n, 0, 100}, {i, 0, n}]; (* A037955 *)
    Map[PrimeQ, t]; Table[Count[m[[n]], True], {n, 1, 100}]
  • PARI
    a(n) = my(v=vector(n+1, k, binomial(n,k-1))); #select(isprime, vector(#v, k, sum(i=1, k, v[i]))); \\ Michel Marcus, Apr 13 2025

Formula

a(n) = 0 <=> n in { A258483 }.