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-10 of 18 results. Next

A002473 7-smooth numbers: positive numbers whose prime divisors are all <= 7.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 35, 36, 40, 42, 45, 48, 49, 50, 54, 56, 60, 63, 64, 70, 72, 75, 80, 81, 84, 90, 96, 98, 100, 105, 108, 112, 120, 125, 126, 128, 135, 140, 144, 147, 150, 160, 162, 168, 175, 180, 189, 192
Offset: 1

Views

Author

Keywords

Comments

Also called humble numbers; sometimes also called highly composite numbers, but this usually refers to A002182.
Successive numbers k such that phi(210k) = 48k. - Artur Jasinski, Nov 05 2008
The divisors of 10! (A161466) are a finite subsequence. - Reinhard Zumkeller, Jun 10 2009
Numbers n such that A198487(n) > 0 and A107698(n) > 0. - Jaroslav Krizek, Nov 04 2011
A262401(a(n)) = a(n). - Reinhard Zumkeller, Sep 25 2015
Numbers which are products of single-digit numbers. - N. J. A. Sloane, Jul 02 2017
Phi(a(n)) is 7-smooth. In fact, the Euler Phi function applied to p-smooth numbers, for any prime p, is p-smooth. - Richard Locke Peterson, May 09 2020
Also those integers k, such that, for every prime p > 5, p^(12k) - 1 == 0 (mod 5040k). - Federico Provvedi, Jun 06 2022
The nonprimes with this property are all terms except for 2, 3, 5 and 7, i.e.: (1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 35, 36, 40, 42, 45, ...); the composite terms are all but the first one of this subsequence. ["Trivial" data provided mainly for search purpose.] - M. F. Hasler, Jun 06 2023

References

  • B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 52.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A080672, complement of A068191. Subsequences: A003591, A003594, A003595, A195238, A059405.
