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-10 of 19 results. Next

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

A049101 Numbers m such that m divides (product of digits of m) * (sum of digits of m).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 18, 24, 45, 48, 135, 144, 288, 378, 476, 756, 864, 1575, 39366, 69984, 139968
Offset: 1

Views

Author

Keywords

Comments

Next term if it exists is greater than 4*10^7. - Michel ten Voorde
Sequence is finite and bounded above by 10^84, since if 10^k <= n < 10^(k+1) (product of digits of n)*(sum of digits of n) <= k*9^(k+2) which is less than 10^k for k >= 84. - Henry Bottomley, May 18 2000
Numbers with a zero digit are not permitted. - Harvey P. Dale, Jul 16 2011
No further terms to 2.5*10^9. - Robert G. Wilson v, Jul 17 2011
Sequence is complete. - Giovanni Resta, Mar 20 2013
If product of digits is performed on nonzero digits only, then 1088 is also in the sequence. - Giovanni Resta, Mar 22 2013

Examples

			139968 is in the sequence since it divides (1*3*9*9*6*8) * (1+3+9+9+6+8). - _Giovanni Resta_, Mar 20 2013
		

Crossrefs

Programs

  • Mathematica
    okQ[n_]:=Module[{idn=IntegerDigits[n]},!MemberQ[idn,0] && Divisible[ (Total[idn]*Times@@idn),n]] (* Harvey P. Dale, Jul 16 2011 *)
    (* full sequence *) dig[nD_] := Block[{ric, sol = {}, check}, check[mu_, minN_] := Block[{di = DigitCount@minN, k = 1, r}, While[(r = mu/k) >= minN, If[IntegerQ[r] && DigitCount[r] == di, AppendTo[sol, r]]; k++]]; ric[n_, prod_, sum_, lastd_, cnt_] := Block[{t}, If[cnt == nD, check[prod*sum, n], Do[t = nD - cnt - 1; If[n*10^(t+1) <= d*prod*9^t*(sum + d + 9*t), ric[10*n + d, d*prod, d + sum, d, cnt + 1], Break[]], {d, 9, lastd, -1}]]]; ric[0, 1, 0, 1, 0]; Print["nDig=", nD, " sol=", sol = Sort@sol]; sol]; Flatten[dig /@ Range[84]] (* Giovanni Resta, Mar 20 2013 *)

A049102 Positive numbers n such that n is a multiple of (product of digits of n) * (sum of digits of n).

Original entry on oeis.org

1, 12, 111, 112, 135, 144, 216, 432, 2112, 11112, 11115, 11232, 12312, 13824, 14112, 21112, 23112, 27216, 31212, 41112, 81216, 93312, 111132, 122112, 124416, 131112, 132192, 186624, 212112, 221112, 221184, 222912, 239112, 248832, 311472, 316224
Offset: 1

Views

Author

Keywords

Comments

Empirically, it looks as if every number of the form (10^3^n-1)/9 has this property. - David W. Wilson, Dec 12 2001
From David A. Corneth, Jan 23 2019: (Start)
Indeed, (10^3^n-1)/9 is in the sequence. It has digital sum times product of digits equal to 3^n.
Proof: (10^3^0-1)/9 = (10^1-1)/9 = 1 is in the sequence.
If (10^3^k-1)/9 is in the sequence then (10^3^(k + 1)-1)/9 = ((10^3^k-1)/9) * (10^(2*3^k) + 10^(3^k) + 1) = 3 * m * ((10^3^k-1)/9) for some m. This number is divisible by 3 * 3^k = 3^(k + 1) so (10^3^(k+1) - 1)/9 is in the sequence and so (10^3^n - 1) / 9 is in the sequence from which it follows that the sequence is infinite. (End)

Examples

			432 is a term because: 4*3*2=24, 4+3+2=9, 24*9=216 and 432/216 = 2.
		

Crossrefs

