A083094 Numbers k such that Sum_{j=0..k} (binomial(k,j) mod 3) is odd.
0, 8, 20, 24, 56, 60, 72, 80, 164, 168, 180, 188, 216, 224, 236, 240, 488, 492, 504, 512, 540, 548, 560, 564, 648, 656, 668, 672, 704, 708, 720, 728, 1460, 1464, 1476, 1484, 1512, 1520, 1532, 1536, 1620, 1628, 1640, 1644, 1676, 1680, 1692, 1700, 1944, 1952
Offset: 1
Programs
-
Mathematica
Select[Range[0, 2000],OddQ[Sum[Mod[Binomial[#, j], 3], {j, 0, #}]] &] (* Paul F. Marrero Romero, Dec 28 2024 *)
-
PARI
isok(n) = sum(k=0, n, binomial(n,k) % 3) % 2; \\ Michel Marcus, Dec 05 2013
-
Python
def A083094(n): return int(bin(((m:=n-1).bit_count()&1)+(m<<1))[2:],3)<<1 # Chai Wah Wu, Jun 26 2025
Formula
a(n) = 4*A083095(n). - Hugo Pfoertner, Jan 12 2025
Numbers that are multiples of 4 and such that base-3 digits contain no 1's, or equivalently, numbers such that base-3 digits contains an even number of 2's and no 1's, i.e. a(n) = 2*A074939(n-1). This characterization can be derived from the formula in A051638. - Chai Wah Wu, Jun 26 2025
Extensions
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 29 2003
Comments