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-6 of 6 results.

A038369 Numbers k such that k = (product of digits of k) * (sum of digits of k).

Original entry on oeis.org

0, 1, 135, 144
Offset: 1

Views

Author

Keywords

Comments

The list is complete. Proof: One shows that the number of digits is at most 84 and then it is only necessary to consider numbers of the forms 2^i*3^j*7^k and 3^i*5^j*7^k. - David W. Wilson, May 16 2003

Examples

			144 belongs to the sequence because 1*4*4=16, 1+4+4=9 -> 16*9=144
		

Crossrefs

Programs

  • Mathematica
    pdsdQ[n_]:=Module[{idn=IntegerDigits[n]},(Total[idn]Times@@idn)==n]; Select[Range[0,150],pdsdQ]  (* Harvey P. Dale, Apr 23 2011 *)
  • PARI
    is(n)=my(d=digits(n)); factorback(d)*vecsum(d)==n \\ Charles R Greathouse IV, Feb 06 2017

Formula

a(n) = A007953(a(n)) * A007954(a(n)).

A062237 Numbers k which are (sum of digits of k) concatenated with (product of digits of k).

Original entry on oeis.org

0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 119, 1236, 19135, 19144, 261296, 3634992, 43139968
Offset: 1

Views

Author

Erich Friedman, Jun 30 2001

Keywords

Comments

For a d-digit number with d >= 88, the sum and product of the digits together have fewer than d digits. So every element of this sequence has 87 or fewer digits, hence it is finite. - David W. Wilson, Apr 28 2005
Fixed points of the map A380873: concatenate sum and product of digits. - M. F. Hasler, Apr 01 2025

Examples

			1236 has sum of digits 12 and product of digits 36.
		

Crossrefs

Cf. A007953 (sum of digs), A007954 (product of digs), A038364, A038369, A066282, A380873, A380872 (trajectories under map).

Programs

  • Mathematica
    sdpdQ[n_]:=Module[{idn=IntegerDigits[n],s,p},s=Total[idn];p=Times@@idn;n==FromDigits[Join[IntegerDigits[s],IntegerDigits[p]]]]; Select[Range[44*10^6],sdpdQ] (* Harvey P. Dale, Nov 23 2024 *)
  • Python
    from math import prod
    from sympy.utilities.iterables import multiset_permutations as mp
    from itertools import count, islice, combinations_with_replacement as mc
    def c(s):
        d = list(map(int, s))
        return sorted(s) == sorted(str(sum(d)) + str(prod(d)))
    def ok(s):
        d = list(map(int, s))
        return s[0] != '0' and "".join(s) == str(sum(d)) + str(prod(d))
    def nd(d): yield from ("".join(m) for m in mc("0123456789", d))
    def b(): yield from (s for d in count(1) for s in nd(d) if c(s))
    def a(): yield from (int("".join(p)) for s in b() for p in mp(s) if ok(p))
    print(list(islice(a(), 16))) # Michael S. Branicky, Jun 30 2022

Extensions

More terms from Harvey P. Dale, Jul 04 2001
More terms from David W. Wilson, Apr 28 2005; he reports on May 03 2005 that there are no further terms.
Offset corrected by Altug Alkan, Apr 10 2018

A023651 Numbers k such that (product of digits of k) * (sum of digits of k) = 2k.

Original entry on oeis.org

0, 2, 15, 24, 1575, 39366
Offset: 1

Views

Author

Jason Earls, Dec 11 2001

Keywords

Comments

Except for k = 0, this sequence is a subsequence of A049101. - Jason Yuen, Feb 26 2024

Crossrefs

Programs

  • Mathematica
    Do[ If[ 2n == Apply[ Times, IntegerDigits[n]] Apply[ Plus, IntegerDigits[n]], Print[n]], {n, 0, 10^7} ]
  • PARI
    isok(n) = if(n, factorback(digits(n)), 0) * sumdigits(n) == 2*n \\ Mohammed Yaseen, Jul 22 2022
    
  • Python
    from math import prod
    def s(n): return sum(map(int, str(n)))
    def p(n): return prod(map(int, str(n)))
    for n in range(0, 10**6):
      if p(n)*s(n)==2*n:
        print(n) # Mohammed Yaseen, Jul 22 2022

Extensions

Offset corrected by Arkadiusz Wesolowski, Oct 17 2012

A366832 Numbers k such that k = (product of nonzero digits) * (sum of digits) for the digits of k in base 9.

Original entry on oeis.org

1, 12, 1536, 172032, 430080, 4014080
Offset: 1

Views

Author

René-Louis Clerc, Jan 10 2024

Keywords

Comments

There is a finite number of such numbers (Property 1' of Clerc).

Examples

			430080 = 724856_9, (7+2+4+8+5+6)*(7*2*4*8*5*6) = 32*13440 = 430080.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[5*10^6],Total[IntegerDigits[#,9]]*Fold[Times,1,IntegerDigits[#,9]]==#&] (* James C. McMahon, Jan 30 2024 *)
  • PARI
    isok(k, b) = my(d=select(x->(x>0), digits(k,b))); vecprod(d)*vecsum(d) == k;
     for (k=1, 10^7, if (isok(k, 9), print1(k, ", ")))

A367070 Numbers k such that k = (product of nonzero digits) * (sum of digits) for the digits of k in base 7.

Original entry on oeis.org

1, 16, 128, 250, 480, 864, 21600, 62208, 73728
Offset: 1

Views

Author

René-Louis Clerc, Jan 10 2024

Keywords

Comments

There is a finite number of such numbers; we only calculated the terms in [1, 10^10] (Property 1' of Clerc).

Examples

			21600 = 116655_7, (1+1+6+6+5+5)*(1*1*6*6*5*5) = 24*900 = 21600.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[7^7], #1 == Times @@ DeleteCases[#2, 0]*Total[#2] & @@ {#, IntegerDigits[#, 7]} &] (* Michael De Vlieger, Mar 25 2024 *)
  • PARI
    isok(k, b) = my(d=select(x->(x>0), digits(k,b))); vecprod(d)*vecsum(d) == k;
    for (k=1, 10^5, if (isok(k, 7), print1(k, ", ")))

A370251 Base-12 numbers k such that k = (product of nonzero digits of k) * (sum of digits of k) (written in base 10).

Original entry on oeis.org

1, 176, 231, 495, 7040
Offset: 1

Views

Author

René-Louis Clerc, Feb 13 2024

Keywords

Comments

There are only finitely many such numbers (Property 1' of Clerc).

Examples

			231 = 173_12, (1*7*3)*(1+7+3) = 21*11 = 231.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[5*10^4], Total[IntegerDigits[#, 12]]*Fold[Times, 1, Select[IntegerDigits[#, 12],#>0&]]==#&] (* James C. McMahon, Feb 14 2024 *)
  • PARI
    isok(k, b) = my(d=select(x->(x>0), digits(k, b))); vecprod(d)*vecsum(d) == k;
    for (k=0, 10^10, if (isok(k, 12), print1(k, ", ")))
Showing 1-6 of 6 results.