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.

A178105 Let B_n be the set of divisors 2 <= d <= n/2 of binomial(n-d-1,d-1) such that gcd(n,d)>1. The sequence lists the minimal d of B_n, or a(n)=0 if B_n is empty.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 6, 0, 6, 0, 0, 0, 4, 0, 0, 0, 6, 6, 10, 0, 4, 0, 6, 0, 6, 0, 14, 0, 4, 9, 6, 0, 8, 0, 8, 6, 4, 0, 10, 0, 6, 15, 12, 0, 4, 20, 6, 18, 6, 0, 18, 0, 4, 6, 6, 10, 9, 0, 14, 9, 4, 0, 6, 0, 6, 12, 8, 21, 4, 0, 6, 6, 6, 0, 16, 20, 4, 18, 6, 0, 6, 28, 10, 9, 4, 15, 9, 0, 6, 6, 14
Offset: 1

Views

Author

Vladimir Shevelev, May 20 2010

Keywords

Crossrefs

Programs

  • PARI
    a(n) = {my(md = -1); for (d=2, n\2, if (((binomial(n-d-1,d-1) % d) == 0) && (gcd(n, d) > 1), if (md == -1, md = d, md = min(d, md)));); if (md == -1, 0, md);} \\ Michel Marcus, Feb 07 2016
  • Sage
    def A178105(n):
        return next((d for d in (2..n//2) if binomial(n-d-1,d-1) % d == 0 and gcd(n,d) > 1), 0)
    # D. S. McNeil, Sep 05 2011
    

Extensions

Corrected by R. J. Mathar, Sep 05 2011