[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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