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.

A034710 Positive numbers for which the sum of digits equals the product of digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 123, 132, 213, 231, 312, 321, 1124, 1142, 1214, 1241, 1412, 1421, 2114, 2141, 2411, 4112, 4121, 4211, 11125, 11133, 11152, 11215, 11222, 11251, 11313, 11331, 11512, 11521, 12115, 12122, 12151, 12212, 12221, 12511
Offset: 1

Views

Author

Keywords

Comments

Positive numbers k such that A007953(k) = A007954(k).
If k is a term, the digits of k are solutions of the equation x1*x2*...*xr = x1 + x2 + ... + xr; xi are from [1..9]. Permutations of digits (x1,...,xr) are different numbers k with the same property A007953(k) = A007954(k). For example: x1*x2 = x1 + x2; this equation has only 1 solution, (2,2), which gives the number 22. x1*x2*x3 = x1 + x2 + x3 has a solution (1,2,3), so the numbers 123, 132, 213, 231, 312, 321 have the property. - Ctibor O. Zizka, Mar 04 2008
Subsequence of A249334 (numbers for which the digital sum contains the same distinct digits as the digital product). With {0}, complement of A249335 with respect to A249334. Sequence of corresponding values of A007953(a(n)) = A007954(a(n)): 1, 2, 3, 4, 5, 6, 7, 8, 9, 4, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, ... contains only numbers from A002473. See A248794. - Jaroslav Krizek, Oct 25 2014
There are terms of the sequence ending in any term of A052382. - Robert Israel, Nov 02 2014
The number of digits which are not 1 in a(n) is O(log log a(n)) and tends to infinity as a(n) does. - Robert Dougherty-Bliss, Jun 23 2020

Examples

			1124 is a term since 1 + 1 + 2 + 4 = 1*1*2*4 = 8.
		

Crossrefs

Cf. A066306 (prime terms), A066307 (nonprimes).

