This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A054684 #48 Jul 02 2025 16:01:59 %S A054684 1,3,5,7,9,10,12,14,16,18,21,23,25,27,29,30,32,34,36,38,41,43,45,47, %T A054684 49,50,52,54,56,58,61,63,65,67,69,70,72,74,76,78,81,83,85,87,89,90,92, %U A054684 94,96,98,100,102,104,106,108,111,113,115,117,119,120,122,124,126,128,131 %N A054684 Numbers whose sum of digits is odd. %C A054684 Union of A179083 and A179085; A179081(a(n)) = 1. - _Reinhard Zumkeller_, Jun 28 2010 %C A054684 Equivalently, integers with an odd number of odd digits. - _Bernard Schott_, Nov 06 2022 %H A054684 Reinhard Zumkeller, <a href="/A054684/b054684.txt">Table of n, a(n) for n = 1..1000</a> %H A054684 <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>. %H A054684 <a href="/index/Coi#Colombian">Index entries for Colombian or self numbers and related sequences</a> %F A054684 a(n) = n * 2 - 1 for the first 5 numbers; a(n) = n * 2 for the second 5 numbers. %F A054684 From _Robert Israel_, Jun 27 2017: (Start) %F A054684 a(n) = 2*n-2 if floor((n-1)/5) is in the sequence, 2*n-1 if not. %F A054684 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. %F A054684 (End) %e A054684 1, 3, 5, 7, 9, 10(1), 12(3), 14(5), 16(7), 18(9), 21(3) and so on. %p A054684 [seq(`if`(convert(convert(2*n-1,base,10),`+`)::odd, 2*n-1, 2*n-2), n=1..501)]; %t A054684 Select[Range[200],OddQ[Total[IntegerDigits[#]]]&] (* _Harvey P. Dale_, Nov 27 2021 *) %o A054684 (PARI) is(n)=my(d=digits(n));sum(i=1,#d,d[i])%2 \\ _Charles R Greathouse IV_, Aug 09 2013 %o A054684 (PARI) isok(m) = sumdigits(m) % 2; \\ _Michel Marcus_, Nov 06 2022 %o A054684 (PARI) a(n) = n=2*(n-1); n + !(sumdigits(n)%2); \\ _Kevin Ryde_, Nov 07 2022 %o A054684 (Python) %o A054684 def ok(n): return sum(map(int, str(n)))&1 %o A054684 print([k for k in range(132) if ok(k)]) # _Michael S. Branicky_, Nov 06 2022 %Y A054684 Cf. A054683, A137233 (number of n-digits terms). %Y A054684 Cf. A356929 (even number of even digits). %Y A054684 A294601 (exactly one odd decimal digit) is a subsequence. %K A054684 nonn,easy,base %O A054684 1,2 %A A054684 _Odimar Fabeny_, Apr 19 2000 %E A054684 More terms from _James Sellers_, Apr 19 2000