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 10 results.

A036953 Primes having only {0, 1, 2} as digits.

Original entry on oeis.org

2, 11, 101, 211, 1021, 1201, 2011, 2111, 2221, 10111, 10211, 12011, 12101, 12211, 20011, 20021, 20101, 20201, 21001, 21011, 21101, 21121, 21211, 21221, 22111, 101021, 101111, 101221, 102001, 102101, 102121, 110221, 111121, 111211, 112111
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

Number of n-digit terms d(n) = (1, 1, 2, 5, 16, 34, 76, 194, 543, 1469, 4094, 11017, ...); e.g., there are five 4-digit terms: 1021, 1201, 2011, 2111, 2221, hence d(4) = 5. - Zak Seidov, Jun 30 2013
Also, primes in A007089. - M. F. Hasler, Jul 25 2015

Crossrefs

Programs

  • Mathematica
    Select[FromDigits/@Tuples[{0,1,2},6],PrimeQ] (* Harvey P. Dale, Jul 11 2017 *)
  • PARI
    lista(n) = {forprime(p=2, n, if (vecmax(digits(p)) <= 2, print1(p, ", ")))} \\ Michel Marcus, Aug 02 2014
    
  • PARI
    A036953={(n,show=0)->for(d=1,1e9,my(u=vector(d,i,10^(d-i))~);forvec(v=vector(d,i,if(i>1,if(iM. F. Hasler, Jul 25 2015
  • Python
    from gmpy2 import digits
    from sympy import isprime
    [int(digits(n,3)) for n in range(1000) if isprime(int(digits(n,3)))] # Chai Wah Wu, Jul 31 2014
    

Extensions

Edited by M. F. Hasler, Jul 25 2015

A260827 Primes having only {0, 5, 7} as digits.

Original entry on oeis.org

5, 7, 557, 577, 757, 5077, 5507, 5557, 7057, 7507, 7577, 7757, 50077, 50707, 50777, 55057, 57077, 57557, 70507, 75557, 75577, 75707, 77557, 500057, 500777, 505777, 507077, 507557, 507757, 550007, 550577, 550757, 555077, 555557, 555707, 557057, 570077, 575077
Offset: 1

Views

Author

Vincenzo Librandi, Aug 01 2015

Keywords

Crossrefs

A020467 is a subsequence.
Cf. Primes that contain only the digits (k,5,7): this sequence (k=0), A260828 (k=1), A214705 (k=2), A087363 (k=3), A217039 (k=4), A260829 (k=6), A260830 (k=8), A260831 (k=9).
Cf. A000040.

Programs

  • Magma
    [p: p in PrimesUpTo(2*10^6) | Set(Intseq(p)) subset [0,5,7]];
    
  • Mathematica
    Select[Prime[Range[2 10^5]], Complement[IntegerDigits[#], {0, 5, 7}]=={} &]
  • Python
    from sympy import isprime
    from sympy.utilities.iterables import multiset_permutations
    def aupton(terms):
      n, digits, alst = 0, 1, []
      while len(alst) < terms:
        mpstr = "".join(d*digits for d in "057")
        for mp in multiset_permutations(mpstr, digits):
          if mp[0] == "0": continue
          t = int("".join(mp))
          if isprime(t): alst.append(t)
          if len(alst) == terms: break
        else: digits += 1
      return alst
    print(aupton(38)) # Michael S. Branicky, May 07 2021

A217124 Semiprimes whose decimal representation has only digits in {4,5,7}.

Original entry on oeis.org

4, 55, 57, 74, 77, 445, 447, 454, 545, 554, 745, 755, 4474, 4555, 4574, 4577, 4747, 4754, 4757, 4777, 5447, 5455, 5545, 5554, 5747, 5755, 5774, 5777, 7445, 7447, 7454, 7555, 7745, 7747, 7754, 44477, 44554, 44557, 44747, 44755, 45447, 45454, 45455, 45457
Offset: 1

Views

Author

Jonathan Vos Post, Sep 26 2012

Keywords

Comments

Crooked semiprimes. This is to A217048 as integers all of whose numerals are written (san serif) with at least one right or acute angle (A214584) are to numbers using only the curved digits 0, 3, 6, 8 and 9 (A072960). This is to crooked primes (A217039) as semiprimes (A001358) are to primes (A000040).

Examples

			4555 = 5 * 911 is semiprime.
		

Crossrefs

Programs

  • Mathematica
    SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; Select[Flatten[Table[FromDigits /@ Tuples[{4, 5, 7}, n], {n, 5}]], SemiPrimeQ] (* T. D. Noe, Sep 27 2012 *)
    Select[Flatten[Table[FromDigits/@Tuples[{4,5,7},n],{n,5}]],PrimeOmega[ #] == 2&] (* Harvey P. Dale, Sep 21 2016 *)

Formula

A001358 INTERSECTION A214584.

Extensions

Corrected and extended by T. D. Noe, Sep 27 2012

A386070 Primes having only {0, 4, 5, 7} as digits.

Original entry on oeis.org

5, 7, 47, 457, 547, 557, 577, 757, 4007, 4057, 4447, 4457, 4507, 4547, 5077, 5407, 5477, 5507, 5557, 7057, 7457, 7477, 7507, 7547, 7577, 7757, 40507, 40577, 44507, 44777, 45007, 45077, 45557, 45707, 45757, 47057, 47407, 47507, 47777, 50047, 50077, 50707, 50777
Offset: 1

Views

Author

Jason Bard, Jul 16 2025

Keywords

Crossrefs

Supersequence of A217039, A260827, A384449.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 4, 5, 7]];
    
  • Mathematica
    Select[FromDigits /@ Tuples[{0, 4, 5, 7}, n], PrimeQ]
  • PARI
    primes_with(, 1, [0, 4, 5, 7]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("0457"), 41))) # uses function/imports in A385776
    

A386120 Primes having only {1, 4, 5, 7} as digits.

Original entry on oeis.org

5, 7, 11, 17, 41, 47, 71, 151, 157, 457, 541, 547, 557, 571, 577, 751, 757, 1117, 1151, 1171, 1447, 1451, 1471, 1511, 1571, 1741, 1747, 1777, 4111, 4157, 4177, 4441, 4447, 4451, 4457, 4517, 4547, 4751, 5147, 5171, 5417, 5441, 5471, 5477, 5557, 5711, 5717, 5741
Offset: 1

Views

Author

Jason Bard, Jul 17 2025

Keywords

Crossrefs

Supersequence of A079651, A217039, A260268, A260828.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 4, 5, 7]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{1, 4, 5, 7}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [1, 4, 5, 7]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("1457"), 41))) # uses function/imports in A385776
    

A386153 Primes having only {2, 4, 5, 7} as digits.

Original entry on oeis.org

2, 5, 7, 47, 227, 257, 277, 457, 547, 557, 577, 727, 757, 2447, 2477, 2557, 2777, 4447, 4457, 4547, 5227, 5477, 5527, 5557, 7247, 7457, 7477, 7547, 7577, 7727, 7757, 22247, 22277, 22447, 22727, 22777, 24247, 24527, 24547, 25247, 25447, 25457, 25577, 25747, 27277
Offset: 1

Views

Author

Jason Bard, Jul 18 2025

Keywords

Crossrefs

Supersequence of A214705, A217039, A385784.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 4, 5, 7]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{2, 4, 5, 7}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [2, 4, 5, 7]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("2457"), 41))) # uses function/imports in A385776
    

