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.

A258127 Smallest k such that Sum_{i=0..k} binomial(n,i) is prime, or a(n)=0 if there is no such k.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 2, 2, 0, 1, 2, 1, 4, 4, 6, 1, 16, 1, 2, 2, 4, 1, 2, 6, 8, 16, 2, 1, 0, 1, 4, 6, 0, 0, 2, 1, 0, 0, 0, 1, 0, 1, 2, 2, 0, 1, 2, 10, 0, 48, 2, 1, 36, 20, 6, 2, 8, 1, 10, 1, 16, 13, 2, 2, 0, 1, 0, 2, 0, 1, 2, 1, 0, 0, 2, 2, 0, 1, 8, 74, 64, 1, 16
Offset: 1

Views

Author

Vladimir Shevelev, May 21 2015

Keywords

Comments

a(n)=0 for n=9,29,33,34,37,38,39,41,45,49,...;
records a(n) are 1,2,4,6,16,48,74,...
at positions 1,3,5,15,17,50,80,...

Crossrefs

Programs

  • PARI
    a(n) = {my(k = 0); while(! isprime(sum(i=0, k, binomial(n,i))), k++; if ((k>n) && !isprime(binomial(n,k)), return (0);)); k;} \\ Michel Marcus, May 23 2015

Formula

a(n) <= n-1.

Extensions

More terms from Peter J. C. Moses, May 21 2015