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.

Previous Showing 31-40 of 43 results. Next

A113761 Numbers k such that the number of divisors of k equals both the sum and the product of digits of k in base 10.

Original entry on oeis.org

1, 2, 22, 2114, 11222, 21122, 22211, 112116, 121116, 1111143, 1413111, 3411111, 11111128, 11111821, 11112118, 11121231, 11811112, 13111212, 18111112, 21111118, 21111181, 21121113, 23111121, 111112119, 111119211, 192111111
Offset: 1

Views

Author

Giovanni Resta, Jan 18 2006

Keywords

Comments

Intersection of A074312 and A057531.

Examples

			2114 is a term since 2+1+1+4 = 2*1*1*4 = 8 and 2114 has 8 divisors, {1, 2, 7, 14, 151, 302, 1057, 2114}.
		

Crossrefs

Programs

  • Mathematica
    L={};Do[d=IntegerDigits@n; p=Times@@d; If[p==Plus@@d && p==DivisorSigma[0, n], AppendTo[L, n];Print[n]], {n, 1000000}];L
    lst = {}; fQ[n_] := (id = IntegerDigits@n; Plus @@ id == Times @@ id == DivisorSigma[0, n]); Do[ If[ fQ@n, AppendTo[lst, n]], {n, 2*10^8}]; lst

Extensions

a(13)-a(26) from Robert G. Wilson v, Jan 19 2006

A162840 Numbers k such that the cube of the sum of digits of k equals the product of digits of k.

Original entry on oeis.org

0, 1, 666666, 1377789, 1377798, 1377879, 1377897, 1377978, 1377987, 1378779, 1378797, 1378977, 1379778, 1379787, 1379877, 1387779, 1387797, 1387977, 1389777, 1397778, 1397787, 1397877, 1398777, 1555888, 1558588, 1558858
Offset: 0

Views

Author

Boris Hostnik (megpplus(AT)siol.net), Jul 14 2009

Keywords

Examples

			666666 is in the sequence because (1) cubed sum of its digits is (6+6+6+6+6+6)^3 = 46656, (2) the product of its digits is 6*6*6*6*6*6=46656; 46656=46656.
		

Crossrefs

Cf. A007954, A118880, A117720, A034710. - R. J. Mathar, Jul 19 2009

