The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087990 Number of palindromic divisors of n. 19
1, 2, 2, 3, 2, 4, 2, 4, 3, 3, 2, 5, 1, 3, 3, 4, 1, 5, 1, 4, 3, 4, 1, 6, 2, 2, 3, 4, 1, 5, 1, 4, 4, 2, 3, 6, 1, 2, 2, 5, 1, 5, 1, 6, 4, 2, 1, 6, 2, 3, 2, 3, 1, 5, 4, 5, 2, 2, 1, 6, 1, 2, 4, 4, 2, 8, 1, 3, 2, 4, 1, 7, 1, 2, 3, 3, 4, 4, 1, 5, 3, 2, 1, 6, 2, 2, 2, 8, 1, 6, 2, 3, 2, 2, 2, 6, 1, 3, 6, 4, 2, 4, 1, 4, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A118031 = 3.370283... . - Amiram Eldar, Jan 01 2024
EXAMPLE
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}, a[132]=10; so 10 of 12 divisors of n are palindromic: {1, 2, 3, 4, 6, 11, 22, 33, 44, 66}.
MATHEMATICA
nd[x_, y_] := 10*x+y; tn[x_] := Fold[nd, 0, x]; rdi[x_] := tn[Reverse[IntegerDigits[x]]]; d0[x_] := DivisorSigma[0, x]; di[x_, i_] := Part[Divisors[x], i]; Table[Count[Divisors[s]-Table[rdi[di[s, w]], {w, 1, d0[s]}], 0], {s, 1, 256}]
palQ[n_] := Reverse[x = IntegerDigits[n]] == x; Table[Count[Divisors[n], _?(palQ[#] &)], {n, 105}] (* Jayanta Basu, Aug 10 2013 *)
Table[Count[Divisors[n], _?PalindromeQ], {n, 110}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 28 2017 *)
PROG
(Python)
def ispal(n):
t = str(n)
return t == t[::-1]
def A087990(n):
s=0
for i in range(1, n+1):
if n%i==0 and ispal(i):
s+=1
return s # Indranil Ghosh, Feb 10 2017
(PARI) a(n) = sumdiv(n, d, my(dd=digits(d)); Vecrev(dd) == dd); \\ Michel Marcus, Apr 06 2020
CROSSREFS
Sequence in context: A076888 A357171 A355698 * A335037 A356069 A179940
KEYWORD
nonn,base
AUTHOR
Labos Elemer, Oct 08 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 28 21:13 EDT 2024. Contains 372920 sequences. (Running on oeis4.)