login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A179081 Parity of sum of digits of n. 10
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, 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, 1, 0, 1, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

a(n) = A000035(A007953(n));

characteristic function of numbers with an odd sum of digits in their decimal representation:

a(A054684(n)) = 1; a(A054683(n)) = 0;

a(A179083(n)) = a(A179085(n)) = 1;

a(A179082(n)) = a(A179084(n)) = 0.

LINKS

R. Zumkeller, Table of n, a(n) for n = 0..10000

Index entries for characteristic functions

FORMULA

a(n) = if n<10 then (n mod 2) else a([n/10]) XOR (n mod 2).

EXAMPLE

a(789) = (7+8+9) mod 2 = 0;

a(790) = (7+9+0) mod 2 = 0;

a(791) = (7+9+1) mod 2 = 1.

MATHEMATICA

Array[Mod[Total[IntegerDigits[#]], 2]&, 110, 0] (* Harvey P. Dale, Feb 20 2013 *)

PROG

(PARI) a(n) = vecsum(digits(n)) % 2 \\ Jeppe Stig Nielsen, Jan 06 2018

CROSSREFS

Sequence in context: A327532 A073445 A285589 * A113217 A189219 A189008

Adjacent sequences:  A179078 A179079 A179080 * A179082 A179083 A179084

KEYWORD

base,nonn

AUTHOR

Reinhard Zumkeller, Jun 28 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 27 21:52 EDT 2020. Contains 334671 sequences. (Running on oeis4.)