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.

This page as a plain text file.
%I A385396 #21 Jun 30 2025 09:57:24
%S A385396 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,
%T A385396 191,223,255,319,383,447,511,639,767,895,1023,1279,1535,1791,2047,
%U A385396 2559,3071,3583,4095,5119,6143,7167,8191,10239,12287,14335,16383,20479,24575
%N A385396 Numbers k such that 8 does not divide binomial(k, j) for any j in 0..k.
%H A385396 Paolo Xausa, <a href="/A385396/b385396.txt">Table of n, a(n) for n = 1..10000</a>
%H A385396 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,2,-2).
%F A385396 a(n) = [x^n] (x + x^2 + x^3 + x^4 - x^5 - x^6 - x^7)/((-1 + x)*(-1 + 2*x^4)).
%F A385396 a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) for n > 8. - _Chai Wah Wu_, Jun 28 2025
%p A385396 isa := n -> andmap(j -> modp(binomial(n, j), 8) > 0, [seq(0..n)]): select(isa, [seq(0..200)]);
%p A385396 # Or, using the o.g.f.:
%p A385396 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);
%t A385396 LinearRecurrence[{1, 0, 0, 2, -2}, Range[0, 7], 60] (* _Paolo Xausa_, Jun 30 2025 *)
%o A385396 (Python)
%o A385396 def seq_gen():
%o A385396     n, c, value = 0, 1, 3
%o A385396     for v in [0, 1, 2]: yield v
%o A385396     while True:
%o A385396         yield value
%o A385396         value += c
%o A385396         n += 1
%o A385396         if n == 4:
%o A385396             n = 0
%o A385396             c += c
%o A385396 term = seq_gen()
%o A385396 print([next(term) for _ in range(54)])
%Y A385396 Cf. A000225 (case m=2), A052955 (case m=4).
%K A385396 nonn
%O A385396 1,3
%A A385396 _Peter Luschny_, Jun 28 2025