cp's OEIS Frontend

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.

A227947 Each term is a palindrome such that the sum of its proper divisors is a palindrome > 1.

Original entry on oeis.org

4, 6, 8, 9, 333, 646, 656, 979, 1001, 3553, 10801, 11111, 18581, 31713, 34943, 48484, 57375, 95259, 99099, 158851, 262262, 569965, 1173711, 1216121, 1399931, 1439341, 1502051, 1925291, 3203023, 3436343, 3659563, 3662663, 3803083, 3888883, 5185815, 5352535, 5893985, 5990995, 6902096, 9341439, 9452549
Offset: 1

Views

Author

Derek Orr, Oct 03 2013

Keywords

Comments

All terms are composite numbers. - Chai Wah Wu, Dec 23 2015

Examples

			4 has proper divisors 1 and 2. 1 + 2 = 3 is also a palindrome. So 4 is a member of this sequence.
		

Crossrefs

Programs

  • 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 *)
  • 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
  • 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
    

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