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-9 of 9 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

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

Original entry on oeis.org

0, 1, 135, 144, 1088
Offset: 1

Views

Author

Klaus Brockhaus, Dec 13 2001

Keywords

Comments

Suppose a term k has d digits, then k > 10^(d-1), the product of nonzero digits <= 9^d, and the sum of digits <= 9*d. Since for d >= 85 we have 10^(d-1) > 9^d * (9*d), it follows that d <= 84. That is, the sequence is finite. I've further verified that there are no other terms, that is, the sequence is complete. - Max Alekseyev, Jul 29 2024

Examples

			(1+0+8+8) * (1*8*8) = 17*64 = 1088, so 1088 belongs to the sequence.
		

Crossrefs

Fixed points of A062331.

Programs

  • ARIBAS
    function a066282(a,b: integer); var n,k,j,p,d: integer; s: string; begin for n := a to b do s := itoa(n); k := 0; p := 1; for j := 0 to length(s) - 1 do d := atoi(s[j..j]); k := k + d; if d > 0 then p := p*d; end; end; if n = p*k then write(n,","); end; end; end; a066282(0,25000).
    
  • Mathematica
    Do[ d = Sort[ IntegerDigits[n]]; While[ First[d] == 0, d = Drop[d, 1]]; If[n == Apply[ Plus, d] Apply[ Times, d], Print[n]], {n, 0, 5*10^7} ]
  • PARI
    a066282(a,b) = local(n,k,q,p,d); for(n=a,b,k=0; p=1; q=n; while(q>0,d=divrem(q,10); q=d[1]; k=k+d[2]; p=p*max(1,d[2])); if(n==p*k,print1(n,", ")))
    a066282(0,25000)

Extensions

Offset corrected by Mohammed Yaseen, Jul 21 2022
Keywords fini,full added by Max Alekseyev, Jul 29 2024

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, ", ")))

A371337 Numbers k>0 such that k = (sum of digits of k^2) + (product of nonzero digits of k^2).

Original entry on oeis.org

127, 1467, 3052, 5860, 653230, 3483702, 43352128, 783820873, 8092385362, 622196951140, 1061882796441600145, 178949702436677222562
Offset: 1

Views

Author

René-Louis Clerc, Mar 19 2024

Keywords

Examples

			1467^2 = 2152089, (2+1+5+2+8+9) + (2*1*5*2*8*9) = 27 + 1440 = 1467.
		

Crossrefs

Programs

  • PARI
    SplusP(k,r) = my(d=select(x->(x>0),digits(k^r))); vecsum(d) + vecprod(d) == k;
            resuSplusP(p,r)=for(k=1,10^p,if(SplusP(k,r) ==1,print1(k,",")))

Extensions

a(9)-a(12) from Chai Wah Wu, Apr 20 2024

A371338 Numbers k>0 such that k = |(product of nonzero digits of k^2) - (sum of digits of k^2)|.

Original entry on oeis.org

161, 198, 1701, 604755, 629810, 4354506, 100018736, 411505847, 14869757951891, 2239397044538572646, 40766979086355529727820, 6289762487609138872319999999757
Offset: 1

Views

Author

René-Louis Clerc, Mar 19 2024

Keywords

Comments

Most often P-S is strictly positive but to always have an application of N* in N* we prefer to use |P-S| (cf. Clerc).

Examples

			1701^2 = 2893401, |(2*8*9*3*4*1) - (2+8+9+3+4+1)| = 1728 - 27 = 1701.
		

Crossrefs

Programs

  • PARI
    SmP(k,r)=my(d=select(x->(x>0),digits(k^r))); abs(vecsum(d)- vecprod(d)) == k;
     resuSmP(p,r)={for(k=1,10^p,if(SmP(k,r)==1, print1(k,";")))}

Extensions

a(9)-a(12) from Chai Wah Wu, Apr 20 2024
Showing 1-9 of 9 results.