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 11-20 of 119 results. Next

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

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

A243534 Numbers n such that the list of all divisors of n contains only 1 distinct digit (in base 10).

Original entry on oeis.org

1, 11, 1111111111111111111, 11111111111111111111111
Offset: 1

Views

Author

Jaroslav Krizek, Jun 13 2014

Keywords

Comments

Union of 1 and A004022 (prime repunits).
The next term has 317 digits.
Numbers n such that A037278(n), A176558(n) and A243360(n) contain only 1 distinct digit.

Examples

			11 is in sequence because the list of the divisors of 11: (1, 11) contains only 1 distinct digit.
		

Crossrefs

Sequences of numbers n such that the list of divisors of n contains k distinct digits for 1 <= k <= 10: k = 1: A243534; k = 2: A243535; k = 3: A243536; k = 4: A243537; k = 5: A243538; k = 6: A243539; k = 7: A243540; k = 8: A243541; k = 9: A243542; k = 10: A095050.
Cf. A243543.

Programs

  • Excel
    [Row n = 1 …10000; Column A: A(n) = A095048(n); Column B: B(n) = IF(A(n)=1;A(n)); Arrangement of column B]

Formula

a(1) = 1; for n >= 2, a(n+1) = A004022 (prime repunits).

A046413 Numbers k such that the repunit of length k (11...11, with k 1's) has exactly 2 prime factors.

Original entry on oeis.org

3, 4, 5, 7, 11, 17, 47, 59, 71, 139, 211, 251, 311, 347, 457, 461
Offset: 1

Views

Author

Patrick De Geest, Jul 15 1998

Keywords

Comments

347, 457, 461 and 701 are also terms. The only other possible terms up to 1000 are 263, 311, 509, 557, 617, 647 and 991; repunits of these lengths are known to be composite but the linked sources do not provide their factors. - Rick L. Shepherd, Mar 11 2003
The Yousuke Koide reference now shows the repunit of length 263 partially factored; 263 is no longer a possible candidate for this sequence. - Ray Chandler, Sep 06 2005
The repunit of length 263 has 3 prime factors; the repunit of length 617 has one known prime factor and a large composite. Possible terms > 1000 are 1117, 1213, 1259, 1291, 1373, 1447, 1607, 1637, 1663, 1669, 1759, 1823, 1949, 1987, 2063 & 2087. - Robert G. Wilson v, Apr 26 2010
All terms are either primes or squares of primes in A004023. In particular, the only composite below a million is 4. - Charles R Greathouse IV, Nov 21 2014
a(17) >= 509. The only confirmed term below 2500 is 701. As of July 2019, no factorization is known for the potential terms 509, 557, 647, 991, 1117, 1259, 1447, 1607, 1637, 1663, 1669, 1759, 1823, 1949, 1987, 2063, 2087, 2111, 2203, 2269, 2309, 2341, 2467, 2503, 2521, ... Unless the least prime factors of the respective composites have fewer than ~80 decimal digits and are thus accessible by massive ECM computations, there is no chance for an extension using current publicly available factorization methods. See links to factordb.com for the status of the factorization of the smallest unknown terms. - Hugo Pfoertner, Jul 30 2019

Examples

			7 is a term because 1111111 = 239*4649.
		

References

  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 60.

Crossrefs

Cf. A000042, A004022 (repunit primes), A046053, A102782.

Programs

  • Mathematica
    Select[Range[60],PrimeOmega[FromDigits[PadRight[{},#,1]]]==2&] (* The program generates the first 8 terms of the sequence. *) (* Harvey P. Dale, Aug 26 2024 *)

Extensions

More terms from Rick L. Shepherd, Mar 11 2003
a(13)-a(16) from Robert G. Wilson v, Apr 26 2010

A293663 Circular primes that are not repunits.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 31, 37, 71, 73, 79, 97, 113, 131, 197, 199, 311, 337, 373, 719, 733, 919, 971, 991, 1193, 1931, 3119, 3779, 7793, 7937, 9311, 9377, 11939, 19391, 19937, 37199, 39119, 71993, 91193, 93719, 93911, 99371, 193939, 199933, 319993, 331999, 391939
Offset: 1

Views

Author

Felix Fröhlich, Dec 30 2017

Keywords

Comments

Relative complement of A004022 in A068652.
Conjecture: The sequence is finite.
From Michael De Vlieger, Dec 30 2017: (Start)
Primes > 5 in this sequence must only have digits that are in the reduced residue system modulo 10, i.e., {1, 3, 7, 9}.
There are 54 terms that have 6 or fewer decimal digits, the largest of which is 999331.
a(55) must be larger than 10^11. (End) [Corrected by Felix Fröhlich, Mar 15 + 24 2019]
From Felix Fröhlich, Mar 16 2019: (Start)
a(55) > 10^23 if it exists (cf. De Geest link).
Numbers k such that A262988(k) = A055642(k). (End)

Examples

			The numbers resulting from cyclic permutations of the digits of 1193 are 1931, 9311 and 3119, respectively and all those numbers are prime, so 1193, 1931, 3119 and 9311 are terms of the sequence.
		

Crossrefs

Cf. base-b nonrepunit circular primes: A293657 (b=4), A293658 (b=5), A293659 (b=6), A293660 (b=7), A293661 (b=8), A293662 (b=9).

Programs

  • Mathematica
    Select[Prime@ Range[10^5], Function[w, And[AllTrue[Array[FromDigits@ RotateRight[w, #] &, Length@ w - 1], PrimeQ], Union@ w != {1} ]]@ IntegerDigits@ # &] (* or *)
    Select[Flatten@ Array[FromDigits /@ Most@ Rest@ Tuples[{1, 3, 7, 9}, #] &, 9, 2], Function[w, And[AllTrue[Array[FromDigits@ RotateRight[w, #] &, Length@ w], PrimeQ], Union@ w != {1} ]]@ IntegerDigits@ # &] (* Michael De Vlieger, Dec 30 2017 *)
  • PARI
    eva(n) = subst(Pol(n), x, 10)
    rot(n) = if(#Str(n)==1, v=vector(1), v=vector(#n-1)); for(i=2, #n, v[i-1]=n[i]); u=vector(#n); for(i=1, #n, u[i]=n[i]); v=concat(v, u[1]); v
    is_circularprime(p) = my(d=digits(p), r=rot(d)); if(vecmin(d)==0, return(0), while(1, if(!ispseudoprime(eva(r)), return(0)); r=rot(r); if(r==d, return(1))))
    forprime(p=1, , if(vecmax(digits(p)) > 1, if(is_circularprime(p), print1(p, ", "))))
    
  • PARI
    /* The following is a much faster program that only tests numbers whose decimal expansion consists of digits from the set {1, 3, 7, 9}. */
    eva(n) = subst(Pol(n), x, 10)
    next_v(vec) = my(k=#vec); if(vecmin(vec)==9, vec=concat(vector(#vec, t, 1), [3]); return(vec)); while(k > 0, if(vec[k]==9, vec[k]=1, if(vec[k]==3, vec[k]=7; return(vec), vec[k]=vec[k]+2, return(vec))); k--)
    rot(n) = if(#Str(n)==1, v=vector(1), v=vector(#n-1)); for(i=2, #n, v[i-1]=n[i]); u=vector(#n); for(i=1, #n, u[i]=n[i]); v=concat(v, u[1]); v
    search(n) = my(d=digits(n), e=[], ed=0); while(1, e=rot(d); while(1, if(!ispseudoprime(eva(e)), break, e=rot(e); if(e==d && ispseudoprime(eva(e)), print1(eva(d), ", "); break))); d=next_v(d))
    searchfrom(n) = if(n < 12, forprime(p=n, 10, print1(p, ", ")); search(13), my(d=digits(n)); for(k=1, #d, if(d[k]%2==0, d[k]++, if(d[k]==5, d[k]=7))); search(eva(d)))
    /* Start a search from 1 upwards as follows: */
    searchfrom(1) \\ Felix Fröhlich, Mar 23 2019

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 *)
Previous Showing 11-20 of 119 results. Next