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.

A229546 Numbers n such that n + product_of_digits(n) is a palindrome.

Original entry on oeis.org

0, 1, 2, 3, 4, 16, 28, 39, 43, 64, 89, 101, 127, 163, 166, 174, 179, 188, 202, 214, 236, 247, 252, 296, 303, 329, 341, 348, 354, 359, 366, 372, 385, 387, 393, 404, 426, 442, 445, 455, 463, 465, 489, 505, 525, 536, 546, 567, 568, 571, 578, 589, 591, 606, 618, 622, 629, 658, 659, 664, 667, 707, 734, 749, 753, 808, 812
Offset: 1

Views

Author

Derek Orr, Sep 26 2013

Keywords

Comments

From Derek Orr, Mar 22 2015 (Start):
The density of these numbers is roughly steady for 10^(2*k-1) < a(n) < 10^(2*k+1) for k = 1, 2, 3, ...
Examples:
k = 1: For 10 < a(n) < 1000, n/a(n) ~ 0.08127...
k = 2: For 1000 < a(n) < 10^5, n/a(n) ~ 0.008192...
k = 3: For 10^5 < a(n) < 10^7, n/a(n) ~ 0.0007753...
(End)

Examples

			329 + (3*2*9) = 383 (a palindrome). So, 329 is in this sequence.
		

Crossrefs

Cf. A007954.

Programs

  • Mathematica
    Select[Range[0,1000],PalindromeQ[#+Times@@IntegerDigits[#]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 08 2019 *)
  • PARI
    for(n=0, 10^3,d=digits(n);D=digits(n+prod(i=1,#d,d[i]));if(Vecrev(D)==D,print1(n,", "))) \\ Derek Orr, Mar 22 2015
  • Python
    def rev(n):
        return int(''.join(reversed(str(n))))
    def DP(n):
        p = 1
        for i in str(n):
            p *= int(i)
        return p
    {print(n,end=', ') for n in range(10**3) if rev(n+DP(n))==n+DP(n)}
    # Simplified by Derek Orr, Mar 22 2015