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 11 results. Next

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)).

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

A380873 Concatenate sum and product of decimal digits of n.

Original entry on oeis.org

0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 10, 21, 32, 43, 54, 65, 76, 87, 98, 109, 20, 32, 44, 56, 68, 710, 812, 914, 1016, 1118, 30, 43, 56, 69, 712, 815, 918, 1021, 1124, 1227, 40, 54, 68, 712, 816, 920, 1024, 1128, 1232, 1336, 50, 65, 710, 815, 920, 1025, 1130, 1235, 1340, 1445, 60
Offset: 0

Views

Author

M. F. Hasler, Apr 01 2025

Keywords

Comments

This sequence is motivated by A271220 and A271268 (maybe others?) which give the trajectory of specific starting values under iterations of this map.
The fixed points of this map, (0, 10, ..., 90, 119, 1236, ...), are listed in sequence A062237 (except for 0).
Besides the fixed points, this map has also limiting cycles, for example:
* the cycle C(88) = (88, 1664, 17144, 17112, 1214) of length 5, first reached for initial values 8 (cf. A271268) and 38, 83, 88, 146, ....
* Another 5-cycle is C(18168) = (18168, 24384, 21768, 24672, 21672), first reached for initial values 188 and 233.
The infinite square array A380872 gives the trajectory of starting value r = 0, 1, 2, ... in row r.

Examples

			For n = 0, ..., 9, a(n) = 11*n because sum and product of digits of n are equal to n.
a(10) = concat(1+0, 1*0) = 10, a(11) = concat(1+1, 1*1) = 21, a(12) = concat(1+2, 1*2) = 32, etc.
		

Crossrefs

Cf. A007953 (sum of digits), A007954 (product of digits).
Cf. A062237 (fixed points of this map).
Cf. A271220 (trajectory of 6), A271268 (trajectory of 8), A380872 (trajectories of all nonnegative integers as rows of a table).

Programs

  • Maple
    a:= n-> (l-> parse(cat(add(i, i=l), mul(i, i=l))))(convert(n, base, 10)):
    seq(a(n), n=0..60);  # Alois P. Heinz, Apr 12 2025
  • Mathematica
    a[n_]:=FromDigits[Join[IntegerDigits[Total[IntegerDigits[n]]],IntegerDigits[Times@@IntegerDigits[n]]]];Array[a,61,0] (* James C. McMahon, Apr 02 2025 *)
  • PARI
    apply( {A380873(n)=eval(Str(vecsum(n=digits(n)),if(n,vecprod(n))))}, [0..99])
    
  • Python
    from math import prod
    def A380873(n): return int(f"{sum(d:=list(map(int,str(n))))}{prod(d)}")
    print(first_99 := list(map(A380873,range(99))))

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

A380872 Infinite square array, where row r >= 0 is the orbit of r under the map A380873: concatenate(sum of digits, product of digits).

Original entry on oeis.org

0, 0, 1, 0, 11, 2, 0, 21, 22, 3, 0, 32, 44, 33, 4, 0, 56, 816, 69, 44, 5, 0, 1130, 1548, 1554, 816, 55, 6, 0, 50, 18160, 15100, 1548, 1025, 66, 7, 0, 50, 160, 70, 18160, 80, 1236, 77, 8, 0, 50, 70, 70, 160, 80, 1236, 1449, 88, 9, 0, 50, 70, 70, 70, 80, 1236, 18144, 1664, 99, 10, 0, 50, 70, 70, 70, 80, 1236, 18128, 17144, 1881, 10, 11, 0, 50, 70, 70, 70, 80, 1236, 20128, 17112, 1864
Offset: 0

Views

Author

M. F. Hasler, Apr 01 2025

Keywords

Comments

As usual and required by the "table" display function, the array is read by falling antidiagonals.

Examples

			The array starts as follows: (Elements in column 0 are also equal to the row index.)
