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 A043269 #25 Jul 20 2025 10:08:12 %S A043269 0,1,2,3,4,5,6,7,8,9,2,4,6,8,10,12,14,16,18,2,3,4,5,6,7,8,9,10,11,4,5, %T A043269 6,7,8,9,10,11,12,13,6,7,8,9,10,11,12,13,14,15,8,9,10,11,12,13,14,15, %U A043269 16,17,10,11,12,13,14,15,16,17,18,19,12,13,14,15,16,17 %N A043269 a(n) is the sum of the digits of n-th base-10 palindrome. %H A043269 David A. Corneth, <a href="/A043269/b043269.txt">Table of n, a(n) for n = 1..10000</a> %F A043269 a(n) = A007953(A002113(n)). - _R. J. Mathar_, Jul 20 2025 %e A043269 For n = 36, the n-th palindrome is the 36th palindrome i.e., 262. The sum of digits of 262 (in base 10) is 2 + 6 + 2 = 10 hence a(36) = 10. %t A043269 Total[IntegerDigits[#]]&/@Select[Range[0,750],PalindromeQ] (* _Harvey P. Dale_, Feb 11 2022 *) %o A043269 (PARI) a(n)={my(d, i, r); r=vector(#digits(n-10^(#digits(n\11)))+#digits(n\11)); n=n-10^(#digits(n\11)); d=digits(n); for(i=1, #d, r[i]=d[i]; r[#r+1-i]=d[i]); vecsum(r)} \\ _David A. Corneth_, Sep 29 2023 %o A043269 (Python) %o A043269 def A043269(n): %o A043269 if n == 1: return 0 %o A043269 y = 10*(x:=10**(len(str(n>>1))-1)) %o A043269 return int((s:=str(n-x))[-1])+(sum(int(d) for d in s[:-1])<<1) if n<x+y else sum(map(int,str(n-y)))<<1 # _Chai Wah Wu_, Jun 13 2024 %Y A043269 Cf. A002113 (base-10 palindromes). %K A043269 nonn,easy,base %O A043269 1,3 %A A043269 _Clark Kimberling_