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 A076888 #20 Jul 24 2024 15:18:22 %S A076888 1,2,2,3,2,4,2,4,3,2,4,4,6,4,8,4,8,6,2,4,3,2,4,2,4,6,2,2,4,6,8,8,6,18, %T A076888 4,10,8,6,4,2,4,6,4,2,6,2,2,4,6,12,8,8,12,4,10,8,9,8,4,4,12,4,4,8,4,6, %U A076888 12,8,8,16,4,12,8,10,12,9,8,16,4,4,2,4,6,2,4,8,2,2,8,4,18,4,10,16,12,4 %N A076888 a(n) is the number of divisors of the n-th positive palindromic number. %H A076888 Harvey P. Dale, <a href="/A076888/b076888.txt">Table of n, a(n) for n = 1..1000</a> %F A076888 a(n) = A000005(A002113(n+1)). %e A076888 a(11) = 4 because there are 4 divisors of 11th positive palindromic number (i.e., 22). %t A076888 palQ[n_]:=Module[{idn=IntegerDigits[n]},idn==Reverse[idn]]; DivisorSigma[ 0,#]&/@ Select[Range[1000],palQ] (* _Harvey P. Dale_, Nov 29 2014 *) %o A076888 (Python) %o A076888 from sympy import divisor_count %o A076888 def A076888(n): %o A076888 y = 10*(x:=10**(len(str(n+1>>1))-1)) %o A076888 return divisor_count(int((c:=n+1-x)*x+int(str(c)[-2::-1] or 0) if n+1<x+y else (c:=n+1-y)*y+int(str(c)[::-1] or 0))) # _Chai Wah Wu_, Jul 24 2024 %Y A076888 Cf. A000005, A002113. %K A076888 base,nonn %O A076888 1,2 %A A076888 _Shyam Sunder Gupta_, Nov 25 2002