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 A298638 #35 Sep 25 2023 14:51:40 %S A298638 19,28,29,37,38,39,46,47,48,49,55,56,57,58,59,64,65,66,67,68,69,73,74, %T A298638 75,76,77,78,79,82,83,84,85,86,87,88,89,91,92,93,94,95,96,97,98,99, %U A298638 109,118,119,127,128,129,136,137,138,139,145,146,147,148,149,154,155 %N A298638 Numbers k such that the digital sum of k and the digital root of k have opposite parity. %C A298638 Numbers k such that A113217(k) <> A179081(k). %C A298638 Complement of A298639. %C A298638 Agrees with A291884 until a(46): a(46) = 109 is not in that sequence. %H A298638 J. Stauduhar, <a href="/A298638/b298638.txt">Table of n, a(n) for n = 1..10000</a> %t A298638 Select[Range[145], EvenQ@ Total@ IntegerDigits@ # != EvenQ@ NestWhile[Total@ IntegerDigits@ # &, #, # > 9 &] &] (* _Michael De Vlieger_, Feb 03 2018 *) %o A298638 (Python) %o A298638 #Digital sum of n. %o A298638 def ds(n): %o A298638 if n < 10: %o A298638 return n %o A298638 return n % 10 + ds(n//10) %o A298638 def A298638(term_count): %o A298638 seq = [] %o A298638 m = 0 %o A298638 n = 1 %o A298638 while n <= term_count: %o A298638 s = ds(m) %o A298638 r = ((m - 1) % 9) + 1 if m else 0 %o A298638 if s % 2 != r % 2: %o A298638 seq.append(m) %o A298638 n += 1 %o A298638 m += 1 %o A298638 return seq %o A298638 print(A298638(100)) %o A298638 (PARI) isok(n) = sumdigits(n) % 2 != if (n, ((n-1)%9+1) % 2, 0); \\ _Michel Marcus_, Mar 01 2018 %Y A298638 Cf. A007953, A010888, A113217, A179081. %Y A298638 Cf. A298639, A291884. %K A298638 nonn,easy,base %O A298638 1,1 %A A298638 _J. Stauduhar_, Jan 23 2018