A386170 Primes having only {3, 4, 5, 7} as digits.

Original entry on oeis.org

3, 5, 7, 37, 43, 47, 53, 73, 337, 347, 353, 373, 433, 443, 457, 547, 557, 577, 733, 743, 757, 773, 3343, 3347, 3373, 3433, 3457, 3533, 3547, 3557, 3733, 4337, 4357, 4373, 4447, 4457, 4547, 4733, 5333, 5347, 5437, 5443, 5477, 5557, 5573, 5737, 5743, 7333, 7433
Offset: 1

Views

Author

Jason Bard, Jul 18 2025

Keywords

Crossrefs

Supersequence of A087363, A199345, A199347, A217039.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [3, 4, 5, 7]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{3, 4, 5, 7}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [3, 4, 5, 7]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("3457"), 41))) # uses function/imports in A385776
    

A386188 Primes having only {4, 5, 6, 7} as digits.

Original entry on oeis.org

5, 7, 47, 67, 457, 467, 547, 557, 577, 647, 677, 757, 4447, 4457, 4547, 4567, 4657, 5477, 5557, 5647, 5657, 6547, 6577, 7457, 7477, 7547, 7577, 7757, 44647, 44657, 44777, 45557, 45667, 45677, 45757, 45767, 46447, 46457, 46477, 46567, 46747, 46757, 47657, 47777
Offset: 1

Views

Author

Jason Bard, Jul 18 2025

Keywords

Crossrefs

Supersequence of A217039, A260829, A385794.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [4, 5, 6, 7]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{4, 5, 6, 7}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [4, 5, 6, 7]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("4567"), 41))) # uses function/imports in A385776
    

A386190 Primes having only {4, 5, 7, 8} as digits.

Original entry on oeis.org

5, 7, 47, 457, 487, 547, 557, 577, 587, 757, 787, 857, 877, 887, 4447, 4457, 4547, 4787, 4877, 5477, 5557, 5857, 7457, 7477, 7487, 7547, 7577, 7757, 7877, 8447, 8747, 8887, 44587, 44777, 44887, 45557, 45587, 45757, 45887, 47777, 47857, 48487, 48757, 48787, 48847
Offset: 1

Views

Author

Jason Bard, Jul 18 2025

Keywords

Crossrefs

Supersequence of A217039, A260830, A385795.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [4, 5, 7, 8]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{4, 5, 7, 8}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [4, 5, 7, 8]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("4578"), 41))) # uses function/imports in A385776
    

A386191 Primes having only {4, 5, 7, 9} as digits.

Original entry on oeis.org

5, 7, 47, 59, 79, 97, 449, 457, 479, 499, 547, 557, 577, 599, 757, 797, 947, 977, 997, 4447, 4457, 4547, 4549, 4597, 4759, 4799, 4957, 4999, 5449, 5477, 5479, 5557, 5749, 5779, 7457, 7459, 7477, 7499, 7547, 7549, 7559, 7577, 7757, 7759, 7949, 9479, 9497, 9547
Offset: 1

Views

Author

Jason Bard, Jul 18 2025

Keywords

Crossrefs

Supersequence of A217039, A260831, A261183, A385793.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [4, 5, 7, 9]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{4, 5, 7, 9}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [4, 5, 7, 9]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("4579"), 41))) # uses function/imports in A385776
    
Showing 1-10 of 10 results.