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.

This page as a plain text file.
%I A229546 #21 Jun 10 2020 04:46:05
%S A229546 0,1,2,3,4,16,28,39,43,64,89,101,127,163,166,174,179,188,202,214,236,
%T A229546 247,252,296,303,329,341,348,354,359,366,372,385,387,393,404,426,442,
%U A229546 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
%N A229546 Numbers n such that n + product_of_digits(n) is a palindrome.
%C A229546 From _Derek Orr_, Mar 22 2015 (Start):
%C A229546 The density of these numbers is roughly steady for 10^(2*k-1) < a(n) < 10^(2*k+1) for k = 1, 2, 3, ...
%C A229546 Examples:
%C A229546 k = 1: For 10 < a(n) < 1000, n/a(n) ~ 0.08127...
%C A229546 k = 2: For 1000 < a(n) < 10^5, n/a(n) ~ 0.008192...
%C A229546 k = 3: For 10^5 < a(n) < 10^7, n/a(n) ~ 0.0007753...
%C A229546 (End)
%H A229546 Harvey P. Dale, <a href="/A229546/b229546.txt">Table of n, a(n) for n = 1..1000</a>
%e A229546 329 + (3*2*9) = 383 (a palindrome). So, 329 is in this sequence.
%t A229546 Select[Range[0,1000],PalindromeQ[#+Times@@IntegerDigits[#]]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jan 08 2019 *)
%o A229546 (Python)
%o A229546 def rev(n):
%o A229546     return int(''.join(reversed(str(n))))
%o A229546 def DP(n):
%o A229546     p = 1
%o A229546     for i in str(n):
%o A229546         p *= int(i)
%o A229546     return p
%o A229546 {print(n,end=', ') for n in range(10**3) if rev(n+DP(n))==n+DP(n)}
%o A229546 # Simplified by _Derek Orr_, Mar 22 2015
%o A229546 (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
%Y A229546 Cf. A007954.
%K A229546 nonn,base,easy
%O A229546 1,3
%A A229546 _Derek Orr_, Sep 26 2013