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

A249334 Numbers for which the digital sum contains the same distinct digits as the digital product.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 99, 123, 132, 213, 231, 312, 321, 1124, 1137, 1142, 1173, 1214, 1241, 1317, 1371, 1412, 1421, 1713, 1731, 2114, 2141, 2411, 3117, 3171, 3344, 3434, 3443, 3711, 4112, 4121, 4211, 4334, 4343, 4433, 7113, 7131, 7311, 11125, 11133
Offset: 1

Views

Author

Jaroslav Krizek, Oct 25 2014

Keywords

Comments

Numbers k such that A007953(k) contains the same distinct digits as A007954(k). (But either of the two may contain some digit(s) more than once.)
Supersequence of A034710 (positive numbers for which the sum of digits is equal to the product of digits).
Union of A034710 and A249335.
The sequence is infinite since, e.g., A002275(n) = (10^n-1)/9 is in the sequence for all n = A002275(k), k>=0; and more generally N(k,d) = A002275(n)-1+d with n = (A002275(k)-1)*d+1, k>0 and 0M. F. Hasler, Oct 29 2014

Examples

			1137 is a term because 1+1+3+7 = 12 and 1*1*3*7 = 21.
3344 is a term because 3+3+4+4=14 has the same (distinct) digits as 3*3*4*4=144.
		

Crossrefs

Programs

  • Magma
    [0] cat [n: n in [1..10^6] | Set(Intseq(&*Intseq(n))) eq Set(Intseq(&+Intseq(n)))];
    
  • Mathematica
    Select[Range[0,12000],Union[IntegerDigits[Total[IntegerDigits[#]]]]==Union[IntegerDigits[Times@@IntegerDigits[#]]]&] (* Harvey P. Dale, Aug 17 2025 *)
  • PARI
    is_A249334(n)=Set(digits(sumdigits(n)))==Set(digits(prod(i=1,#n=digits(n),n[i]))) \\ M. F. Hasler, Oct 29 2014

A338258 Positive integers with digits in nondecreasing order 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, 3344, 11558, 22334, 111339, 222233, 1111278, 1112779, 11111478, 11111479, 11112455, 111111447, 111111559, 111111667, 111112278, 111112279, 111113557, 111113677, 111122255, 111135558, 1111111489, 1111112247, 1111113333, 1111116899, 1111145556, 1111555588, 1244455555
Offset: 1

Views

Author

David A. Corneth, Oct 18 2020

Keywords

Comments

Intersection of A009994 and A249335.

Examples

			22334 is in the sequence as its digital product is 144 and its digital sum is 14. The digits of the latter two are either 1 or 4 and the values 14 and 144 differ.
		

Crossrefs

Programs

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