|
|
A249609
|
|
a(n) is the smallest m, 1<=m<=n, such that binomial(n,m) is evil (A001969); a(n)=0 if there is no such m.
|
|
2
|
|
|
0, 0, 0, 1, 2, 1, 1, 0, 0, 1, 1, 3, 1, 2, 7, 1, 2, 1, 1, 3, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 4, 5, 1, 1, 3, 1, 3, 2, 1, 1, 3, 4, 1, 2, 1, 1, 6, 1, 2, 6, 1, 2, 1, 1, 3, 3, 1, 1, 2, 1, 2, 6, 1, 2, 1, 1, 3, 1, 3, 2, 1, 1, 2, 2, 1, 9, 1, 1, 2, 1, 4, 2, 1, 2, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
Conjecture: there are only five n: 0,1,2,7,8, for which all entries of the n-th Pascal row (A007318) are odious (A000069). Peter J. C. Moses verified the conjecture up to n = 10^6.
Positions of records are 0,3,4,11,14,76,...; see A249650.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 1, iff n is evil.
|
|
MATHEMATICA
|
evilQ:=EvenQ[First[DigitCount[#, 2]]]&;
Table[If[#>n, 0, #]&[NestWhile[#+1&, 1, !evilQ[Binomial[n, #]]&]], {n, 0, 100}] (* Peter J. C. Moses, Nov 03 2014 *)
|
|
PROG
|
(Python)
from math import comb
from itertools import count
for m in range(1, n+1):
if comb(n, m).bit_count()&1 == 0: return m
return 0
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|