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.

Showing 1-5 of 5 results.

A006753 Smith (or joke) numbers: composite numbers k such that sum of digits of k = sum of digits of prime factors of k (counted with multiplicity).

Original entry on oeis.org

4, 22, 27, 58, 85, 94, 121, 166, 202, 265, 274, 319, 346, 355, 378, 382, 391, 438, 454, 483, 517, 526, 535, 562, 576, 588, 627, 634, 636, 645, 648, 654, 663, 666, 690, 706, 728, 729, 762, 778, 825, 852, 861, 895, 913, 915, 922, 958, 985, 1086, 1111, 1165, 1219
Offset: 1

Views

Author

Keywords

Comments

Of course primes also have this property, trivially.
a(133809) = 4937775 is the first Smith number historically: 4937775 = 3*5*5*65837 and 4+9+3+7+7+7+5 = 3+5+5+(6+5+8+3+7) = 42, Albert Wilansky coined the term Smith number when he noticed the defining property in the phone number of his brother-in-law Harold Smith: 493-7775.
There are 248483 7-digit Smith numbers, corresponding to US phone numbers without area codes (like 4937775). - Charles R Greathouse IV, May 19 2013
A007953(a(n)) = Sum_{k=1..A001222(a(n))} A007953(A027746(a(n),k)), and A066247(a(n))=1. - Reinhard Zumkeller, Dec 19 2011
3^3, 3^6, 3^9, 3^27 are in the sequence. - Sergey Pavlov, Apr 01 2017
As mentioned by Giovanni Resta, there are no other terms of the form 3^t for 0 < t < 300000 and, probably, no other terms of such form for t >= 300000. It seems that, if there exists any other term of form 3^t with integer t, then t == 0 (mod 3) or, perhaps, t = {3^k; 2*3^k} where k is an integer, k > 10. - Sergey Pavlov, Apr 03 2017

Examples

			58 = 2*29; sum of digits of 58 is 13, sum of digits of 2 + sum of digits of 29 = 2+11 is also 13.
		

References

  • M. Gardner, Penrose Tiles to Trapdoor Ciphers. Freeman, NY, 1989, p. 300.
  • R. K. Guy, Unsolved Problems in the Theory of Numbers, Section B49.
  • C. A. Pickover, "A Brief History of Smith Numbers" in "Wonders of Numbers: Adventures in Mathematics, Mind and Meaning", pp. 247-248, Oxford University Press, 2000.
  • J. E. Roberts, Lure of the Integers, pp. 269-270 MAA 1992.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • D. D. Spencer, Key Dates in Number Theory History, Camelot Pub. Co. FL, 1995, pp. 94.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, Exercise 3.1.14 and 3.1.16 on pages 84-85.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), p. 180.

Crossrefs

