login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

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 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A054684 Numbers whose sum of digits is odd. 13
1, 3, 5, 7, 9, 10, 12, 14, 16, 18, 21, 23, 25, 27, 29, 30, 32, 34, 36, 38, 41, 43, 45, 47, 49, 50, 52, 54, 56, 58, 61, 63, 65, 67, 69, 70, 72, 74, 76, 78, 81, 83, 85, 87, 89, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 111, 113, 115, 117, 119, 120, 122, 124, 126, 128, 131 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Union of A179083 and A179085; A179081(a(n)) = 1. - Reinhard Zumkeller, Jun 28 2010

Equivalently, integers with an odd number of odd digits. - Bernard Schott, Nov 06 2022

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..1000

Index entries for 10-automatic sequences.

Index entries for Colombian or self numbers and related sequences

FORMULA

a(n) = n * 2 - 1 for the first 5 numbers; a(n) = n * 2 for the second 5 numbers.

From Robert Israel, Jun 27 2017: (Start)

a(n) = 2*n-2 if floor((n-1)/5) is in the sequence, 2*n-1 if not.

G.f. g(x) satisfies g(x) = (1-x)*(1+x+x^2+x^3+x^4)^2*g(x^10)/x^9 + x^2*(2+x^4+3*x^5-x^9+3*x^10)/((1-x)*(1+x^5))^2.

(End)

EXAMPLE

1, 3, 5, 7, 9, 10(1), 12(3), 14(5), 16(7), 18(9), 21(3) and so on.

MAPLE

[seq(`if`(convert(convert(2*n-1, base, 10), `+`)::odd, 2*n-1, 2*n-2), n=1..501)];

MATHEMATICA

Select[Range[200], OddQ[Total[IntegerDigits[#]]]&] (* Harvey P. Dale, Nov 27 2021 *)

PROG

(PARI) is(n)=my(d=digits(n)); sum(i=1, #d, d[i])%2 \\ Charles R Greathouse IV, Aug 09 2013

(PARI) isok(m) = sumdigits(m) % 2; \\ Michel Marcus, Nov 06 2022

(PARI) a(n) = n=2*(n-1); n + !(sumdigits(n)%2); \\ Kevin Ryde, Nov 07 2022

(Python)

def ok(n): return sum(map(int, str(n)))&1

print([k for k in range(132) if ok(k)]) # Michael S. Branicky, Nov 06 2022

CROSSREFS

Cf. A054683, A137233 (number of n-digits terms).

Cf. A356929 (even number of even digits).

A294601 (exactly one odd decimal digit) is a subsequence.

Sequence in context: A287774 A308412 A327254 * A294601 A358529 A080207

Adjacent sequences:  A054681 A054682 A054683 * A054685 A054686 A054687

KEYWORD

nonn,easy,base

AUTHOR

Odimar Fabeny, Apr 19 2000

EXTENSIONS

More terms from James A. Sellers, Apr 19 2000

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 26 04:03 EST 2022. Contains 358353 sequences. (Running on oeis4.)