login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A229549 Numbers n such that n*(sum of digits of n) is a palindrome. 4

%I

%S 0,1,2,3,11,22,42,53,56,101,111,113,121,124,182,187,202,272,353,434,

%T 515,572,616,683,739,829,888,1001,1111,1357,1507,1508,1624,1717,2002,

%U 2074,2852,3049,3146,3185,3326,3342,3687,3747,4058,4066,4391,4719,4724,5038,7579,8569,9391,9471

%N Numbers n such that n*(sum of digits of n) is a palindrome.

%e 829*(8+2+9) = 15751 (palindrome). So, 829 is a member of this sequence.

%t palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; Select[Range@ 10000, palQ[# Plus @@ IntegerDigits@ #] &] (* _Michael De Vlieger_, Apr 12 2015 *)

%o (Python)

%o def ispal(n):

%o ..r = ''

%o ..for i in str(n):

%o ....r = i + r

%o ..return n == int(r)

%o def DS(n):

%o ..s = 0

%o ..for i in str(n):

%o ....s += int(i)

%o ..return s

%o {print(n, end=', ') for n in range(10**4) if ispal(n*DS(n))}

%o ## Simplified by _Derek Orr_, Apr 10 2015

%o (PARI) ispal(n)=d=digits(n);d==Vecrev(d)

%o for(n=0,10^4,s=sumdigits(n);if(ispal(n*s),print1(n,", "))) \\ _Derek Orr_, Apr 10 2015

%Y Cf. A057147.

%K nonn,base

%O 1,3

%A _Derek Orr_, Sep 26 2013

%E More terms from _Derek Orr_, Apr 10 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 24 15:56 EDT 2021. Contains 348233 sequences. (Running on oeis4.)