OFFSET
1,1
COMMENTS
All terms are composite numbers. - Chai Wah Wu, Dec 23 2015
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..220
EXAMPLE
4 has proper divisors 1 and 2. 1 + 2 = 3 is also a palindrome. So 4 is a member of this sequence.
MATHEMATICA
palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; fQ[n_] := Block[{s = DivisorSigma[1, n] - n}, palQ@ s && s > 1]; Select[
Select[Range@ 1000000, palQ], fQ] (* Michael De Vlieger, Apr 06 2015 *)
spdQ[n_]:=Module[{spd=DivisorSigma[1, n]-n}, n==IntegerReverse[n] && spd>1 && spd==IntegerReverse[spd]]; Select[Range[10^7], spdQ] (* The program uses the IntegerReverse function from Mathematica version 10 *) (* Harvey P. Dale, Jan 03 2016 *)
PROG
(Python)
from sympy import divisors
def pal(n):
r = ''
for i in str(n):
r = i + r
return r == str(n)
{print(n, end=', ') for n in range(1, 10**7) if pal(n) and pal(sum(divisors(n))-n) and len(divisors(n)) > 2}
## Simplified by Derek Orr, Apr 05 2015
(PARI) pal(n)=d=digits(n); Vecrev(d)==d
for(n=1, 10^6, s=sigma(n)-n; if(pal(n)&&pal(s)&&s>1, print1(n, ", "))) \\ Derek Orr, Apr 05 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Derek Orr, Oct 03 2013
EXTENSIONS
Initial terms 0 and 1 removed and more terms added by Derek Orr, Apr 05 2015
Definition edited by Derek Orr, Apr 05 2015
Definition edited by Harvey P. Dale, Jan 03 2016
STATUS
approved