Not the same as A063938. For p-smooth numbers with other values of p, see A003586, A051037, A051038, A080197, A080681, A080682, A080683.
Cf. A002182, A067374, A210679, A238985 (zeroless terms), A006530.
Cf. A262401.

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, fromList, union)
    a002473 n = a002473_list !! (n-1)
    a002473_list = f $ singleton 1 where
       f s = x : f (s' `union` fromList (map (* x) [2,3,5,7]))
             where (x, s') = deleteFindMin s
    -- Reinhard Zumkeller, Mar 08 2014, Apr 02 2012, Apr 01 2012
    
  • Magma
    [n: n in [1..200] | PrimeDivisors(n) subset PrimesUpTo(7)]; // Bruno Berselli, Sep 24 2012
    
  • Mathematica
    Select[Range[250], Max[Transpose[FactorInteger[ # ]][[1]]]<=7&]
    aa = {}; Do[If[EulerPhi[210 n] == 48 n, AppendTo[aa, n]], {n, 1, 1200}]; aa (* Artur Jasinski, Nov 05 2008 *)
    mxExp = 8; Select[Union[Times @@@ Flatten[Table[Tuples[{2, 3, 5, 7}, n], {n, mxExp}], 1]], # <= 2^mxExp &] (* Harvey P. Dale, Aug 13 2012 *)
    mx = 200; Sort@ Flatten@ Table[ 2^i*3^j*5^k*7^l, {i, 0, Log[2, mx]}, {j, 0, Log[3, mx/2^i]}, {k, 0, Log[5, mx/(2^i*3^j)]}, {l, 0, Log[7, mx/(2^i*3^j*5^k)]}] (* Robert G. Wilson v, Aug 17 2012 *)
  • PARI
    test(n)=m=n; forprime(p=2,7, while(m%p==0,m=m/p)); return(m==1)
    for(n=1,200,if(test(n),print1(n",")))
    
  • PARI
    is_A002473(n)=n<11||vecmax(factor(n,8)[,1])<8 \\ M. F. Hasler, Jan 16 2015
    
  • PARI
    list(lim)=my(v=List(),t); for(a=0,logint(lim\1,7), for(b=0,logint(lim\7^a,5), for(c=0,logint(lim\7^a\5^b,3), t=3^c*5^b*7^a; while(t<=lim, listput(v,t); t<<=1)))); Set(v) \\ Charles R Greathouse IV, Feb 22 2017
    
  • Python
    import heapq
    from itertools import islice
    from sympy import primerange
    def A002473gen(p=7): # generate all p-smooth terms
        v, oldv, h, psmooth_primes, = 1, 0, [1], list(primerange(1, p+1))
        while True:
            v = heapq.heappop(h)
            if v != oldv:
                yield v
                oldv = v
                for p in psmooth_primes:
                    heapq.heappush(h, v*p)
    print(list(islice(A002473gen(), 65))) # Michael S. Branicky, Nov 19 2022
    
  • Python
    from sympy import integer_log
    def A002473(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c = n+x
            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
        return bisection(f,n,n) # Chai Wah Wu, Sep 16 2024

Formula

A006530(a(n)) <= 7. - Reinhard Zumkeller, Apr 01 2012
Sum_{n>=1} 1/a(n) = Product_{primes p <= 7} p/(p-1) = (2*3*5*7)/(1*2*4*6) = 35/8. - Amiram Eldar, Sep 22 2020

Extensions

More terms from James Sellers, Dec 23 1999
Additional comments from Michel Lecomte, Jun 09 2007
Edited by M. F. Hasler, Jan 16 2015

A107698 Smallest prime whose digital product = n or 0 if impossible.

Original entry on oeis.org

11, 2, 3, 41, 5, 23, 7, 181, 19, 251, 0, 43, 0, 127, 53, 281, 0, 29, 0, 541, 37, 0, 0, 83, 11551, 0, 139, 47, 0, 523, 0, 1481, 0, 0, 157, 149, 0, 0, 0, 12451, 0, 67, 0, 0, 59, 0, 0, 283, 11177, 2551, 0, 0, 0, 239, 0, 1187, 0, 0, 0, 1453, 0, 0, 79, 881, 0, 0, 0, 0, 0, 257, 0
Offset: 1

Views

Author

Zak Seidov and Robert G. Wilson v, May 20 2005

Keywords

Comments

Zeros appear at A068191.

Examples

			a(20)=541 because 5*4*1=20 and there is no prime less than a(20) which exhibits this characteristic.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := If[ Max[ First /@ FactorInteger[n]] > 7, 0, p = 1; While[Times @@ IntegerDigits[ Prime[p]] != n, p++ ]; Prime[p]]; Table[ f[n], {n, 30}]

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]].

A086299 a(n) = if n is 7-smooth then 1 else 0: characteristic function of 7-smooth numbers.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 15 2003

Keywords

Crossrefs

Programs

  • Haskell
    a086299 = fromEnum . (<= 7) . a006530  -- Reinhard Zumkeller, Apr 01 2012
  • Mathematica
    Table[If[Max[Transpose[FactorInteger[n]][[1]]]<11,1,0],{n,110}] (* Harvey P. Dale, Oct 08 2013 *)
    smooth7Q[n_] := n == Times@@({2, 3, 5, 7}^IntegerExponent[n, {2, 3, 5, 7}]);
    a[n_] := Boole[smooth7Q[n]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 17 2021 *)

Formula

Multiplicative with: a(p) = if p<=7 then 1 else 0, p prime.
a(A002473(n)) = 1; a(A068191(n)) = 0. - Reinhard Zumkeller, Apr 01 2012
Dirichlet g.f.: 1/((1-2^(-s))*(1-3^(-s))*(1-5^(-s))*(1-7^(-s))). - Amiram Eldar, Dec 27 2022

A198487 Smallest nonprime positive numbers whose digital product = n, or 0 if impossible.

Original entry on oeis.org

10, 1, 12, 1113, 4, 15, 6, 117, 8, 9, 25, 0, 26, 0, 27, 35, 28, 0, 36, 0, 45, 371, 0, 0, 38, 55, 0, 39, 74, 0, 56, 0, 48, 0, 0, 57, 49, 0, 0, 0, 58, 0, 76, 0, 0, 95, 0, 0, 68, 77, 255, 0, 0, 0, 69, 0, 78, 0, 0, 0, 256, 0, 0, 791, 88, 0, 0, 0, 0, 0, 275, 0, 98, 0, 0, 355
Offset: 0

Views

Author

Jaroslav Krizek, Oct 25 2011

Keywords

Comments

Zeros appear for n which are a member of A068191.
If the requirement "positive" is dropped, a(0) becomes 0 instead.

Examples

			a(21)=371 because 371 is  the smallest nonprime positive number whose digital product is 21 (3*7*1 = 21).
		

Crossrefs

Cf. A107698 (smallest primes with digital product n)

A262401 In prime factorization of n: replace each factor with its largest decimal digit.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 12, 3, 14, 15, 16, 7, 18, 9, 20, 21, 2, 3, 24, 25, 6, 27, 28, 9, 30, 3, 32, 3, 14, 35, 36, 7, 18, 9, 40, 4, 42, 4, 4, 45, 6, 7, 48, 49, 50, 21, 12, 5, 54, 5, 56, 27, 18, 9, 60, 6, 6, 63, 64, 15, 6, 7, 28, 9, 70, 7, 72, 7, 14
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 25 2015

Keywords

Crossrefs

Programs

  • Haskell
    a262401 = product . map a054055 . a027746_row'
    
  • Mathematica
    Array[Times @@ (Power[Max@ IntegerDigits[#1], #2] & @@@ FactorInteger[#]) &, 74] (* Michael De Vlieger, Jan 23 2022 *)
  • PARI
    a(n) = my(f=factor(n)); for (k=1, #f~, f[k,1] = vecmax(digits(f[k,1]))); factorback(f); \\ Michel Marcus, Jan 22 2022

Formula

Multiplicative with p -> A054055(p), p prime.
a(n) = Product_{k=1..A001222(n)} A054055(A027746(n,k)).
a(n) <= n.
a(m) = m iff m is 7-smooth:
a(A002473(n)) = A002473(n) and a(A068191(n)) < A068191(n).
A006530(a(n)) <= 7.
a(a(n)) = a(n).

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
Showing 1-10 of 18 results. Next