Programs

  • Haskell
    a006753 n = a006753_list !! (n-1)
    a006753_list = [x | x <- a002808_list,
                        a007953 x == sum (map a007953 (a027746_row x))]
    -- Reinhard Zumkeller, Dec 19 2011
    
  • Maple
    q:= n-> not isprime(n) and (s-> s(n)=add(s(i[1])*i[2], i=
         ifactors(n)[2]))(h-> add(i, i=convert(h, base, 10))):
    select(q, [$1..2000])[];  # Alois P. Heinz, Apr 22 2021
  • Mathematica
    fQ[n_] := !PrimeQ@ n && n>1 && Plus @@ Flatten[ IntegerDigits@ Table[ #[[1]], {#[[2]] }] & /@ FactorInteger@ n] == Plus @@ IntegerDigits@ n; Select[ Range@ 1200, fQ]
  • PARI
    isA006753(n) = if(isprime(n), 0, my(f=factor(n)); sum(i=1,#f[,1], sumdigits(f[i,1])*f[i,2]) == sumdigits(n)); \\ Charles R Greathouse IV, Jan 03 2012; updated by Max Alekseyev, Oct 21 2016
    
  • Python
    from sympy import factorint
    def sd(n): return sum(map(int, str(n)))
    def ok(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)
    print(list(filter(ok, range(1220)))) # Michael S. Branicky, Apr 22 2021
  • Sage
    is_A006753 = lambda n: n > 1 and not is_prime(n) and sum(n.digits()) == sum(sum(p.digits())*m for p,m in factor(n)) # D. S. McNeil, Dec 28 2010
    

A104171 Reversible Smith numbers, i.e., Smith numbers whose reversal is also a Smith number.

Original entry on oeis.org

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
Offset: 1

Views

Author

Shyam Sunder Gupta, Mar 10 2005

Keywords

Comments

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

Examples

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

Crossrefs

Programs

  • 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 *)
  • 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

A334530 Numbers that are both binary palindromes and binary Smith numbers.

Original entry on oeis.org

15, 51, 85, 471, 765, 771, 843, 951, 1023, 1285, 1501, 1707, 2015, 3687, 3831, 4095, 4369, 4777, 5621, 5917, 6077, 6483, 6643, 6891, 6939, 7003, 7099, 7447, 7671, 10041, 11565, 12093, 13011, 14631, 15063, 15855, 20345, 20473, 22517, 23213, 26067, 26483, 26611
Offset: 1

Views

Author

Amiram Eldar, May 05 2020

Keywords

Examples

			15 is a term since its binary representation, 1111, is palindromic, and its prime factorization, 3 * 5, is 11 * 101 in binary representation, and 1 + 1 + 1 + 1 = (1 + 1) + (1 + 0 + 1).
		

Crossrefs

Intersection of A006995 and A278909.
Cf. A098834.

Programs

  • Mathematica
    binPalSmithQ[n_] := PalindromeQ[(d = IntegerDigits[n, 2])] && CompositeQ[n] && Plus @@ (Last@# * DigitCount[First@#, 2, 1] & /@ FactorInteger[n]) == Plus @@ d; Select[Range[10^5], binPalSmithQ]

A104166 Repdigit Smith numbers.

Original entry on oeis.org

4, 22, 666, 1111, 6666666, 4444444444, 44444444444444444444, 555555555555555555555555555, 55555555555555555555555555555555, 4444444444444444444444444444444444444444444444444444444
Offset: 1

Views

Author

Shyam Sunder Gupta, Mar 10 2005

Keywords

Crossrefs

Cf. A006753.
Subsequence of both A098834 and A104171.

Programs

  • Mathematica
    d[n_]:=IntegerDigits[n]; tr[n_]:=Transpose[FactorInteger[n]]; a[n_]:=NestList[FromDigits[Flatten[d[{#,n}]]]&,n,55]; t={}; Do[If[!PrimeQ[n]&&Total[d[n]]==Total[d@tr[n][[1]]*tr[n][[2]],2],AppendTo[t,n]],{n,Drop[Union[Flatten[Table[a[k],{k,9}]]],1]}]; t (* Jayanta Basu, Jun 04 2013 *)
  • 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 repsto(limit):
      yield from range(min(limit, 9)+1)
      for rep in range(2, 10**len(str(limit))):
        for digit in "123456789":
          out = int(digit*rep)
          if out > limit: return
          yield out
    print(list(filter(smith, repsto(10**32)))) # Michael S. Branicky, Apr 22 2021

A334528 Palindromic numbers that are also Niven numbers and Smith numbers.

Original entry on oeis.org

4, 666, 28182, 45054, 51315, 82628, 239932, 454454, 864468, 2594952, 2976792, 3189813, 3355533, 4172714, 4890984, 5319135, 5367635, 5777775, 7149417, 7247427, 8068608, 8079708, 8100018, 8280828, 8627268, 9227229, 9423249, 21699612, 22544522, 24166142, 27677672
Offset: 1

Views

Author

Amiram Eldar, May 05 2020

Keywords

Comments

Witno (2014) proved that this sequence is infinite.

Examples

			666 is a term since it is palindromic, a Niven number (6 + 6 + 6 = 18 is a divisor of 666) and a Smith number (666 = 2 * 3 * 3 * 37 and 6 + 6 + 6 = 2 + 3 + 3 + 3 + 7).
		

Crossrefs

Intersection of A002113, A005349 and A006753.
Intersection of any two of the sequences A082232, A098834 and A334527.

Programs

  • Mathematica
    digSum[n_] := Plus @@ IntegerDigits[n]; palNivenSmithQ[n_] := PalindromeQ[n] && Divisible[n, (ds = digSum[n])] && CompositeQ[n] && Plus @@ (Last@# * digSum[First@#] & /@ FactorInteger[n]) == ds; Select[Range[10^5], palNivenSmithQ]
Showing 1-5 of 5 results.