Programs

  • Mathematica
    Select[ Range[10^6], IntegerQ[ # /(Apply[ Times, IntegerDigits[ # ]] * Apply[ Plus, IntegerDigits[ # ]] ) ] & ]
  • PARI
    isok(n) = my(d=digits(n)); vecprod(d) && (n % (vecsum(d)*vecprod(d)) == 0); \\ Michel Marcus, Jan 23 2019

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

A066308 a(n) = (sum of digits of n) * (product of digits of n).

Original entry on oeis.org

1, 4, 9, 16, 25, 36, 49, 64, 81, 0, 2, 6, 12, 20, 30, 42, 56, 72, 90, 0, 6, 16, 30, 48, 70, 96, 126, 160, 198, 0, 12, 30, 54, 84, 120, 162, 210, 264, 324, 0, 20, 48, 84, 128, 180, 240, 308, 384, 468, 0, 30, 70, 120, 180, 250, 330, 420, 520, 630, 0, 42, 96, 162, 240, 330
Offset: 1

Views

Author

Labos Elemer, Dec 13 2001

Keywords

Comments

a(n) can be greater than, less than, or equal to n; see Example section.

Examples

			For n = 12, a(12) = (1 + 2)*(1*2) = 3*2 = 6 < n;
for n = 19, a(19) = (1 + 9)*(1*9) = 90 > n;
for n = 135, a(135) =(1 + 3 + 5)*(1*3*5) = 135 = n.
		

Crossrefs

Programs

  • Mathematica
    asum[x_] := Apply[Plus, IntegerDigits[x]] apro[x_] := Apply[Times, IntegerDigits[x]] a[n]=asum[n]*apro[n]
    sdpd[n_]:=Module[{idn=IntegerDigits[n]},Total[idn]Times@@idn]; Array[ sdpd,70] (* Harvey P. Dale, Dec 31 2011 *)
  • PARI
    a(n) = my(d = digits(n)); vecsum(d) * vecprod(d); \\ Michel Marcus, Feb 24 2017

Extensions

Edited by Jon E. Schoenfield, Jul 09 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

A051004 Numbers divisible both by their individual digits and by the sum of their digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 111, 112, 126, 132, 135, 144, 162, 216, 222, 224, 264, 288, 312, 315, 324, 333, 336, 396, 432, 444, 448, 555, 612, 624, 648, 666, 735, 777, 864, 888, 936, 999, 1116, 1122, 1128, 1164, 1212, 1224, 1236, 1296, 1332
Offset: 1

Views

Author

Keywords

Comments

No zero digits permitted. [Harvey P. Dale, Dec 18 2011]

Crossrefs

Intersection of A005349 and A034838.

Programs

  • Haskell
    a051004 n = a051004_list !! (n-1)
    a051004_list =  [x | x <- a005349_list,
                         x == head (dropWhile (< x) a034838_list)]
    -- Reinhard Zumkeller, Mar 03 2012
  • Mathematica
    ddQ[n_]:=Module[{idn=IntegerDigits[n]},!MemberQ[idn,0] && Divisible[ n,Total[idn]]&& And @@ Divisible[n,idn]]; Select[Range[1400],ddQ] (* Harvey P. Dale, Dec 18 2011 *)

Extensions

Offset corrected by Reinhard Zumkeller, Mar 03 2012

A066310 Numbers k such that k < (product of digits of k) * (sum of digits of k).

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 14, 15, 16, 17, 18, 19, 23, 24, 25, 26, 27, 28, 29, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 45, 46, 47, 48, 49, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 92, 93, 94, 95
Offset: 1

Views

Author

Labos Elemer and Klaus Brockhaus, Dec 13 2001

Keywords

Examples

			14 < (1*4)*(1+4) = 20, so 14 is a term of this sequence.
For n=199, (1+9+9)*1*9*9 = 1539 > 199, so 199 is here.
		

Crossrefs

Programs

  • ARIBAS
    function a066311(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; p := p*d; end; if n < p*k then write(n,","); end; end; end; a066311(0,120);
    
  • Mathematica
    asum[x_] := Apply[Plus, IntegerDigits[x]] apro[x_] := Apply[Times, IntegerDigits[x]] sz[x_] := asu[x]*apro[x] Do[s=sz[n]; If[Greater[s, n], Print[n]], {n, 1, 200}]
  • PARI
    isok(m) = my(d=digits(m)); m < vecprod(d)*vecsum(d); \\ Michel Marcus, Mar 23 2020

A066024 Numbers k such that the product of the digits of k minus the sum of the digits of k is prime.

Original entry on oeis.org

24, 25, 27, 29, 33, 34, 35, 37, 38, 42, 43, 45, 47, 49, 52, 53, 54, 56, 57, 59, 65, 67, 72, 73, 74, 75, 76, 78, 79, 83, 87, 92, 94, 95, 97, 125, 126, 128, 133, 144, 146, 148, 152, 162, 164, 166, 182, 184, 188, 215, 216, 218, 222, 223, 225, 227, 229, 232, 245, 247
Offset: 1

Views

Author

Enoch Haga, Dec 11 2001

Keywords

Examples

			a(1)=24 because 2 + 4 = 6, 2*4 = 8, and 8 - 6 = 2, which is prime. [corrected by _Harry J. Smith_, Nov 07 2009]
		

Crossrefs

Programs

  • PARI
    isok(k) = {my(d=digits(k)); isprime(vecprod(d)-vecsum(d))} \\ Harry J. Smith, Nov 07 2009

A066027 Numbers k such that the sum of digits of k minus the product of digits of k is prime.

Original entry on oeis.org

20, 30, 50, 70, 101, 102, 104, 106, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 131, 140, 141, 151, 160, 161, 171, 181, 191, 200, 201, 203, 205, 209, 210, 211, 230, 250, 290, 300, 302, 304, 308, 311, 320, 340, 380, 401, 403, 407, 409, 410
Offset: 1

Views

Author

Enoch Haga, Dec 11 2001

Keywords

Examples

			a(11)=112 because 1 + 1 + 2 = 4, 2*1*1 = 2, and 4 - 2 = 2, which is prime. [corrected by _Harry J. Smith_, Nov 07 2009]
		

Crossrefs

Programs

  • PARI
    isok(k) = {my(d=digits(k)); isprime(vecsum(d) - vecprod(d))} \\ Harry J. Smith, Nov 07 2009
Showing 1-10 of 19 results. Next