login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A098834 Palindromic Smith numbers. 6
4, 22, 121, 202, 454, 535, 636, 666, 1111, 1881, 3663, 7227, 7447, 9229, 10201, 17271, 22522, 24142, 28182, 33633, 38283, 45054, 45454, 46664, 47074, 50305, 51115, 51315, 54645, 55055, 55955, 72627, 81418, 82628, 83038, 83938, 90409, 95359, 96169, 164461 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(3) = 121 because 121 is a Smith number as well as a palindromic number.
MATHEMATICA
d[n_] := IntegerDigits[n]; tr[n_] := Transpose[FactorInteger[n]]; Select[Range[2, 1.7*10^5], !PrimeQ[#] && Reverse[x=d[#]] == x && Total[x] == Total[d@tr[#][[1]]*tr[#][[2]], 2]&] (* Jayanta Basu, Jun 04 2013 *)
PROG
(Python)
from sympy import factorint
from itertools import product
def sd(n): return sum(map(int, str(n)))
def smith(n):
f = factorint(n)
return sum(f[p] for p in f) > 1 and sd(n) == sum(sd(p)*f[p] for p in f)
def palsto(limit):
yield from range(min(limit, 9)+1)
midrange = [[""], [str(i) for i in range(10)]]
for digs in range(2, 10**len(str(limit))):
for p in product("0123456789", repeat=digs//2):
left = "".join(p)
if left[0] == '0': continue
for middle in midrange[digs%2]:
out = int(left + middle + left[::-1])
if out > limit: return
yield out
print(list(filter(smith, palsto(164461)))) # Michael S. Branicky, Apr 22 2021
CROSSREFS
Cf. A006753.
Subsequence of A104171. Supersequence of A104166.
Sequence in context: A244900 A261193 A025569 * A065983 A236576 A185858
KEYWORD
base,nonn
AUTHOR
Shyam Sunder Gupta, Oct 10 2004
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 21 04:30 EST 2024. Contains 370219 sequences. (Running on oeis4.)