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 A136687 #27 Jul 24 2024 20:07:39 %S A136687 1,2,3,4,5,6,7,8,9,10,10,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12, %T A136687 12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14, %U A136687 14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16 %N A136687 Number of palindromes in the range [0,n] inclusive. %C A136687 Partial sums of A136522. [Typo fixed by _Colin Barker_, Apr 26 2015] %H A136687 N. J. A. Sloane, <a href="/A136687/b136687.txt">Table of n, a(n) for n = 0..20202</a> %F A136687 a(n) = inv_A002113(A261423(n)), where inv_A002113 is the inverse of A002113, i.e., it yields the index of a palindrome. - _M. F. Hasler_, Sep 10 2018 %t A136687 palQ[n_]:=Module[{idn=IntegerDigits[n]},idn==Reverse[idn]]; Accumulate[ Table[ If[palQ[n],1,0],{n,0,80}]] (* _Harvey P. Dale_, May 11 2014 *) %o A136687 (PARI) A136687(n)=inv_A002113(A261423(n)) \\ _M. F. Hasler_, Sep 09 2018 %o A136687 (Python) %o A136687 def A136687(n): %o A136687 l = len(s:=str(n)) %o A136687 k = l+1>>1 %o A136687 return n//10**(l-k)-(int(s[k-1::-1])>n%10**k)+10**(k-1+(l&1^1)) # _Chai Wah Wu_, Jul 24 2024 %Y A136687 Cf. A002113, A136522, A137180, A261423. %K A136687 nonn,base %O A136687 0,2 %A A136687 _N. J. A. Sloane_, Apr 21 2008