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.

A058852 Palindromes n such that n and n^2 have same digit sum.

Original entry on oeis.org

0, 1, 9, 55, 99, 585, 595, 838, 999, 5995, 8668, 9999, 45954, 48384, 55755, 56665, 59895, 59995, 64846, 65656, 77977, 86968, 88488, 89398, 97479, 97579, 99099, 99199, 99999, 158851, 176671, 509905, 549945, 558855, 594495, 599995, 779977
Offset: 1

Views

Author

Patrick De Geest, Dec 15 2000

Keywords

Crossrefs

Programs

  • Maple
    read("transforms") :
    n := 1;
    for i from 1 do
        p := A002113(i) ;
        if digsum(p) = digsum(p^2) then
            printf("%d %d\n",n,p) ;
            n := n+1 ;
        end if;
    end do: # R. J. Mathar, Sep 09 2015
  • Mathematica
    Select[Range[0,78*10^4],PalindromeQ[#]&&Total[IntegerDigits[#]] == Total[ IntegerDigits[ #^2]]&] (* Harvey P. Dale, Sep 26 2021 *)