OFFSET
1,20
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..10000
FORMULA
Sum_{k=1..n} a(k) ~ n * (log(n) + c), where c = 2*A001620 - 1 - A118031 = -3.2158519... . - Amiram Eldar, Apr 17 2025
EXAMPLE
For n = 132: divisors = {1,2,3,4,6,11,12,22,33,44,66,132}, revdivisors = {1,2,3,4,6,11,21,22,33,44,66,231}, two of the 12 divisors of n are non-palindromic: {21,132}, so a(132) = 2.
MATHEMATICA
palQ[n_] := Reverse[x = IntegerDigits[n]] == x; Table[Count[Divisors[n], _?(! palQ[#] &)], {n, 105}] (* Jayanta Basu, Aug 10 2013 *)
PROG
(Python)
def ispal(n):
w=str(n)
return w==w[::-1]
def A087991(n):
s = 0
for i in range(1, n+1):
if n%i==0 and not ispal(i):
s+=1
return s
print([A087991(n) for n in range(1, 60)]) # Indranil Ghosh, Feb 10 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Labos Elemer, Oct 08 2003
STATUS
approved
