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!)
A087991 Number of non-palindromic divisors of n. 12

%I #26 May 04 2021 02:01:21

%S 0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,1,2,1,0,1,2,1,2,1,2,1,3,1,2,0,2,

%T 1,3,1,2,2,3,1,3,1,0,2,2,1,4,1,3,2,3,1,3,0,3,2,2,1,6,1,2,2,3,2,0,1,3,

%U 2,4,1,5,1,2,3,3,0,4,1,5,2,2,1,6,2,2,2,0,1,6,2,3,2,2,2,6,1,3,0,5,0,4,1,4,4

%N Number of non-palindromic divisors of n.

%H Indranil Ghosh, <a href="/A087991/b087991.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A000005(n) - A087990(n).

%e n=132: divisors={1,2,3,4,6,11,12,22,33,44,66,132},

%e revdivisors={1,2,3,4,6,11,21,22,33,44,66,231}, a[132]=2;

%e so two of 12 divisors of n are non-palindromic:{21,132}.

%t palQ[n_] := Reverse[x = IntegerDigits[n]] == x; Table[Count[Divisors[n], _?(! palQ[#] &)], {n, 105}] (* _Jayanta Basu_, Aug 10 2013 *)

%o (Python)

%o def ispal(n):

%o w=str(n)

%o return w==w[::-1]

%o def A087991(n):

%o s = 0

%o for i in range(1, n+1):

%o if n%i==0 and not ispal(i):

%o s+=1

%o return s

%o print([A087991(n) for n in range(1,60)]) # _Indranil Ghosh_, Feb 10 2017

%Y Cf. A087990, A062687.

%K nonn,base

%O 1,20

%A _Labos Elemer_, Oct 08 2003

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 April 25 11:06 EDT 2024. Contains 371967 sequences. (Running on oeis4.)