[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”).

A228710
Characteristic function of numbers with alternating parities of their digits in decimal representation.
11
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1
OFFSET
0
COMMENTS
a(A030141(n)) = 1; a(A228709(n)) = 0;
FORMULA
For n > 9: a(n) * a(n+1) = 0 and 0 <= a(n) + a(n+1) <= 1.
PROG
(Haskell)
a228710 n = fromEnum $ f (n `div` 10) (n `mod` 2) where
f x p = x == 0 || (x `mod` 2) /= p && f (x `div` 10) (1 - p)
CROSSREFS
Sequence in context: A014152 A014295 A344884 * A103447 A354923 A354924
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Aug 31 2013
STATUS
approved