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.

A051404 Numbers k such that neither 4 nor 9 divides binomial(2k-1,k) (almost certainly finite).

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 10, 12, 18, 33, 34, 36, 40, 64, 66, 192, 256, 264, 272, 513, 514, 516, 576, 768, 1026, 1056, 2304, 16392, 65664, 81920, 532480, 545259520
Offset: 1

Views

Author

Keywords

Comments

Complete up to 2^64 = 18446744073709551616.
Complete up to 2^30000. - Don Reble, Oct 27 2013
A number n is in the sequence if and only if the following inequalities hold s_2(n) <= 2 and s_3(n) + s_3(n-1) - s_3(2*n-1) <= 2, where s_m(n) is sum of digits of n in base m. - Vladimir Shevelev, Oct 30 2013
Equivalently, a number n is in the sequence if and only if there is at most 1 "carry" when adding n and n-1 in both base-2 arithmetic and base-3 arithmetic. - Tom Edgar, Oct 31 2013

Examples

			For n = 64 we have s_2(64) = 1, s_3(n) = 4, s_3(64-1) = 3, s_3(2*64-1) = 5 and 4+3-5 = 2. So 64 is in the sequence. - _Vladimir Shevelev_, Oct 30 2013
		

References

  • Adrien-Marie Legendre, Théorie de Nombres, Firmin Didot Frères, Paris, 1830.

Crossrefs

Programs

  • Mathematica
    s[n_] :=DigitSum[n, 3]; With[{emax = 30}, Select[Flatten@ Table[2^e1 + If[e2 < 0, 0, 2^e2], {e1, 0, emax}, {e2, -1, e1-1}], s[#] + s[#-1] - s[2*#-1] <= 2 &]] (* Amiram Eldar, Aug 26 2025 *)
  • PARI
    isok(k) = my(b=binomial(2*k-1,k)); (b%4) && (b%9); \\ Michel Marcus, Jan 22 2025
    
  • PARI
    s(n) = sumdigits(n, 3);
    list(emax = 30) = {my(k); for(e1 = 0, emax, for(e2 = -1, e1-1, k = 1 << e1 + if(e2 >= 0, 1 << e2); if(s(k) + s(k-1) - s(2*k-1) <= 2, print1(k, ", "))));} \\ Amiram Eldar, Aug 26 2025