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 22 results. Next

A261267 Primes having only {0, 2, 7} as digits.

Original entry on oeis.org

2, 7, 227, 277, 727, 2027, 2207, 2707, 2777, 7027, 7207, 7727, 20707, 22027, 22277, 22727, 22777, 27077, 27277, 70207, 72077, 72227, 72277, 72707, 72727, 200227, 202277, 202777, 207227, 222007, 222707, 227027, 227207, 227707, 272227, 272777, 277007
Offset: 1

Views

Author

Vincenzo Librandi, Aug 13 2015

Keywords

Comments

A020459 is a subsequence.

Crossrefs

Cf. Primes that contain only the digits (0,2,k): A036953 (k=1), A260125 (k=3), this sequence (k=7), A261268 (k=9).

Programs

  • Magma
    [p: p in PrimesUpTo(2*10^6) | Set(Intseq(p)) subset [0, 2, 7]];
  • Mathematica
    Select[Prime[Range[6 10^4]], Complement[IntegerDigits[#], {0, 2, 7}] == {}&]

A106100 Primes with maximal digit = 2.

Original entry on oeis.org

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

Views

Author

Zak Seidov, May 07 2005

Keywords

Comments

Subsequence of A036953. Prime numbers p such that A209928(p) = 2. Complement of A221698 with respect to A221697. [Jaroslav Krizek, Jan 22 2013]

Crossrefs

Programs

  • Maple
    N:= 6: # to get all terms of up to N digits
    M2:= {1};M1:= {1}:
    for d from 1 to N-1 do
      M2:= map(t -> (t, t+10^d, t+2*10^d), M2);
      M1:= map(t -> (t, t+10^d), M1);
    od:
    sort(convert({2} union select(isprime,M2 minus M1),list)); # Robert Israel, Jun 19 2016
  • Mathematica
    Select[Prime[Range[10000]], Max[IntegerDigits[ # ]]==2&]
  • PARI
    isok(p) = isprime(p) && (vecmax(digits(p)) == 2); \\ Michel Marcus, Jan 02 2019

Extensions

More terms from Rick L. Shepherd, May 22 2005

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

Original entry on oeis.org

2, 3, 11, 13, 23, 31, 101, 103, 113, 131, 211, 223, 233, 311, 313, 331, 1013, 1021, 1031, 1033, 1103, 1123, 1201, 1213, 1223, 1231, 1301, 1303, 1321, 2003, 2011, 2111, 2113, 2131, 2203, 2213, 2221, 2311, 2333, 3001, 3011, 3023, 3121, 3203, 3221, 3301, 3313
Offset: 1

Views

Author

Rick L. Shepherd, May 22 2005

Keywords

Crossrefs

Subsequence of A036956.
Cf. A036953 (primes containing digits from set {0, 1, 2}).

Programs

  • Haskell
    a107715 n = a107715_list !! (n-1)
    a107715_list = filter ((== 1) . a010051) a007090_list
    -- Reinhard Zumkeller, Aug 11 2011
    
  • Mathematica
    Select[Prime[Range[500]],Max[IntegerDigits[#]]<4&] (* Harvey P. Dale, May 09 2012 *)
    Select[FromDigits/@Tuples[{0,1,2,3},4],PrimeQ] (* Harvey P. Dale, Mar 06 2016 *)
  • Python
    from gmpy2 import digits
    from sympy import isprime
    [int(digits(n,4)) for n in range(1000) if isprime(int(digits(n,4)))] # Chai Wah Wu, Jul 31 2014
    
  • Python
    print(list(islice(primes_with("0123"), 41))) # uses function/imports in A385776. Jason Bard, Jul 18 2025

A036954 Primes with digits in {0,1,2} taken as base 3 and converted to base 10.

Original entry on oeis.org

2, 4, 10, 22, 34, 46, 58, 67, 79, 94, 103, 139, 145, 157, 166, 169, 172, 181, 190, 193, 199, 205, 211, 214, 229, 277, 283, 295, 298, 307, 313, 349, 367, 373, 391, 394, 409, 421, 433, 439, 463, 466, 478, 505, 517, 523, 529, 535, 541, 547, 556, 559, 571, 577
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

Equivalently: terms of A036953 read in base 3 (and written in base 10). - M. F. Hasler, Jul 25 2015
Equivalently, k such that A007089(k), read literally as a decimal number, is a prime. - N. J. A. Sloane, Feb 17 2023

Examples

			a(n) = 313 is 102121{3}, and 102121{10} is prime.
		

Crossrefs

Indices of primes in A007089.

Programs

  • Mathematica
    FromDigits[#,3]&/@Select[Tuples[{0,1,2},6],PrimeQ[FromDigits[#]]&] (* Harvey P. Dale, Mar 27 2021 *)
  • PARI
    is(n)=(n%3==1||n==2)&&isprime((n=digits(n,3))*vectorv(#n,i,10^(#n-i))) \\ M. F. Hasler, Jul 25 2015

Formula

a(n) == 1 (mod 3) for all n > 1. - M. F. Hasler, Jul 25 2015

Extensions

Offset corrected to 1 and minor edits by M. F. Hasler, Jul 25 2015

A111488 Primes having only {0, 1, 3, 6} as digits.

Original entry on oeis.org

3, 11, 13, 31, 61, 101, 103, 113, 131, 163, 311, 313, 331, 601, 613, 631, 661, 1013, 1031, 1033, 1061, 1063, 1103, 1163, 1301, 1303, 1361, 1601, 1613, 1663, 3001, 3011, 3061, 3163, 3301, 3313, 3331, 3361, 3613, 3631, 6011, 6101, 6113, 6131, 6133, 6163
Offset: 1

Views

Author

Jonathan Vos Post, Nov 15 2005

Keywords

Comments

Includes all repunit primes (A004022). Conjecture: an infinite sequence. Note twin primes: (11, 13), (101, 103), (311, 313), (1031, 1033), (1061, 1063), (1301, 1303), (6131, 6133), (10301, 10303), (10331, 10333), (13001, 13003).
In other words, primes with digits in the set {0,1,3,6}. - M. F. Hasler, Jul 25 2015
The number of 1's in the representation must be either 1 or 2 (mod 3), because otherwise the number would be divisible by 3 (and therefore composite). The only exception is the 3 itself. This excludes basically members of A038603. - R. J. Mathar, Jul 25 2015

Crossrefs

Programs

  • Maple
    f:= proc(x) local L,p;
      L:= subs([3=6,2=3],convert(x,base,4));
      p:= add(L[i]*10^(i-1),i=1..nops(L));
      if isprime(p) then p fi
    end proc:
    map(f, [$1..4^4]); # Robert Israel, Dec 18 2018
  • Mathematica
    Select[Prime@ Range@ 1000, SubsetQ[{0, 1, 3, 6}, IntegerDigits@ #] &] (* Michael De Vlieger, Jul 25 2015 *)
  • PARI
    A111488={(n, show=0, L=[0,1,3,6])->my(t); for(d=1,1e9,u=vector(d, i, 10^(d-i))~; forvec(v=vector(d,i,[1+(i==1&&!L[1]), #L]), ispseudoprime(t=vector(d, i, L[v[i]])*u)||next; show&print1(t", "); n--||return(t)))} \\ M. F. Hasler, Jul 25 2015

Extensions

Corrected by Ray Chandler, Nov 19 2005
Name changed by Sean A. Irvine, Jul 21 2025

A385344 Numbers where all the digits of all the prime factors are smaller than 3.

Original entry on oeis.org

1, 2, 4, 8, 11, 16, 22, 32, 44, 64, 88, 101, 121, 128, 176, 202, 211, 242, 256, 352, 404, 422, 484, 512, 704, 808, 844, 968, 1021, 1024, 1111, 1201, 1331, 1408, 1616, 1688, 1936, 2011, 2042, 2048, 2111, 2221, 2222, 2321, 2402, 2662, 2816, 3232, 3376, 3872, 4022, 4084, 4096, 4222, 4442, 4444, 4642, 4804, 5324, 5632
Offset: 1

Views

Author

Jens Ahlström, Jun 26 2025

Keywords

Comments

Multiplicative closure of A036953.

Examples

			202 is in the sequence since the prime factors 2 and 101 both have all digits smaller than 3.
34 is not in the sequence since it has the prime factor 17 that have a digit larger than 2.
		

Crossrefs

Supersequence of A036953. Cf. A385345.

Programs

  • Mathematica
    A385344Q[k_] := AllTrue[FactorInteger[k][[All, 1]], Max[IntegerDigits[#]] < 3 &];
    Select[Range[10000], A385344Q] (* Paolo Xausa, Jun 28 2025 *)
  • Python
    from sympy import primefactors
    def ok(n): return all(set(str(f)) <= set("012") for f in primefactors(n))
    print([k for k in range(1, 6000) if ok(k)]) # Michael S. Branicky, Jun 26 2025

Formula

{k | all prime factors of k are in A036953}. - Michael S. Branicky, Jun 26 2025

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

Original entry on oeis.org

2, 11, 41, 101, 211, 241, 401, 421, 1021, 1201, 2011, 2111, 2141, 2221, 2411, 2441, 4001, 4021, 4111, 4201, 4211, 4241, 4421, 4441, 10111, 10141, 10211, 11411, 12011, 12041, 12101, 12211, 12241, 12401, 12421, 14011, 14221, 14401, 14411, 20011, 20021, 20101, 20201
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Subsequence of A036956.
Supersequence of A036953, A260266, A260267.

Programs

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

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

Original entry on oeis.org

2, 5, 11, 101, 151, 211, 251, 521, 1021, 1051, 1151, 1201, 1511, 2011, 2111, 2221, 2251, 2521, 2551, 5011, 5021, 5051, 5101, 5501, 5521, 10111, 10151, 10211, 10501, 11251, 11551, 12011, 12101, 12211, 12251, 12511, 15101, 15121, 15511, 15551, 20011, 20021, 20051
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Supersequence of A036953, A199325, A385773.

Programs

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

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

Original entry on oeis.org

2, 11, 61, 101, 211, 601, 661, 1021, 1061, 1201, 1601, 1621, 2011, 2111, 2161, 2221, 2621, 6011, 6101, 6121, 6211, 6221, 6661, 10061, 10111, 10211, 10601, 11161, 11261, 11621, 12011, 12101, 12161, 12211, 12601, 12611, 16001, 16061, 16111, 16661, 20011, 20021
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Supersequence of A036953, A199326, A285774.

Programs

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

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

Original entry on oeis.org

2, 7, 11, 17, 71, 101, 107, 127, 211, 227, 271, 277, 701, 727, 1021, 1117, 1171, 1201, 1217, 1277, 1721, 1777, 2011, 2017, 2027, 2111, 2207, 2221, 2707, 2711, 2777, 7001, 7027, 7121, 7127, 7177, 7207, 7211, 7717, 7727, 10007, 10111, 10177, 10211, 10271, 10711
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Supersequence of A036953, A199327, A260889.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 1, 2, 7]];
    
  • Mathematica
    Select[FromDigits /@ Tuples[{0, 1, 2, 7}, n], PrimeQ]
  • PARI
    primes_with(, 1, [0, 1, 2, 7]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("0127"), 41))) # uses function/imports in A385776
    
Previous Showing 11-20 of 22 results. Next