login
A290079
Characteristic function for A249721: a(n) = 1 if there are either no 1-digits at all in base-3 representation of n, or if there are exactly two 1's next to each other, a(n) = 0 in any other cases.
3
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0
OFFSET
0
FORMULA
If n is even and 9 ∤ C(n,n/2), then a(n) = 1, otherwise a(n) = 0.
EXAMPLE
n A007089(n) a(n) = 1 if 1-free, except for possibly a single 11-pair,
0 otherwise
------------------
0 0 1
1 1 0
2 2 1
3 10 0
4 11 1
5 12 0
6 20 1
7 21 0
8 22 1
9 100 0
10 101 0
11 102 0
12 110 1
13 111 0
14 112 1
15 120 0
PROG
(PARI) A290079(n) = if((!(n%2)&&(binomial(n, n/2)%9)), 1, 0);
(Scheme) (define (A290079 n) (if (in_A249721? n) 1 0)) ;; See under A249721 for in_A249721?
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jul 25 2017
STATUS
approved