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 A229621 #30 Mar 26 2025 16:56:03 %S A229621 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,100,101,102,103, %T A229621 104,105,106,107,108,109,180,181,182,183,184,185,186,187,188,189,260, %U A229621 261,262,263,264,265,266,267,268,269,340,341,342,343,344,345,346,347,348,349,420,421,422,423,424,425,426 %N A229621 Numbers n such that n - (sum of digits of n) is a palindrome. %e A229621 185 - (1+8+5) = 171 (a palindrome). Thus, 185 is a member of this sequence. %t A229621 Select[Range[0,500],PalindromeQ[#-Total[IntegerDigits[#]]]&] %o A229621 (Python) %o A229621 def ispal(n): %o A229621 r = '' %o A229621 for i in str(n): %o A229621 r = i + r %o A229621 return n == int(r) %o A229621 def DS(n): %o A229621 s = 0 %o A229621 for i in str(n): %o A229621 s += int(i) %o A229621 return s %o A229621 {print(n, end=', ') for n in range(10**3) if ispal(n-DS(n))} %o A229621 ## Simplified by _Derek Orr_, Apr 10 2015 %o A229621 (PARI) ispal(d) = Vecrev(d) == d; %o A229621 isok(n) = ispal(digits(n-sumdigits(n))); \\ _Michel Marcus_, Apr 11 2015 %Y A229621 Cf. A066568. %K A229621 nonn,base,easy %O A229621 1,3 %A A229621 _Derek Orr_, Sep 26 2013 %E A229621 More terms from _Derek Orr_, Apr 10 2015