login
A385396
Numbers k such that 8 does not divide binomial(k, j) for any j in 0..k.
1
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,3
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
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 *)
PROG
(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)])
CROSSREFS
Cf. A000225 (case m=2), A052955 (case m=4).
Sequence in context: A347327 A026445 A279078 * A308627 A330500 A030151
KEYWORD
nonn
AUTHOR
Peter Luschny, Jun 28 2025
STATUS
approved