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.

A385396 Numbers k such that 8 does not divide binomial(k, j) for any j in 0..k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 15, 19, 23, 27, 31, 39, 47, 55, 63, 79, 95, 111, 127, 159, 191, 223, 255, 319, 383, 447, 511, 639, 767, 895, 1023, 1279, 1535, 1791, 2047, 2559, 3071, 3583, 4095, 5119, 6143, 7167, 8191, 10239, 12287, 14335, 16383, 20479, 24575
Offset: 1

Views

Author

Peter Luschny, Jun 28 2025

Keywords

Crossrefs

Cf. A000225 (case m=2), A052955 (case m=4).

Programs

  • Maple
    isa := n -> andmap(j -> modp(binomial(n, j), 8) > 0, [seq(0..n)]): select(isa, [seq(0..200)]);
    # Or, using the o.g.f.:
    gf := (x + x^2 + x^3 + x^4 - x^5 - x^6 - x^7)/((-1 + x)*(-1 + 2*x^4)): ser := series(gf, x, 60): seq(coeff(ser, x, n), n = 0..53);
  • Mathematica
    LinearRecurrence[{1, 0, 0, 2, -2}, Range[0, 7], 60] (* Paolo Xausa, Jun 30 2025 *)
  • Python
    def seq_gen():
        n, c, value = 0, 1, 3
        for v in [0, 1, 2]: yield v
        while True:
            yield value
            value += c
            n += 1
            if n == 4:
                n = 0
                c += c
    term = seq_gen()
    print([next(term) for _ in range(54)])

Formula

a(n) = [x^n] (x + x^2 + x^3 + x^4 - x^5 - x^6 - x^7)/((-1 + x)*(-1 + 2*x^4)).
a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) for n > 8. - Chai Wah Wu, Jun 28 2025