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!)
A104171 Reversible Smith numbers, i.e., Smith numbers whose reversal is also a Smith number. 5
4, 22, 58, 85, 121, 202, 265, 319, 454, 535, 562, 636, 666, 913, 1111, 1507, 1642, 1881, 1894, 1903, 2461, 2583, 2605, 2614, 2839, 3091, 3663, 3852, 4162, 4198, 4369, 4594, 4765, 4788, 4794, 4954, 4974, 4981, 5062, 5386, 5458, 5539, 5674, 5818, 5926, 6295 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The palindromic Smith numbers (A098834) are a subset of the reversible Smith numbers.

LINKS

Amiram Eldar, Table of n, a(n) for n = 1..10000

S. S. Gupta, Smith Numbers.

EXAMPLE

a(3) = 58 because 58 and its reverse 85 are Smith numbers.

MATHEMATICA

rev[n_] := FromDigits @ Reverse @ IntegerDigits[n]; digSum[n_] := Plus @@ IntegerDigits[n]; smithQ[n_] := CompositeQ[n] && Plus @@ (Last@#*digSum[First@#] & /@ FactorInteger[n]) == digSum[n]; Select[Range[6000], smithQ[#] && smithQ @ rev[#] &] (* Amiram Eldar, Aug 24 2020 *)

PROG

(Python)

from sympy import factorint

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 ok(n): return smith(n) and smith(int(str(n)[::-1]))

print(list(filter(ok, range(6296)))) # Michael S. Branicky, Apr 22 2021

CROSSREFS

Cf. A006753, A098834.

Sequence in context: A076525 A089761 A098837 * A036924 A130015 A189953

Adjacent sequences:  A104168 A104169 A104170 * A104172 A104173 A104174

KEYWORD

nonn,base

AUTHOR

Shyam Sunder Gupta, Mar 10 2005

STATUS

approved

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 June 24 00:22 EDT 2021. Contains 345403 sequences. (Running on oeis4.)