col.0|  1 |  2 |  3  |  4  |  5  |  6 |  7 |  8  |  9  |  10 |  11 | 12 |  13 |  14
-----+----+----+-----+-----+-----+----+----+-----+-----+-----+-----+----+-----+-----
   0    0     0     0     0     0    0    0     0     0     0     0    0     0     0
   1   11    21    32    56  1130   50   50    50    50    50    50   50    50    50
   2   22    44   816  1548 18160  160   70    70    70    70    70   70    70    70
   3   33    69  1554 15100    70   70   70    70    70    70    70   70    70    70
   4   44   816  1548 18160   160   70   70    70    70    70    70   70    70    70
   5   55  1025    80    80    80   80   80    80    80    80    80   80    80    80
   6   66  1236  1236  1236  1236 1236 1236  1236  1236  1236  1236 1236  1236  1236
   7   77  1449 18144 18128 20128  130   40    40    40    40    40   40    40    40
   8   88  1664 17144 17112  1214   88 1664 17144 17112  1214    88 1664 17144 17112
   9   99  1881  1864 19192 22162 1348 1696 22324  1396 19162 19108  190   100    10
  10   10    10    10    10    10   10   10    10    10    10    10   10    10    10
  11   21    32    56  1130    50   50   50    50    50    50    50   50    50    50
  ...  ...  ...
For example, row 1 is the trajectory of 1 under the map A380873: 1 -> concat (1,1) = 11 -> concat(1+1, 1*1) = 21 -> concat(2+1,2*1) = 32 -> concat(3+2,3*2) = 56 -> ...
Most of the  initial rows reach a fixed point after not too many iterations, but for example row 8 (A271268) and also 38, 83, 88, 146,... reach a cycle of length 5, C(88) = (88, 1664, 17144, 17112, 1214). Another 5-cycle is C(18168) = (18168, 24384, 21768, 24672, 21672), first reached in row 188 and 233.
Fixed points (see A062237) are the multiples of 10 less than 100, and 119 and 1236 (for row 6, 66, 123, ...), 19144 (row 289), and others.
		

Crossrefs

Cf. A380873 (iterated function), A007953 (sum of digits), A007954 (product of digits).
Cf. A271220 (row 6), A271268 (row 8).

Programs

  • PARI
    A380872_row(r, num_columns=30)=vector(num_columns, i, r=if(i>1, eval(Str(vecsum(r=digits(r)), if(r, vecprod(r)))), r))
    A380872_array(rows=9, cols=rows)=Mat(vectorv(rows,i,A380872_row(i-1, cols)))

Formula

A(r,0) = r; A(r,n+1) = A380873(A(r,n)) = concat(A007953(A(r,n)), A007954(A(r,n))).

A271220 Concatenate sum of digits of previous term and product of digits of previous term, starting with 6.

Original entry on oeis.org

6, 66, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236
Offset: 0

Views

Author

Sander Claassen, Apr 02 2016

Keywords

Comments

Each term is created by calculating the sum of the digits of the previous number, and the product of its digits. The results are concatenated to give the new number. Starting with 6, the second number is 66. The third number is generated as follows: 6+6 = 12, 6*6 = 36, which gives 1236. After that, the numbers remain unchanged, because 1+2+3+6 = 12 and 1x2x3x6 = 36, so combined 1236 again.
For more information, see A380873 (the iterated function), A380872 (all trajectories), A062237 (fixed points). - M. F. Hasler, Apr 02 2025

Crossrefs

Cf. A380873 (the iterated function), A007953 (sum of digits), A007954 (product of digits), A380872 (all trajectories), A062237 (fixed points).

