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

A127482 Product of the nonzero digital products of all the prime numbers prime(1) to prime(n).

Original entry on oeis.org

2, 6, 30, 210, 210, 630, 4410, 39690, 238140, 4286520, 12859560, 270050760, 1080203040, 12962436480, 362948221440, 5444223321600, 244990049472000, 1469940296832000, 61737492466944000, 432162447268608000, 9075411392640768000, 571750917736368384000
Offset: 1

Views

Author

Alain Van Kerckhoven (alain(AT)avk.org), Sep 12 2007

Keywords

Examples

			a(7) = dp_10(2)*dp_10(3)*dp_10(5)*dp_10(7)*dp_10(11)*dp_10(13)*dp_10(17) = 2*3*5*7*(1*1)*(1*3)*(1*7) = 4410.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<1, 1, a(n-1)*mul(
         `if`(i=0, 1, i), i=convert(ithprime(n), base, 10)))
        end:
    seq(a(n), n=1..30);  # Alois P. Heinz, Mar 11 2022
  • Mathematica
    Rest[FoldList[Times,1,Times@@Cases[IntegerDigits[#],Except[0]]&/@ Prime[ Range[ 20]]]] (* Harvey P. Dale, Mar 19 2013 *)
  • PARI
    f(n) = vecprod(select(x->(x>1), digits(prime(n)))); \\ A101987
    a(n) = prod(k=1, n, f(k)); \\ Michel Marcus, Mar 11 2022
    
  • Python
    from math import prod
    from sympy import sieve
    def pod(s): return prod(int(d) for d in s if d != '0')
    def a(n): return pod("".join(str(sieve[i+1]) for i in range(n)))
    print([a(n) for n in range(1, 23)]) # Michael S. Branicky, Mar 11 2022

Formula

a(n) = Product_{k=1..n} dp_p(prime(k)) where prime(k)=A000040(k) and dp_p(m)=product of the nonzero digits of m in base p (p=10 for this sequence). - Hieronymus Fischer, Sep 29 2007
From Michel Marcus, Mar 11 2022: (Start)
a(n) = Product_{k=1..n} A051801(prime(k)).
a(n) = Product_{k=1..n} A101987(k). (End)

Extensions

Corrected and extended by Hieronymus Fischer, Sep 29 2007

A232541 Multiplicative Smith numbers: Composite numbers n such that the product of nonzero digits of n = product of nonzero digits of prime factors of n.

Original entry on oeis.org

4, 6, 8, 9, 95, 159, 195, 249, 326, 762, 973, 995, 998, 1057, 1086, 1111, 1189, 1236, 1255, 1337, 1338, 1383, 1389, 1395, 1419, 1509, 2139, 2248, 2623, 2679, 2737, 2928, 2949, 3029, 3065, 3202, 3344, 3345, 3419, 3432, 3437, 3464, 3706, 3945, 4344, 4502
Offset: 1

Views

Author

Derek Orr, Nov 25 2013

Keywords

Comments

They follow the same formula for Smith numbers, however, instead of addition, we have multiplication (only nonzero digits are included).
Trivially, prime numbers satisfy this property but are not included in the sequence.

Examples

			1236 is a member of this sequence because 1236 = 2*2*3*103 and 1*2*3*6 = 2*2*3*1*3 (zeros are not included).
998 is a member of this sequence because 998 = 2*499 and 9*9*8 = 2*4*9*9.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Times @@ DeleteCases[IntegerDigits[n], 0]; pFactors[n_] := Module[{f = FactorInteger[n]}, Flatten[ConstantArray @@@ f]]; Select[Range[2, 10000], ! PrimeQ[#] && f[#] == Times @@ f /@ pFactors[#] &] (* T. D. Noe, Nov 28 2013 *)
    msnQ[n_]:=Times@@(Flatten[IntegerDigits/@Table[#[[1]],#[[2]]]&/@ FactorInteger[ n]]/.(0->1))==Times@@(IntegerDigits[n]/.(0->1)); Select[ Range[ 5000],CompositeQ[#]&&msnQ[#]&] (* Harvey P. Dale, Jan 15 2022 *)
  • Python
    import sympy
    from sympy import isprime
    from sympy import factorint
    def DigitProd(x):
        prod = 1
        for i in str(x):
            if i != '0':
                prod *= int(i)
        return prod
    def f(x):
        lst = []
        for n in range(len(list(factorint(x)))):
            lst.append(str(list(factorint(x))[n])*list(factorint(x).values())[n])
        string = ''
        for i in lst:
            string += i
        prod = 1
        for a in string:
            if a != '0':
                prod *= int(a)
        if prod == DigitProd(x):
            return True
    x = 4
    while x < 10**3:
        if not isprime(x):
            if f(x):
                print(x)
        x += 1
    
  • Sage
    def prodPrimeDig(x):
        F=factor(x)
        T=[item for sublist in [[y[0]]*y[1] for y in F] for item in sublist]
        return prod([prod(filter(lambda a: a!=0,h.digits(base=10))) for h in T])
    n=3345 #Change n for more digits
    [k for k in [1..n] if prod(filter(lambda a: a!=0,k.digits(base=10)))==prodPrimeDig(k) and not(is_prime(k))] # Tom Edgar, Nov 26 2013

Extensions

Extended by T. D. Noe, Nov 28 2013

A335808 Nonzero multiplicative persistence in base 10: number of iterations of "multiply nonzero digits in base 10" needed to reach a number < 10.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 1, 1, 1, 2, 2, 2, 2, 3, 2, 3, 1, 1, 2, 2, 2, 3, 2, 3, 2, 3, 1, 1, 2, 2, 2, 2, 3, 2, 3, 3, 1, 1, 2, 2, 3, 3, 2, 4, 3, 3, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 1, 1, 2, 3, 3, 3, 3, 3, 3, 2
Offset: 0

Views

Author

Lucas Colucci, Jun 24 2020

Keywords

Comments

Coincides with A031346 up to n=204.
Differs from A087472 first at n=110. - R. J. Mathar, Aug 10 2020

References

  • R. K. Guy, Unsolved Problems in Number Theory, E16, pages 262-263.

Crossrefs

Programs

A338803 Product of the nonzero digits of (n written in base 5).

Original entry on oeis.org

1, 1, 2, 3, 4, 1, 1, 2, 3, 4, 2, 2, 4, 6, 8, 3, 3, 6, 9, 12, 4, 4, 8, 12, 16, 1, 1, 2, 3, 4, 1, 1, 2, 3, 4, 2, 2, 4, 6, 8, 3, 3, 6, 9, 12, 4, 4, 8, 12, 16, 2, 2, 4, 6, 8, 2, 2, 4, 6, 8, 4, 4, 8, 12, 16, 6, 6, 12, 18, 24, 8, 8, 16, 24, 32, 3, 3, 6, 9, 12, 3
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 12 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Times @@ DeleteCases[IntegerDigits[n, 5], 0], {n, 0, 80}]
    nmax = 80; A[] = 1; Do[A[x] = (1 + x + 2 x^2 + 3 x^3 + 4 x^4) A[x^5] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
  • PARI
    a(n) = vecprod(select(x->x, digits(n, 5))); \\ Michel Marcus, Nov 12 2020

Formula

G.f. A(x) satisfies: A(x) = (1 + x + 2*x^2 + 3*x^3 + 4*x^4) * A(x^5).

A338854 Product of the nonzero digits of (n written in base 4).

Original entry on oeis.org

1, 1, 2, 3, 1, 1, 2, 3, 2, 2, 4, 6, 3, 3, 6, 9, 1, 1, 2, 3, 1, 1, 2, 3, 2, 2, 4, 6, 3, 3, 6, 9, 2, 2, 4, 6, 2, 2, 4, 6, 4, 4, 8, 12, 6, 6, 12, 18, 3, 3, 6, 9, 3, 3, 6, 9, 6, 6, 12, 18, 9, 9, 18, 27, 1, 1, 2, 3, 1, 1, 2, 3, 2, 2, 4, 6, 3, 3, 6, 9, 1
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 12 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Times @@ DeleteCases[IntegerDigits[n, 4], 0], {n, 0, 80}]
    nmax = 80; A[] = 1; Do[A[x] = (1 + x + 2 x^2 + 3 x^3) A[x^4] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
  • PARI
    a(n) = vecprod(select(x->x, digits(n, 4))); \\ Michel Marcus, Nov 12 2020

Formula

G.f. A(x) satisfies: A(x) = (1 + x + 2*x^2 + 3*x^3) * A(x^4).
a(n) = 2^A160382(n) * 3^A160383(n).

A338863 Product of the nonzero digits of (n written in base 6).

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 1, 1, 2, 3, 4, 5, 2, 2, 4, 6, 8, 10, 3, 3, 6, 9, 12, 15, 4, 4, 8, 12, 16, 20, 5, 5, 10, 15, 20, 25, 1, 1, 2, 3, 4, 5, 1, 1, 2, 3, 4, 5, 2, 2, 4, 6, 8, 10, 3, 3, 6, 9, 12, 15, 4, 4, 8, 12, 16, 20, 5, 5, 10, 15, 20, 25, 2, 2, 4, 6, 8, 10, 2, 2, 4
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 12 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Times @@ DeleteCases[IntegerDigits[n, 6], 0], {n, 0, 80}]
    nmax = 80; A[] = 1; Do[A[x] = (1 + x + 2 x^2 + 3 x^3 + 4 x^4 + 5 x^5) A[x^6] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
  • PARI
    a(n) = vecprod(select(x->x, digits(n, 6))); \\ Michel Marcus, Nov 13 2020

Formula

G.f. A(x) satisfies: A(x) = (1 + x + 2*x^2 + 3*x^3 + 4*x^4 + 5*x^5) * A(x^6).

A338881 Product of the nonzero digits of (n written in base 8).

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 6, 7, 1, 1, 2, 3, 4, 5, 6, 7, 2, 2, 4, 6, 8, 10, 12, 14, 3, 3, 6, 9, 12, 15, 18, 21, 4, 4, 8, 12, 16, 20, 24, 28, 5, 5, 10, 15, 20, 25, 30, 35, 6, 6, 12, 18, 24, 30, 36, 42, 7, 7, 14, 21, 28, 35, 42, 49, 1, 1, 2, 3, 4, 5, 6, 7, 1, 1, 2, 3, 4, 5, 6, 7, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 13 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Times @@ DeleteCases[IntegerDigits[n, 8], 0], {n, 0, 80}]
    nmax = 80; A[] = 1; Do[A[x] = (1 + x + 2 x^2 + 3 x^3 + 4 x^4 + 5 x^5 + 6 x^6 + 7 x^7) A[x^8] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
  • PARI
    a(n) = vecprod(select(x->x, digits(n, 8))); \\ Michel Marcus, Nov 14 2020

Formula

G.f. A(x) satisfies: A(x) = (1 + x + 2*x^2 + 3*x^3 + 4*x^4 + 5*x^5 + 6*x^6 + 7*x^7) * A(x^8).

A342048 Numbers for which the sum of digits equals the product of nonzero digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 22, 30, 40, 50, 60, 70, 80, 90, 100, 123, 132, 200, 202, 213, 220, 231, 300, 312, 321, 400, 500, 600, 700, 800, 900, 1000, 1023, 1032, 1124, 1142, 1203, 1214, 1230, 1241, 1302, 1320, 1412, 1421, 2000, 2002, 2013, 2020, 2031, 2103, 2114, 2130, 2141, 2200
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 26 2021

Keywords

Examples

			2103 is in the sequence because 2 + 1 + 0 + 3 = 2 * 1 * 3 = 6.
		

Crossrefs

Programs

  • Maple
    q:= n-> (l-> is(add(i, i=l)=mul(i, i=l)))(
            subs(0=[][], convert(n, base, 10))):
    select(q, [$0..3300])[];  # Alois P. Heinz, Feb 26 2021
    # alternative
    G:= proc(d,dmax,s,p) option remember; local i;
       if s + dmax*d < p or s > dmax^d*p then return [] fi;
       if d = 0 then return [[]] fi;
       [seq(op(map(t -> [i,op(t)], procname(d-1,i,s+i,p*i))),i=1..dmax)]
    end proc:
    f:= proc(d) local R,k,i;
      R:= [seq(op(map(t -> [0$k,op(t)], G(d-k,9,0,1))),k=0..d-1)];
      R:= map(op@combinat:-permute,R);
      sort(map(t -> add(t[i]*10^(i-1),i=1..d),R))
    end proc:
    f(4); # Robert Israel, Feb 28 2021
  • Mathematica
    Select[Range[2200], Plus @@ IntegerDigits[#] == Times @@ DeleteCases[IntegerDigits[#], 0] &]
  • PARI
    isok(k) = my(d=select(x->(x>0), digits(k))); vecprod(d) == vecsum(d); \\ Michel Marcus, Feb 26 2021
  • Python
    from math import prod
    def ok(n):
      digs = list(map(int, str(n)))
      return sum(digs) == prod([d for d in digs if d != 0])
    def aupto(lim): return [m for m in range(1, lim+1) if ok(m)]
    print(aupto(2200)) # Michael S. Branicky, Feb 26 2021
    

A357526 Number of nonnegative integers less than n with the same product of the nonzero decimal digits as n.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 2, 0, 0, 0, 0, 0, 2, 3, 3, 2, 1, 0, 1, 0, 0, 0, 3, 4, 3, 2, 1, 0, 1, 0, 0, 0, 2, 3, 1, 1, 1, 0, 0, 0, 0, 0, 4, 5, 3, 2, 2, 1, 1, 0, 0, 0, 2, 3, 1, 1, 1, 1, 1, 0, 0, 0, 4, 5, 2, 3, 1, 1, 1, 1, 0, 0, 3
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 02 2022

Keywords

Examples

			a(1) = 1 because A051801(1) = 1 and also A051801(0) = 1.
a(21) = 3 because A051801(21) = 2 and also A051801(2) = A051801(12) = A051801(20) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[0, n - 1], Times @@ DeleteCases[IntegerDigits[#], 0] == Times @@ DeleteCases[IntegerDigits[n], 0] &]], {n, 0, 90}]

Formula

a(n) = |{j < n : A051801(j) = A051801(n)}|.

A360075 a(n) is the product of the digits of A007602(n), the n-th Zuckerman number.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 5, 8, 18, 1, 2, 5, 16, 6, 15, 16, 35, 4, 12, 16, 6, 15, 96, 24, 12, 48, 84, 105, 48, 1, 2, 3, 5, 6, 3, 42, 32, 63, 4, 108, 3, 18, 48, 24, 175, 35, 4, 32, 24, 108, 3, 18, 144, 21, 252, 18, 135, 8, 64, 96, 96, 288, 108, 14, 63
Offset: 1

Views

Author

Rémy Sigrist, Jan 24 2023

Keywords

Comments

Zuckerman numbers (A007602) correspond to numbers divisible by the product of their digits.

Examples

			For n = 1515:
- A007602(1515) = 11834112,
- so a(1515) = 1*1*8*3*4*1*1*2 = 192.
		

Crossrefs

Programs

  • PARI
    { for (n=1, 7119, p=vecprod(digits(n)); if (p && n%p==0, print1 (p", "))) }

Formula

a(n) = A007954(A007602(n)).
a(n) = A051801(A007602(n)).
a(n) * A288069(n) = A007602(n).
Previous Showing 31-40 of 47 results. Next