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

A066306 Prime numbers such that sum of digits equals product of digits.

Original entry on oeis.org

2, 3, 5, 7, 2141, 2411, 4211, 11251, 12511, 15121, 21221, 25111, 1112171, 1127111, 1172111, 1271111, 7112111, 11112811, 11128111, 11218111, 12111811, 12118111, 12181111, 18211111, 81111211, 81112111
Offset: 1

Views

Author

Labos Elemer, Dec 13 2001

Keywords

Examples

			2141 = p[323], 2*1*4*1 = 8 = 2+1+4+1.
		

Crossrefs

Primes from A034710.

Programs

  • Magma
    [NthPrime(n): n in [1..2*10^4] | &+Intseq(NthPrime(n)) eq &*Intseq(NthPrime(n))]; // Vincenzo Librandi, Nov 18 2015
  • Mathematica
    f[n_] := IntegerDigits[ Prime[n]]; Prime[ Select[ Range[ PrimePi[10^10]], Apply[Plus, f[ # ]] == Apply[Times, f[ # ]] & ]]

Extensions

More terms from Robert G. Wilson v, Dec 27 2001

A066309 Numbers k such that k > (product of digits of k) * (sum of digits of k).

Original entry on oeis.org

10, 11, 12, 13, 20, 21, 22, 30, 31, 32, 40, 41, 50, 51, 60, 61, 70, 71, 80, 81, 90, 91, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 130, 131, 132, 133, 134, 140, 141, 142
Offset: 1

Views

Author

Labos Elemer and Klaus Brockhaus, Dec 13 2001

Keywords

Examples

			13 is in the sequence because (1*3)*(1+3) = 3*4 = 12 < 13.
125 is a term because (1*2*5)*(1+2+5) = 10*8 = 80 < 125.
		

Crossrefs

Programs

  • ARIBAS
    function a066312(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; a066312(0,150);
    
  • 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[n, s], Print[n]], {n, 1, 1000}]
    okQ[n_]:=Module[{idn=IntegerDigits[n]},n> Total[idn]Times@@idn];Select[Range[150],okQ]  (* Harvey P. Dale, Mar 12 2011 *)
  • PARI
    isok(k) = {my(d=digits(k)); k > vecprod(d) * vecsum(d)} \\ Harry J. Smith, Feb 10 2010

A272436 Semiprimes such that sum of digits equals product of digits.

Original entry on oeis.org

4, 6, 9, 22, 123, 213, 321, 1142, 1214, 1241, 4121, 11215, 11521, 12115, 12151, 21151, 22121, 51211, 111261, 112611, 116121, 116211, 121161, 162111, 211611, 261111, 621111, 1111217, 1111413, 1111431, 1111721, 1112117, 1117121, 1117211, 1121117, 1121171, 1121711
Offset: 1

Views

Author

K. D. Bajpai, May 06 2016

Keywords

Comments

Intersection of A001358 and A034710.
9 is the only member with digit 9. No member has more than one digit 3 or 6. - Robert Israel, May 06 2016

Examples

			1142 appears in the list because 1142 = 2*571 that is semiprime. Also, 1+1+4+2 = 8 = 1*1*4*2.
11215 appears in the list because 1142 = 5*2243 that is semiprime. Also, 1+1+2+1+5 = 10 = 1*1*2*1*5.
		

Crossrefs

Programs

  • Maple
    R:= proc(k,d,u,v) option remember;
        if k = 1 then
            if d = v - u then {[d]}
            else {}
            fi
        else
          `union`(seq(map(t -> [op(t),s], procname(k-1,d-s,u+s*k,v*k^s)),s=0..d))
        fi
    end proc:
    A034710:= proc(d)
      local res, r,  i, t;
      res:= NULL;
      for r in R(9,d,0,1) do
         res:= res, op(map(t -> add(10^(i-1)*t[i],i=1..nops(t)), combinat:-permute([seq(i$r[i],i=1..9)])));
      od:
      sort([res]);
    end proc:
    map(op, [seq(select(t -> numtheory:-bigomega(t)=2, A034710(i)),i=1..11)]); # Robert Israel, May 06 2016
  • Mathematica
    Select[Range[10000000], (Plus @@ IntegerDigits[#]) == (Times @@ IntegerDigits[#]) && PrimeOmega[#] == 2 &]

A107650 Numbers n such that both numbers n/(d_1*d_2* ...*d_k) and n/(d_1+d_2+ ... +d_k) are prime, where d_1 d_2 ... d_k is the decimal expansion of n.

Original entry on oeis.org

11133, 11331, 13131, 31113, 112116, 121116, 13111212, 111311115, 11114112112, 111212112112, 1111111711311, 1111171111113, 11111111112611112, 11111111121161112, 11111112111161112, 11111119111131111, 11111131111119111, 11111139111111111, 11111193111111111, 11111211161111112, 11111611111211112, 11116111112111112, 11116111211111112
Offset: 1

Views

Author

Farideh Firoozbakht, May 21 2005

Keywords

Comments

For n in this sequence, let prime p = n/(d_1*d_2* ...*d_k) so that n = d_1*d_2* ...*d_k * p. Then n/(d_1+d_2+ ... +d_k) equals either p or some prime dividing d_1*d_2* ...*d_k, that is 2, 3, 5, or 7. The latter case never takes place and thus n/(d_1*d_2* ...*d_k) = n/(d_1+d_2+ ... +d_k) is the same prime. So this sequence is a subsequence of both A034710 and A066307. - Max Alekseyev, Aug 19 2013

Examples

			111311115 is in the sequence because
111311115/(1*1*1*3*1*1*1*1*5) and 111311115/(1+1+1+3+1+1+1+1+5)
are prime(since 1*1*1*3*1*1*1*1*5=1+1+1+3+1+1+1+1+5, the primes are equal).
		

Programs

  • Mathematica
    Do[h = IntegerDigits[m]; l = Length[h]; If[Min[h] > 0 && PrimeQ[m/Sum[h[[k]], {k, l}]] && PrimeQ[m/Product[ h[[k]], {k, l}]], Print[m]], {m, 265000000}]

Extensions

a(9)-a(10) from Sean A. Irvine, Nov 28 2010
Terms a(11) onward from Max Alekseyev, Aug 20 2013
Showing 1-5 of 5 results.