Programs

  • Mathematica
    NestList[FromDigits[Flatten@ {IntegerDigits@ Total@ #, IntegerDigits@ If[Length@ # == 1, #, Times @@ #]}] &@ IntegerDigits@ # &, 6, 50] (* Michael De Vlieger, Apr 02 2016 *)
  • PARI
    A380872_row(6) \\ M. F. Hasler, Apr 02 2025

Formula

a(n) = 1236 for all n > 2. - M. F. Hasler, Apr 02 2025

Extensions

Offset changed to 0 by M. F. Hasler, Apr 02 2025

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

A380871 Limit of the trajectory of n under A380873: concatenate sum and product of digits, if it ends on a fixed point, otherwise the least element of the limit cycle.

Original entry on oeis.org

0, 50, 70, 70, 70, 80, 1236, 40, 88, 10, 10, 50, 50, 60, 20, 50, 70, 50, 70, 10, 20, 50, 70, 50, 70, 80, 70, 10, 80, 90, 30, 60, 50, 70, 60, 90, 90, 40, 88, 90, 40, 20, 70, 60, 70, 20, 70, 40, 70, 10, 50, 50, 80, 90, 20, 80, 50, 50, 80, 40, 60, 70, 70, 90, 70, 50, 1236, 70, 70, 70, 70, 50, 10
Offset: 0

Views

Author

M. F. Hasler, Apr 02 2025

Keywords

Comments

The fixed points of A380873 are listed in A062237, except for 0.
The first two limit cycles that occur are both of length 5:
* C(88) = (88, 1664, 17144, 17112, 1214), reached for n = 8, 38, 83, 88, ... and
* C(18168) = (18168, 24384, 21768, 24672, 21672), reached for n = 188, 233, ...

Examples

			The trajectory of n = 1 under A380873 is: 1 -> concat(1, 1) = 11 -> concat(1+1, 1*1) = 21 -> concat(2+1, 2*1) = 32 -> concat(3+2, 3*2) = 56 -> concat(3+2, 3*2) = 1130 -> concat(1+1+3+0, 1*1*3*0) = 50 -> concat(5+0, 5*0) = 50, so a fixed point is reached, and a(1) = 50.
The trajectory of n = 8 under A380873 is: 8 -> concat(8, 8) = 88 -> concat(8+8, 8*8) = 1664 -> concat(1+6+6+4, 1*6*6*4) = 17144 -> concat(1+7+1+4+4, 1*7*1*4*4) = 17112 -> concat(1+7+1+1+2, 1*7*1*1*2) = 1214 -> concat(1+2+1+4, 1*2*1*4) = 88 -> 1664 etc.: here the limit 5-cycle C(88) = (88, 1664, 17144, 17112, 1214) is reached, so a(8) = min(C(88)) = 88.
		

Crossrefs

Cf. A380873 (iterated function), A007953 (sum of digits), A007954 (product of digits), A062237 (nonzero fixed points of A380873), A380872 (trajectories under A380873).

Programs

  • PARI
    apply( {A380871(n)=for(i=0,1,my(S=[n]); while(!setsearch(S, n=A380873(n)), S=setunion(S,[n])); i&& n=S[1]);n}, [0..90])

A355377 Numbers k such that the concatenation of digits included in the sum and product of the digits of the number k is an anagram of the number k, and digits of the number are sorted in nondecreasing order.

Original entry on oeis.org

119, 1236, 11359, 11449, 122669, 2334699, 13346899
Offset: 1

Views

Author

Ilya Orlov, Jun 30 2022

Keywords

Comments

From Michael S. Branicky, Jun 30 2022: (Start)
No more terms. [updated Jul 01 2022]
There are no terms > 10^87. If k is a d-digit number, Sum(digits(k)) <= 9*n, Product(digits(k)) <= 9^n, and d exceeds the sum of the number of digits in the latter two for d >= 88. (End)
a(n) is a digit permutation of A062237(n+9). - Thomas Scheuerle, Jun 30 2022

Examples

			11359 is a term since 1+1+3+5+9 = 19, 1*1*3*5*9 = 135, and 19135 is an anagram of 11359.
		

Crossrefs

Cf. A062237.

Programs

  • Python
    import math
    def is_ok(num):
        nums = [int(i) for i in str(num)]
        summa = sum(nums)
        prods = math.prod(nums)
        syms_1 = [str(i) for i in nums]
        syms_2 = [i for i in str(summa)] + [i for i in str(prods)]
        if syms_1 == sorted(syms_2):
            return True
        return False
    
  • Python
    from math import prod
    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 ndgen(d): yield from ("".join(m) for m in mc("123456789", d))
    def agen(): yield from (int(s) for d in count(1) for s in ndgen(d) if c(s))
    print(list(islice(agen(), 7))) # Michael S. Branicky, Jun 30 2022
Showing 1-10 of 11 results. Next