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-8 of 8 results.

A068191 Numbers n such that A067734(n)=0; complement of A002473; at least one prime-factor of n is larger than 7, it has 2 decimal digits.

Original entry on oeis.org

11, 13, 17, 19, 22, 23, 26, 29, 31, 33, 34, 37, 38, 39, 41, 43, 44, 46, 47, 51, 52, 53, 55, 57, 58, 59, 61, 62, 65, 66, 67, 68, 69, 71, 73, 74, 76, 77, 78, 79, 82, 83, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 97, 99, 101, 102, 103, 104, 106, 107, 109, 110, 111, 113, 114
Offset: 1

Views

Author

Labos Elemer, Feb 19 2002

Keywords

Comments

Also numbers n such that A198487(n) = 0 and A107698(n) = 0. - Jaroslav Krizek, Nov 04 2011
A086299(a(n)) = 0. - Reinhard Zumkeller, Apr 01 2012
A262401(a(n)) < a(n). - Reinhard Zumkeller, Sep 25 2015
Numbers not in A007954. - Mohammed Yaseen, Sep 13 2022

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a068191 n = a068191_list !! (n-1)
    a068191_list = map (+ 1) $ elemIndices 0 a086299_list
    -- Reinhard Zumkeller, Apr 01 2012
    
  • Mathematica
    Select[Range@120, Last@Map[First, FactorInteger@#] > 7 &] (* Vincenzo Librandi, Sep 19 2016 *)
  • Python
    from sympy import integer_log
    def A068191(n):
        def f(x):
            c = n
            for i in range(integer_log(x,7)[0]+1):
                i7 = 7**i
                m = x//i7
                for j in range(integer_log(m,5)[0]+1):
                    j5 = 5**j
                    r = m//j5
                    for k in range(integer_log(r,3)[0]+1):
                        c += (r//3**k).bit_length()
            return c
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Sep 16 2024

A068189 Smallest positive number whose product of digits equals n, or a(n)=0 if no such number exists, i.e. when n has a prime divisor greater than 7.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 25, 0, 26, 0, 27, 35, 28, 0, 29, 0, 45, 37, 0, 0, 38, 55, 0, 39, 47, 0, 56, 0, 48, 0, 0, 57, 49, 0, 0, 0, 58, 0, 67, 0, 0, 59, 0, 0, 68, 77, 255, 0, 0, 0, 69, 0, 78, 0, 0, 0, 256, 0, 0, 79, 88, 0, 0, 0, 0, 0, 257, 0, 89, 0, 0, 355, 0, 0, 0, 0, 258, 99, 0, 0, 267, 0
Offset: 1

Views

Author

Labos Elemer, Feb 19 2002

Keywords

Comments

a(n) > 0 if and only if n is in A002473.

Examples

			n=2,10,50,250 gives a(n)=2,25,255,2555; n=11,39,78, etc..a(n)=0.
10000 = 2 * 5 * 5 * 5 * 5 * 8. No product of two of these factors is less than 10 so a(10000) = 255558 (the concatenation of these factors in nondecreasing order). - _David A. Corneth_, Jul 31 2017
		

Crossrefs

Programs

  • Mathematica
    f[x_] := Apply[Times, IntegerDigits[x]] a = Table[0, {256} ]; Do[ b = f[n]; If[b < 257 && a[[b]] == 0, a[[b]] =n], {n, 1, 10000} ]; a
  • PARI
    a(n) = {if(n==1, return(1)); my(res = []); forstep(i=9,2,-1, v = valuation(n, i); if(v > 0, res = concat(vector(v, j, i), res); n/=i^v)); if(n==1,fromdigits(res), 0)} \\ David A. Corneth, Jul 31 2017
    
  • Python
    def convert(n):
        if n == 1:
            return 1
        result = 0
        cur = 1
        while n > 1:
            found = False
            for i in range(9, 1, -1):
                if n % i == 0:
                    result += cur * i
                    cur *= 10
                    n //= i
                    found = True
                    break
            if not found:
                return 0
        return result
    N = 256
    for n in range(1, N):
        print(n, convert(n))
    # Dmitry Kamenetsky, Oct 20 2008

A067734 Number of ways writing n as a product of decimal digits of some other number which has no digits equal to 1.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 4, 2, 2, 0, 7, 0, 2, 2, 7, 0, 7, 0, 5, 2, 0, 0, 17, 1, 0, 3, 5, 0, 8, 0, 13, 0, 0, 2, 21, 0, 0, 0, 12, 0, 8, 0, 0, 5, 0, 0, 38, 1, 3, 0, 0, 0, 15, 0, 12, 0, 0, 0, 24, 0, 0, 5, 24, 0, 0, 0, 0, 0, 6, 0, 58, 0, 0, 3, 0, 0, 0, 0, 26, 5, 0, 0, 24, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 82, 0
Offset: 1

Views

Author

Labos Elemer, Jan 28 2002

Keywords

Comments

For n=36, this was given as an exercise for children of age 14 years.

Examples

			There are 21 other numbers with no digit 1 whose digit product equals 36: 49, 66, 94, 229, 236, 263, 292, 326, 334, 343, 362, 433, 623, 632, 922, 2233, 2323, 2332, 3223, 3232, 3322. If 1-digits were permitted then an infinite number of solutions would exist, e.g., 111114111113111113. If n has a prime divisor larger than 7, i.e., a prime divisor that is two or more digits in length, such as 11, then no solutions exist at all. The largest solution is a (decimal) number created by concatenating not-necessarily-distinct prime factors, such as 36 = 3*2*2*2. [edited by _Jon E. Schoenfield_, Jun 14 2017]
		

Crossrefs

Programs

  • Mathematica
    id1[x_] := IntegerDigits[x]; id2[x_] := DeleteCases[id1[x], 1] f[x_] := Apply[Times, IntegerDigits[x]]; k=0; Do[s=f[n]; If[Equal[s, 36]&&!Greater[Length[id1[n]], Length[id2[n]]], k=k+1; Print[{k, n}]], {n, 1, 3400}]
  • PARI
    { A067734(n) = local(v,r,i2,i3); v=vector(4,i,valuation(n,prime(i))); if(n==1||n!=prod(i=1,4,prime(i)^v[i]), return(0)); r=0; for(i6=0,min(v[1],v[2]), for(i8=0,(v[1]-i6)\3, for(i4=0,(v[1]-i6-3*i8)\2, i2=v[1]-i6-3*i8-2*i4; for(i9=0,(v[2]-i6)\2, i3=v[2]-i6-2*i9; r += (i2+i3+i4+v[3]+i6+v[4]+i8+i9)! / i2! / i3! / i4! / v[3]! / i6! / v[4]! / i8! / i9! )))); r } \\ Max Alekseyev, Sep 19 2009

Formula

a(A002473(n)) > 0 for n > 1. - David A. Corneth, Jun 14 2017

A068183 Largest number without decimal digits equal to 1 whose product of digits gives n!.

Original entry on oeis.org

2, 32, 3222, 53222, 5332222, 75332222, 75332222222, 7533332222222, 755333322222222
Offset: 2

Views

Author

Labos Elemer, Feb 18 2002

Keywords

Comments

Maximal solutions are obtained from the concatenation of distinct prime factors that have one decimal digit. The sequence is finite because, for n>10, n! has 2-digit prime factors.

Crossrefs

Formula

a(n)=Max{x; f[x]=n!}, where x has no digit=1 and f[x_] := Apply[Times, IntegerDigits[x]].

A068184 Smallest number whose product of digits equals n!.

Original entry on oeis.org

1, 1, 2, 6, 38, 358, 2589, 25789, 257889, 2578879, 45578899
Offset: 0

Views

Author

Labos Elemer, Feb 18 2002

Keywords

Comments

The sequence is finite because n! for n>10 has 2-digit prime factors.

Examples

			For n=4 the solutions having digit products equal 24 excluding those with digit 1 are: {38, 46, 64, 83, 226, 234, 243, 262, 324, 342, 423, 432, 622, 2223, 2232, 2322, 3222} of which the smallest is 38. For n>1, numbers with a digit 1 are too big.
		

Crossrefs

Extensions

Edited by Henry Bottomley, Feb 26 2002

A068185 Number of ways writing n^n as a product of decimal digits of some other number which has no digits equal to 1.

Original entry on oeis.org

0, 2, 3, 81, 1, 102136, 1, 1389537, 4181, 4972825, 0, 12718670252691776, 0, 4506838380, 11472991008, 53560898629395777, 0, 514875062240230100091396, 0, 164997736300578242823300, 241098942106440, 0, 0, 3203410440031870942324022423896806853153460, 1, 0, 61305790721611591
Offset: 1

Views

Author

Labos Elemer, Feb 19 2002

Keywords

Comments

a(n)= 0 when n has prime-factor larger than 7 [so A067734(n)=0] or when n is in A068191, i.e. not in A002473.

Examples

			n=1 has no solution; a(2)=A000073(6)=2 with {4,22} solutions; a(3)=A067734(27)=3=Fibonacci[4]; n=5 and n=7, n^n has single prime factor of which any true multiple have 2 digits so 55555 and 7777777 are the only solutions, so a(5)=a(7)=1; a(4)=A067734(256)=81=A000073(10); a(8)=A067734(2^24)=A000073(26)=1389537; n=9 a(9)=A067734(3^27)=4181.
		

Crossrefs

Formula

a(n) = A067734(n^n) = A067734(A000312(n))

Extensions

Edited By Henry Bottomley, Feb 26 2002.
Edited and extended by Max Alekseyev, Sep 19 2009
a(9) corrected by Sean A. Irvine, Feb 01 2024

A068186 a(n) is the largest number whose product of decimal digits equals n^n.

Original entry on oeis.org

22, 333, 22222222, 55555, 333333222222, 7777777, 222222222222222222222222, 333333333333333333, 55555555552222222222, 0, 333333333333222222222222222222222222, 0, 7777777777777722222222222222
Offset: 2

Views

Author

Labos Elemer, Feb 19 2002

Keywords

Comments

No digit=1 is permitted to avoid infinite number of solutions; a(n)=0 if A067734(n^n)=0.

Examples

			n=10, 10^10=10000000000, a(5)=55555555552222222222.
		

Crossrefs

Programs

  • Python
    from sympy import factorint
    def A068186(n):
        if n == 1:
            return 1
        pf = factorint(n)
        ps = sorted(pf.keys(),reverse=True)
        if ps[0] > 7:
            return 0
        s = ''
        for p in ps:
            s += str(p)*(n*pf[p])
        return int(s) # Chai Wah Wu, Aug 12 2017

Formula

a(n) is obtained as prime factors of n^n concatenated in order of magnitude and with repetitions; a(n)=0 if n has p > 7 prime factors.

Extensions

a(12) corrected by Chai Wah Wu, Aug 12 2017

A068190 Largest number whose digit product equals n; a(n)=0 if no such number exists, e.g., when n has a prime factor larger than 7; no digit=1 is permitted to avoid an infinite number of solutions.

Original entry on oeis.org

0, 2, 3, 22, 5, 32, 7, 222, 33, 52, 0, 322, 0, 72, 53, 2222, 0, 332, 0, 522, 73, 0, 0, 3222, 55, 0, 333, 722, 0, 532, 0, 22222, 0, 0, 75, 3322, 0, 0, 0, 5222, 0, 732, 0, 0, 533, 0, 0, 32222, 77, 552, 0, 0, 0, 3332, 0, 7222, 0, 0, 0, 5322, 0, 0, 733, 222222, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Labos Elemer, Feb 19 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Array[If[#[[-1, 1]] > 7, 0, FromDigits@ Reverse@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, #]] &@ FactorInteger@ # &, 69] /. 1 -> 0 (* Michael De Vlieger, Dec 08 2018 *)
  • PARI
    a(n) = {my(res = []); for(i=2, 9, v = valuation(n, i); if(v > 0, res = concat(vector(v, j, i), res); n/=i^v)); if(n==1,fromdigits(res), 0)} \\ David A. Corneth, Jul 31 2017

Formula

If a solution exists, a(n) is the concatenation of prime factors with repetitions and in order of magnitude, otherwise a(n)=0.

Extensions

a(36) corrected by David A. Corneth, Jul 31 2017
Showing 1-8 of 8 results.