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 15 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

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

A107689 Primes with digital product = 3.

Original entry on oeis.org

3, 13, 31, 113, 131, 311, 11113, 11131, 11311, 113111, 131111, 311111, 11111131, 11111311, 11113111, 11131111, 111111113, 111111131, 111113111, 131111111, 11111111113, 11111111131, 11113111111, 11131111111, 31111111111
Offset: 1

Views

Author

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

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[ Table[ Select[ Sort[ FromDigits /@ Permutations[ Flatten[{3, Table[1, {n}]}]]], PrimeQ[ # ] &], {n, 0, 12}]]
  • Python
    from sympy import isprime
    def agen():
      digits = 0
      while True:
        for i in range(digits+1):
          t = int("1"*(digits-i) + "3" + "1"*i)
          if isprime(t): yield t
        digits += 1
    g = agen()
    print([next(g) for i in range(25)]) # Michael S. Branicky, Mar 13 2021

A107612 Primes with digital product = 2.

Original entry on oeis.org

2, 211, 2111, 111121, 111211, 112111, 1111211, 1111111121, 1111211111, 1121111111, 111111211111, 111211111111, 2111111111111, 111111111111112111, 111111112111111111, 111111211111111111, 112111111111111111
Offset: 1

Views

Author

Zak Seidov, May 17 2005

Keywords

Comments

Corresponding indices of primes in A107611. Cf. A053666, A101987.

Crossrefs

Programs

  • Maple
    for i from 0 to 30 do it:=sum(10^j, j=0..i): for k from 0 to i do if isprime(it+10^k) then printf(`%d,`, it+10^k) fi: od:od: (Sellers)
  • Mathematica
    Flatten[ Table[ Select[ Sort[ FromDigits /@ Permutations[ Flatten[{2, Table[1, {n}]}]]], PrimeQ[ # ] &], {n, 0, 19}]] (* Robert G. Wilson v, May 19 2005 *)
    Select[Flatten[Table[FromDigits/@Permutations[PadRight[{2},n,1]],{n,20}]],PrimeQ]//Sort (* Harvey P. Dale, May 28 2017 *)

Formula

A107612(n) = prime(A107611(n)).

Extensions

More terms from Robert G. Wilson v and James Sellers, May 19 2005

A107693 Primes with digital product = 7.

Original entry on oeis.org

7, 17, 71, 1117, 1171, 11117, 11171, 1111711, 1117111, 1171111, 11111117, 11111171, 71111111, 1117111111, 1711111111, 17111111111, 1111171111111, 11111111111111171, 11111111171111111, 1111111111111111171, 1111171111111111111, 1111711111111111111
Offset: 1

Views

Author

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

Keywords

Comments

Subsequence of A034054. - Michel Marcus, Jul 27 2016
From Bernard Schott, Jul 12 2021: (Start)
This sequence was the subject of the 1st problem, submitted by USSR, during the 31st International Mathematical Olympiad in 1990 at Beijing, but the jury decided not to use it in the competition.
Problem was: Consider the m-digit numbers consisting of one '7' and m-1 '1'. For what values of m are all these numbers prime? (see the reference).
Answer is: only for m = 1 and m = 2, all these m-digit numbers are primes, so, a(1) = 7, then a(2) = 17 and a(3) = 71.
For other results, see A346274. (End)

Examples

			1117 and 1171 are primes, but 1711 = 29 * 59 and 7111 = 13 * 547; hence a(4) = 1117 and a(5) = 1171.
		

References

  • Derek Holton, A Second Step to Mathematical Olympiad Problems, Vol. 7, Mathematical Olympiad Series, World Scientific, 2011, & 8.2. USS 1 p. 260 and & 8.14 Solutions pp 284-287.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(3*10^8) | &*Intseq(p) eq 7]; // Vincenzo Librandi, Jul 27 2016
    
  • Mathematica
    Flatten[ Table[ Select[ Sort[ FromDigits /@ Permutations[ Flatten[{7, Table[1, {n}]}]]], PrimeQ[ # ] &], {n, 0, 20}]]
    Select[Prime[Range[3 10^6]], Times@@IntegerDigits[#] == 7 &] (* Vincenzo Librandi, Jul 27 2016 *)
    Sort[Flatten[Table[Select[FromDigits/@Permutations[PadRight[{7},n,1]],PrimeQ],{n,20}]]] (* Harvey P. Dale, Aug 19 2021 *)
  • Python
    from sympy import isprime
    def auptod(maxdigits):
        alst = []
        for d in range(1, maxdigits+1):
            if d%3 == 0: continue
            for i in range(d):
                t = int('1'*(d-1-i) + '7' + '1'*i)
                if isprime(t): alst.append(t)
        return alst
    print(auptod(20))  # Michael S. Branicky, Jul 12 2021

Extensions

a(21) and beyond from Michael S. Branicky, Jul 12 2021

A107690 Primes with digital product = 4.

Original entry on oeis.org

41, 4111, 11411, 12211, 21121, 21211, 22111, 112121, 1114111, 11111141, 11141111, 111112121, 111121121, 112111211, 112112111, 121111121, 121112111, 122111111, 212111111, 1111111411, 1111411111, 11111121121, 11111121211, 11111211121
Offset: 1

Views

Author

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

Keywords

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(10^8) | &*Intseq(p) eq 4]; // Vincenzo Librandi, Jun 30 2017
  • Mathematica
    Flatten[ Table[ Select[ Sort[ FromDigits /@ Join[ Permutations[ Flatten[{4, Table[1, {n}]}]], Permutations[ Flatten[{2, 2, Table[1, {n - 1}]}] ]]], PrimeQ[ # ] &], {n, 0, 10}]]

A107691 Primes with digital product = 5.

Original entry on oeis.org

5, 151, 1151, 1511, 511111, 1111151, 115111111, 1111115111, 1115111111, 1151111111, 111111111511, 111511111111, 1111151111111, 5111111111111, 111111151111111, 111151111111111, 5111111111111111, 111115111111111111111, 1111111111111111111511
Offset: 1

Views

Author

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

Keywords

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(3*10^8) | &*Intseq(p) eq 5]; // Vincenzo Librandi, Jul 27 2016
  • Maple
    select(isprime,[seq(seq((10^m-1)/9 + 4*10^j,j=0..m-1),m=1..40)]); # Robert Israel, Jan 03 2017
  • Mathematica
    Flatten[ Table[ Select[ Sort[ FromDigits /@ Permutations[Flatten[{5, Table[1, {n}]} ]]], PrimeQ[ # ] &], {n, 0, 21}]]
    Select[Prime[Range[3 10^6]], Times@@IntegerDigits[#] == 5 &] (* Vincenzo Librandi, Jul 27 2016 *)

A107692 Primes whose product of digits is 6.

Original entry on oeis.org

23, 61, 1123, 1213, 1231, 1321, 2113, 2131, 2311, 3121, 11161, 11213, 11321, 12113, 13121, 16111, 31121, 111611, 611111, 1111213, 1112113, 1112131, 1131121, 1211311, 2111311, 3112111, 11111161, 11112113, 11211131, 11231111, 11312111
Offset: 1

Views

Author

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

Keywords

Crossrefs

Programs

  • Mathematica
    Union[ Flatten[ Table[ Select[ Sort[ FromDigits /@ Join[ Permutations[ Flatten[{6, Table[1, {n}]}]], Permutations[ Flatten[{2, 3, Table[ 1, {n - 1}]}] ]]], PrimeQ[ # ] &], {n, 0, 7}]]]
    Select[Prime[Range[750000]],Times@@IntegerDigits[#]==6&] (* Harvey P. Dale, May 29 2016 *)
  • Python
    from sympy import prod, isprime
    from sympy.utilities.iterables import multiset_permutations
    def agen(maxdigits):
        for digs in range(1, maxdigits+1):
            for mp in multiset_permutations("1"*(digs-1) + "236", digs):
                if prod(map(int, mp)) == 6:
                    t = int("".join(mp))
                    if isprime(t): yield t
    print(list(agen(8))) # Michael S. Branicky, Jun 16 2021

A107695 Primes with digital product = 9.

Original entry on oeis.org

19, 191, 313, 331, 911, 11119, 111119, 111191, 113131, 131113, 131311, 911111, 1131113, 1131131, 1311131, 1311311, 3111131, 3113111, 11111119, 11111911, 11911111, 111111313, 111111331, 111113113, 111113131, 111131131, 111133111
Offset: 1

Views

Author

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

Keywords

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(3*10^7) | &*Intseq(p) eq 9]; // Vincenzo Librandi, Jul 27 2016
  • Mathematica
    Union[ Flatten[ Table[ Select[ Sort[ FromDigits /@ Join[ Permutations[ Flatten[{9, Table[1, {n}]}]], Permutations[ Flatten[{3, 3, Table[1, {n - 1}]}]]]], PrimeQ[ # ] & ], {n, 0, 8}]]]
    Select[Prime[Range[3 10^6]], Times@@IntegerDigits[#] == 9 &] (* Vincenzo Librandi, Jul 27 2016 *)

A107696 Primes with digital product = 10.

Original entry on oeis.org

251, 521, 11251, 12511, 15121, 25111, 111521, 115211, 121151, 151121, 152111, 211151, 511211, 11152111, 11511211, 12111511, 15111211, 15121111, 51111211, 111121151, 111512111, 112111511, 112151111, 112511111, 115211111, 121511111, 151211111
Offset: 1

Views

Author

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

Keywords

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(3*10^6) | &*Intseq(p) eq 10]; // Vincenzo Librandi, Jul 27 2016
  • Mathematica
    Flatten[ Table[ Select[ Sort[ FromDigits /@ Permutations[ Flatten[{2, 5, Table[1, {n}]} ]]], PrimeQ[ # ] &], {n, 0, 8}]]
    Select[Prime[Range[3 10^6]], Times@@IntegerDigits[#] == 10 &] (* Vincenzo Librandi, Jul 27 2016 *)
Showing 1-10 of 15 results. Next