Programs

  • Maple
    A007953 := proc(n) add(d,d=convert(n,base,10)) ; end: A007954 := proc(n) mul(d,d=convert(n,base,10)) ; end: A118880 := proc(n) (A007953(n))^3; end: for n from 1 to 2000000 do if A118880(n) = A007954(n) then printf("%d,\n",n) ; fi; od: # R. J. Mathar, Jul 19 2009
  • Mathematica
    Select[Range[0,156*10^4],Total[IntegerDigits[#]]^3==Times@@IntegerDigits[#]&] (* Harvey P. Dale, Jul 07 2022 *)

Formula

{n: A118880(n)=A007954(n)}. - R. J. Mathar, Jul 19 2009

A232709 Nonnegative integers such that the sum of digits mod 10 equals the product of digits mod 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 48, 84, 109, 123, 132, 137, 145, 154, 159, 173, 178, 187, 190, 195, 208, 213, 228, 231, 233, 235, 237, 239, 248, 253, 268, 273, 280, 282, 284, 286, 288, 293, 307, 312, 317, 321, 323, 325, 327, 329, 332, 337, 347, 352, 357, 367, 370, 371, 372, 373, 374, 375, 376, 377
Offset: 1

Views

Author

Jon Perry, Nov 28 2013

Keywords

Examples

			293 is in the sequence because 2+9+3 = 14 == 4 mod 10 and 2*9*3 = 54 == 4 mod 10.
		

Crossrefs

Cf. A034710.

Programs

  • JavaScript
    for (i=0;i<1000;i++) {
    s=i.toString().split("");
    sl=s.length;
    c=0;d=1;
    for (j=0;j
    				
  • Mathematica
    Select[Range[0,400],Mod[Total[IntegerDigits[#]],10]==Mod[Times@@ IntegerDigits[ #],10]&] (* Harvey P. Dale, Oct 15 2021 *)
  • PARI
    is(n) = my(d=digits(n));vecsum(d)%10==vecprod(d)%10 \\ David A. Corneth, Oct 15 2021
    
  • Python
    from math import prod
    def ok(n): d = list(map(int, str(n))); return sum(d)%10 == prod(d)%10
    print([k for k in range(378) if ok(k)]) # Michael S. Branicky, Oct 15 2021

Extensions

Offset changed from 0 to 1 by N. J. A. Sloane, Oct 15 2021

A261778 Positive numbers n such that (digitsum(n))^2 equals (product of digits(n))^3.

Original entry on oeis.org

1, 11114, 11141, 11411, 14111, 41111, 111122, 111212, 111221, 112112, 112121, 112211, 121112, 121121, 121211, 122111, 211112, 211121, 211211, 212111, 221111, 1111111111111111119, 1111111111111111191, 1111111111111111911, 1111111111111119111, 1111111111111191111, 1111111111111911111
Offset: 1

Views

Author

K. D. Bajpai, Aug 31 2015

Keywords

Comments

Sequence is infinite because it contains all the numbers made of k fours and 8^k-4k ones. - Giovanni Resta, Sep 01 2015

Examples

			11114 appears in the sequence because (1 + 1 + 1 + 1 + 4)^2 = (1*1*1*1*4)^3 = 64.
111122 appears in the sequence because (1 + 1 + 1 + 1 + 2 + 2)^2  = (1*1*1*1*2*2)^3 = 64.
		

Crossrefs

Programs

  • Magma
    [n : n in [1..1000000] | (&+Intseq(n))^2 eq (&*Intseq(n))^3 ];
  • Mathematica
    Select[Range[20000000], Plus @@ IntegerDigits[#]^2 == Times @@ IntegerDigits[#]^3 &]
  • PARI
    for(n = 1,1000000, d = digits(n); if((sumdigits(n))^2 == prod(i = 1, #d, d[i])^3, print1(n, ", ")));
    
  • PARI
    proddigits(n)=my(d=digits(n)); prod(i=1,#d,d[i])
    is(n)=my(s=sumdigits(n)); if(!ispower(s,3), return(0)); s^2==proddigits(n)^3 \\ Charles R Greathouse IV, Aug 31 2015
    

Extensions

a(22)-a(27) from Charles R Greathouse IV, Aug 31 2015

A272814 Palindromes such that sum of digits equals product of digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 12221, 13131, 21212, 31113, 1111441111, 1114114111, 1141111411, 1411111141, 4111111114, 11112421111, 11121412111, 11211411211, 12111411121, 21111411112, 111122221111, 111212212111, 111221122111, 112112211211, 112121121211
Offset: 1

Views

Author

Altug Alkan, May 06 2016

Keywords

Comments

Inspired by A272436.
Intersection of A002113 and A034710.
This sequence is obviously infinite.

Crossrefs

Programs

  • Mathematica
    m[w_] := Flatten@Table[i, {i, 9}, {w[[i]]}]; palQ[n_] := n == FromDigits@ Reverse@ IntegerDigits@n; all[upd_] := Union@ Flatten@ Table[ FromDigits /@ Flatten[ Permutations /@ m /@ Select[ Flatten[Permutations /@ (IntegerPartitions[d + 9, {9}, Range[d+1]] -1), 1], Times @@ (Range[9]^#) == Total[# Range[9]] &], 1], {d, upd}]; Select[all@13, palQ] (* Giovanni Resta, May 06 2016 *)
  • PARI
    isok(n) = { my(d = digits(n)); (vecsum(d) == prod(k=1, #d, d[k])) && (subst(Polrev(d), x, 10) == n);} \\ Michel Marcus, May 07 2016

Extensions

a(15)-a(29) from Giovanni Resta, May 06 2016

A280355 Numbers that are divisible by the sum of their digits and 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, 132, 312, 4112, 11133, 11313, 11331, 13113, 13131, 13311, 22112, 31113, 31131, 31311, 33111, 111216, 111612, 112116, 116112, 121116, 161112, 211116, 611112, 1111712, 11111232, 11112132, 11112312, 11113212, 11118112, 11121132, 11121312, 11123112, 11131212, 11132112
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 01 2017

Keywords

Examples

			132 is in the sequence because 1 + 3 + 2 = 1*3*2 = 6 and 6 divides 132.
		

Crossrefs

Intersection of A005349 and A034710.
Cf. A038186.

Programs

  • Mathematica
    Select[Range[11300000], Divisible[#1, (Plus @@ IntegerDigits[#1])] && (Plus @@ IntegerDigits[#1]) == (Times @@ IntegerDigits[#1]) &]
    nQ[n_]:=With[{idn=IntegerDigits[n]},Mod[n,Total[idn]]==0&&Total[idn]==Times@@idn]; Select[Range[112*10^5],nQ] (* Harvey P. Dale, Nov 02 2024 *)
  • PARI
    isok(n) = (d=digits(n)) && ((n % vecsum(d)) == 0) && (vecsum(d) == prod(k=1, #d, d[k])); \\ Michel Marcus, Jan 02 2017

A281745 Numbers k with the property that the square root of the product of the digits of k is equal to the sum of the square roots of its digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 44, 149, 194, 228, 282, 333, 419, 491, 822, 914, 941, 11199, 11444, 11919, 11991, 14144, 14414, 14441, 19119, 19191, 19911, 41144, 41414, 41441, 44114, 44141, 44411, 91119, 91191, 91911, 99111, 11111449, 11111494, 11111944, 11114149
Offset: 1

Views

Author

Keywords

Examples

			    1 is a term because     sqrt(1) = sqrt(1);
   44 is a term because   sqrt(4*4) = sqrt(4) + sqrt(4);
  941 is a term because sqrt(9*4*1) = sqrt(9) + sqrt(4) + sqrt(1).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^6], Sqrt[Times @@ #] == Total[Sqrt@ #] &@ IntegerDigits@ # &] (* Michael De Vlieger, Feb 02 2017 *)
  • PARI
    isok(n) = my(d = vecsort(digits(n))); sqrt(prod(k=1, #d, d[k])) == sum(k=1, #d, sqrt(d[k])); \\ Michel Marcus, Jan 29 2017

Extensions

More terms from Jon E. Schoenfield, Jan 30 2017

A297815 Number of positive integers with n digits whose digit sum is equal to its digit product.

Original entry on oeis.org

9, 1, 6, 12, 40, 30, 84, 224, 144, 45, 605, 495, 1170, 1092, 210, 240, 2448, 4896, 15846, 3420, 1750, 462, 15939, 0, 8100, 67925, 80730, 19656, 11774, 164430, 930, 29760, 197472, 0, 0, 1260, 23976, 50616, 54834, 395200, 1248860, 4253340, 75852, 0, 42570
Offset: 1

Views

Author

Reiner Moewald, Jan 06 2018

Keywords

Examples

			The only term with two digits is 22: 2 * 2 = 2 + 2.
		

Crossrefs

Programs

  • Mathematica
    cperm[w_] := Length[w]!/Times @@ ((Last /@ Tally[w])!); ric[s_, p_, w_, tg_] := Block[{d}, If[tg == 0, If[s == p, tot += cperm@ w], Do[ If[p*d > s + d + (tg-1)*9, Break[]]; ric[s+d, p*d, Append[w,d], tg-1], {d, Last@ w, 9}]]]; a[n_] := (tot=0; ric[#, #, {#}, n-1] & /@ Range[9]; tot); Array[a, 45] (* Giovanni Resta, Feb 05 2018 *)
  • Python
    import math
    def digitProd(natNumber):
        digitProd = 1
        for letter in str(natNumber):
            digitProd *= int(letter)
        return digitProd
    def digitSum(natNumber):
        digitSum = 0
        for letter in str(natNumber):
            digitSum += int(letter)
        return digitSum
    for n in range(24):
        count = 0
        for a in range(int(math.pow(10,n)), int(math.pow(10, n+1))):
            if digitProd(a) == digitSum(a):
                count += 1
        print(n+1, count)
    
  • Python
    from sympy.utilities.iterables import combinations_with_replacement
    from sympy import prod, factorial
    def A297815(n):
        f = factorial(n)
        return sum(f//prod(factorial(d.count(a)) for a in set(d)) for d in combinations_with_replacement(range(1,10),n) if prod(d) == sum(d)) # Chai Wah Wu, Feb 06 2018

Extensions

a(10) and a(23) corrected by and a(25)-a(45) from Giovanni Resta, Feb 05 2018

A337296 Number whose sum and product of ternary representation digits are equal.

Original entry on oeis.org

0, 1, 2, 8, 134, 152, 158, 160, 206, 212, 214, 230, 232, 238, 265760, 265814, 265832, 265838, 265840, 265976, 265994, 266000, 266002, 266048, 266054, 266056, 266072, 266074, 266080, 266462, 266480, 266486, 266488, 266534, 266540, 266542, 266558, 266560, 266566
Offset: 1

Views

Author

Amiram Eldar, Aug 21 2020

Keywords

Comments

In ternary representation all the terms except 0 are zeroless (A032924).
If k is the number of digits 2 of a term, then the number of digits 1 is 2^k - 2*k, and the total number of digits is thus 2^k - k (A000325).
The total number of terms with k digits 2, for k = 1, 2, ..., is binomial(2^k-k,k) = 1, 1, 10, 495, 80730, 40475358, ...

Examples

			8 is a term since in base 3 the representation of 8 is 22 and 2 + 2 = 2 * 2.
		

Crossrefs

The ternary version of A034710.

Programs

  • Mathematica
    Select[Range[0, 266566], Times @@ (d = IntegerDigits[#, 3]) == Plus @@ d &]
    (* or *)
    f[k_] := FromDigits[#, 3] & /@ Permutations[Join[Table[1, {2^k - 2*k}], Table[2, k]]]; Flatten@ Join[{0}, Table[f[k], {k, 0, 4}]] (* Amiram Eldar, Oct 16 2023 *)
  • PARI
    isok(m) = my(d=digits(m,3)); vecsum(d) == vecprod(d); \\ Michel Marcus, Aug 22 2020

A338214 Positive numbers for which the sum of some digits equals the product of the remaining ones.

Original entry on oeis.org

11, 22, 33, 44, 55, 66, 77, 88, 99, 100, 101, 110, 111, 112, 121, 122, 123, 132, 133, 134, 143, 144, 145, 154, 155, 156, 165, 166, 167, 176, 177, 178, 187, 188, 189, 198, 199, 200, 202, 211, 212, 213, 220, 221, 224, 231, 235, 236, 242, 246, 248, 253, 257, 263, 264, 268, 275, 279, 284, 286, 297, 300, 303, 312
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Oct 16 2020

Keywords

Comments

123456789059 is in the sequence because (1+2+3+4+5+6+7+8+9+0) = (5*9) = 45.

Crossrefs

Cf. A034710.
Previous Showing 31-40 of 43 results. Next