Programs

  • Haskell
    import Data.List (elemIndices)
    a034710 n = a034710_list !! (n-1)
    a034710_list = elemIndices 0 $ map (\x -> a007953 x - a007954 x) [1..]
    -- Reinhard Zumkeller, Mar 19 2011
    
  • Magma
    [n: n in [1..10^6] | &*Intseq(n) eq &+Intseq(n)] // Jaroslav Krizek, Oct 25 2014
    
  • Mathematica
    Select[Range[12512], (Plus @@ IntegerDigits[ # ]) == (Times @@ IntegerDigits[ # ]) &] (* Alonso del Arte, May 16 2005 *)
  • PARI
    is(n)=my(d=digits(n)); vecsum(d)==factorback(d) \\ Charles R Greathouse IV, Feb 06 2017

Extensions

Corrected by Larry Reeves (larryr(AT)acm.org), Jun 27 2001
Definition changed by N. J. A. Sloane to specifically exclude 0, Sep 22 2007

A061672 Smallest positive number formed by a set of digits whose product = sum of the digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 123, 1124, 11125, 11133, 11222, 111126, 1111127, 1111134, 11111128, 11111223, 111111129, 111111135, 1111111144, 11111111136, 11111111224, 111111112222, 1111111111137, 1111111111145, 1111111111233
Offset: 1

Views

Author

Amarnath Murthy, Jun 26 2001

Keywords

Comments

From M. F. Hasler, Oct 29 2014: (Start)
This is the subsequence of terms of A034710 with digits in nondecreasing order, which is meant by "smallest": For example, 132 also has sum of digits = product of digits, but is already "represented" by 123. The word "set" in the definition actually means "multiset".
The sequence is infinite: for any number N whose digits form a nondecreasing sequence whose sum of digits S is not larger than the product of digits P (i.e., N in A062998), a term of the sequence is obtained by prefixing N with P-S digits '1'. (End)

Examples

			1124 is a term since 1 + 1 + 2 + 4 = 1*1*2*4 = 8.
		

Crossrefs

Programs

  • PARI
    is_A061672(n)={vecsort(n=digits(n))==n && normlp(n,1)==prod(i=1,#n,n[i])} \\ M. F. Hasler, Oct 29 2014

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jun 27 2001
Corrected by Franklin T. Adams-Watters, Oct 25 2006
Further corrections from T. D. Noe, Oct 12 2007

A249335 Numbers n for which the digital sum contains the same distinct digits as the digital product but the digital sum is not equal to the digital product.

Original entry on oeis.org

99, 1137, 1173, 1317, 1371, 1713, 1731, 3117, 3171, 3344, 3434, 3443, 3711, 4334, 4343, 4433, 7113, 7131, 7311, 11558, 11585, 11855, 15158, 15185, 15518, 15581, 15815, 15851, 18155, 18515, 18551, 22334, 22343, 22433, 23234, 23243, 23324, 23342, 23423, 23432
Offset: 1

Views

Author

Jaroslav Krizek, Oct 25 2014

Keywords

Comments

Numbers n such that A007953(n) contains the same distinct digits as A007954(n) but A007953(n) is not equal to A007954(n).
Complement of A034710 with respect to A249334.

Examples

			1137 is a member since 1+1+3+7 = 12 and 1*1*3*7 = 21.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..10^6] | (&*Intseq(n)) ne (&+Intseq(n)) and Set(Intseq(&*Intseq(n))) eq Set(Intseq(&+Intseq(n)))]

A249517 Numbers k for which the digital sum A007953(k) and the digital product A007954(k) both contain the same distinct digits as the number k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11111111111
Offset: 1

Views

Author

Jaroslav Krizek, Oct 31 2014

Keywords

Comments

a(12) = (10^106-1)/9 + 122222222. - Max Alekseyev, Nov 15 2014
Other entries include (10^111-1)/9, (10^113-1)/9 + 177, (10^115-1)/9 + 122222222, (10^117-1)/9 + 11117, (10^125-1)/9 + 2224, (10^126-1)/9 + 333335, (10^135-1)/9 + 4666, (10^143-1)/9 + 446, (10^143-1)/9 + 2224, (10^144-1)/9 + 33335. All other entries with 150 or fewer digits are formed by permutations of the decimal digits of these entries (including a(12)). (10^((10^m-1)/9)-1)/9 are entries of the sequence for m >= 0. - Chai Wah Wu, Nov 15 2014

Examples

			11111111111 is a term since A007953(11111111111) = 11 and A007954(11111111111) = 1.
		

Crossrefs

Intersection of A249515 and A249516. Subsequence of A249334.

Programs

  • Magma
    [0] cat [n: n in [0..10^7] | Set(Intseq(n)) eq Set(Intseq(&*Intseq(n))) and Set(Intseq(n)) eq Set(Intseq(&+Intseq(n)))];
    
  • PARI
    is(n)=if(n<=9,return(1)); my(d=digits(n),s=Set(d)); s==Set(digits(sum(i=1,#d,d[i]))) && s==Set(digits(prod(i=1,#d,d[i]))) \\ Charles R Greathouse IV, Nov 13 2014
    
  • Python
    from itertools import product
    from operator import mul
    from functools import reduce
    A249517_list = [0]
    for g in range(1,15):
        xp, ylist = [], []
        for i in range(9*g,-1,-1):
            x = set(str(i))
            if not (('0' in x) or (x in xp)):
                xv = [int(d) for d in x]
                imin = int(''.join(sorted(str(i))))
                if max(xv)*(g-len(x)) >= imin-sum(xv) and i-sum(xv) >=  min(xv)*(g-len(x)):
                    xp.append(x)
                    for y in product(x,repeat=g):
                        if set(y) == x:
                            yd = [int(d) for d in y]
                            if set(str(sum(yd))) == x == set(str(reduce(mul, yd, 1))):
                                ylist.append(int(''.join(y)))
        A249517_list.extend(sorted(ylist)) # Chai Wah Wu, Nov 15 2014

Extensions

a(11) = 11111111111 confirmed by Sean A. Irvine, Nov 13 2014, by direct search.

A249443 Numbers with digits in nondecreasing order and digital sum not larger than the product of the digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 23, 24, 25, 26, 27, 28, 29, 33, 34, 35, 36, 37, 38, 39, 44, 45, 46, 47, 48, 49, 55, 56, 57, 58, 59, 66, 67, 68, 69, 77, 78, 79, 88, 89, 99, 123, 124, 125, 126, 127, 128, 129, 133, 134, 135, 136, 137, 138, 139, 144, 145, 146, 147, 148, 149, 155, 156, 157, 158
Offset: 1

Views

Author

M. F. Hasler, Oct 29 2014

Keywords

Comments

Intersection of A009994 and A062998.
Except for the initial 0, a subsequence of the zeroless numbers A052382.
The nonzero terms of this sequence correspond to a term of A061672 obtained by concatenation with A002275(A007954(a(n))-A007953(a(n))).

Crossrefs

Programs

  • PARI
    is(n)={vecsort(n=digits(n))==n && normlp(n,1)<=prod(i=1,#n,n[i])}

A338257 Positive integers k with digits in nondecreasing order for which the digital sum contains the same distinct digits as the digital product.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 99, 123, 1124, 1137, 3344, 11125, 11133, 11222, 11558, 22334, 111126, 111339, 222233, 1111127, 1111134, 1111278, 1112779, 11111128, 11111223, 11111478, 11111479, 11112455, 111111129, 111111135, 111111447, 111111559, 111111667, 111112278
Offset: 1

Views

Author

David A. Corneth, Oct 18 2020

Keywords

Comments

Intersection of A009994 and A249334.

Examples

			3344 is in the sequence as its digits are in nondecreasing order and the digital sum is 14 and the digital product is 144. The digits of the latter two are either 1 or 4.
		

Crossrefs

Programs

  • PARI
    is(n) = {my(d); if(vecsort(d = digits(n)) != d, return(0)); Set(digits(vecprod(d))) == Set(digits(vecsum(d)))}
Showing 1-6 of 6 results.