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.

A088000 a(n) is the sum of the palindromic divisors of n.

Original entry on oeis.org

1, 3, 4, 7, 6, 12, 8, 15, 13, 8, 12, 16, 1, 10, 9, 15, 1, 21, 1, 12, 11, 36, 1, 24, 6, 3, 13, 14, 1, 17, 1, 15, 48, 3, 13, 25, 1, 3, 4, 20, 1, 19, 1, 84, 18, 3, 1, 24, 8, 8, 4, 7, 1, 21, 72, 22, 4, 3, 1, 21, 1, 3, 20, 15, 6, 144, 1, 7, 4, 15, 1, 33, 1, 3, 9, 7, 96, 12, 1, 20, 13, 3, 1, 23, 6, 3
Offset: 1

Views

Author

Labos Elemer, Oct 14 2003

Keywords

Examples

			n=14: a(14)=1+2+7=10;
n=101: a(101)=1+101=102;
		

Crossrefs

Cf. A062687 (all divisors are palindromic), A087990 (number of palindromic divisors).

Programs

  • Maple
    A088000 := proc(n)
        a := 0 ;
        for d in numtheory[divisors](n) do
            if isA002113(d) then
                a := a+d ;
            end if;
        end do;
        a ;
    end proc:
    seq(A088000(n),n=1..100) ; # R. J. Mathar, Sep 09 2015
  • Mathematica
    Table[Plus @@ Select[Divisors[k], Reverse[x = IntegerDigits[#]] == x &], {k, 86}] (* Jayanta Basu, Aug 12 2013 *)
  • PARI
    a(n) = sumdiv(n, d, my(dd=digits(d)); if (Vecrev(dd) == dd, d)); \\ Michel Marcus, Apr 06 2020
  • Python
    def ispal(n):
        return n==int(str(n)[::-1])
    def A088000(n):
        s=0
        for i in range(1, n+1):
            if n%i==0 and ispal(i):
                 s+=i
        return s
    print([A088000(n) for n in range(1,30)]) # Indranil Ghosh, Feb 10 2017