login
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