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

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

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

Original entry on oeis.org

11, 41, 101, 401, 4001, 4111, 4441, 10111, 10141, 11411, 14011, 14401, 14411, 40111, 41011, 41141, 41411, 44041, 44101, 44111, 100411, 101111, 101141, 101411, 110441, 114001, 114041, 140111, 140401, 140411, 141041, 141101, 400441, 401101, 401411, 404011
Offset: 1

Views

Author

Vincenzo Librandi, Jul 22 2015

Keywords

Comments

A020449 and A020452 are subsequences.
All terms end with a digit "1". - M. F. Hasler, Jul 26 2015

Crossrefs

Primes that contain only digits among {1,4,k}: this sequence (k=0), A260267 (k=2), A199341 (k=3), A260268 (k=5), A260269 (k=6), A079651 (k=7), A260270 (k=8), A260271 (k=9).

Programs

  • Magma
    [p: p in PrimesUpTo(5*10^5) | Set(Intseq(p)) subset [1, 4, 0]];
    
  • Mathematica
    Select[Prime[Range[4 10^4]], Complement[IntegerDigits[#], {1, 4, 0}]=={} &]
  • PARI
    A260266(n=50,show=0)={for(d=1,1e9,my(t,u=vector(d,i,10^(d-i))~);forvec(v=vector(d,i,[i==1||i==d,1+(iM. F. Hasler, Jul 25 2015

A028373 Numbers that have only the straight digits {1, 4, 7}.

Original entry on oeis.org

1, 4, 7, 11, 14, 17, 41, 44, 47, 71, 74, 77, 111, 114, 117, 141, 144, 147, 171, 174, 177, 411, 414, 417, 441, 444, 447, 471, 474, 477, 711, 714, 717, 741, 744, 747, 771, 774, 777, 1111, 1114, 1117, 1141, 1144, 1147, 1171, 1174, 1177, 1411, 1414, 1417, 1441
Offset: 1

Views

Author

Greg Heil (gheil(AT)scn.org), Dec 11 1999

Keywords

Crossrefs

Cf. A028374, the curved sequence.
Cf. A079651 prime numbers using only the straight digits 1,4,7.

Programs

  • Maple
    a:= proc(n) local d, i, m, r; m:=n; r:=0;
          for i from 0 while m>0 do
            d:= irem(m, 3, 'm');
            if d=0 then d:=3; m:=m-1 fi;
            r:= r+10^i*[1, 4, 7][d]
          od: r
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, May 25 2014
  • Mathematica
    f[n_] := Block[{id = IntegerDigits[n], straight = {1, 4, 7}}, If[ Union[ Join[id, straight]] == straight, True, False]]; Select[ Range[0, 1446], f[ # ] & ]
    FromDigits/@Flatten[Table[Tuples[{1,4,7},n],{n,4}],1] (* Harvey P. Dale, Jul 25 2015 *)
  • PARI
    is(n)=my(t);while(n,t=n%10;if(t!=1&&t!=4&&t!=7,return(0));n\=10);!!t \\ Charles R Greathouse IV, Sep 25 2012

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

Original entry on oeis.org

5, 7, 47, 457, 547, 557, 577, 757, 4447, 4457, 4547, 5477, 5557, 7457, 7477, 7547, 7577, 7757, 44777, 45557, 45757, 47777, 54547, 54577, 55457, 55547, 57457, 57557, 74747, 75557, 75577, 77447, 77477, 77557, 77747, 444547, 444557, 445447, 445477, 445747, 447757
Offset: 1

Views

Author

Jonathan Vos Post, Sep 24 2012

Keywords

Comments

These are the primes in A214584. Primes whose numerals are all written (san serif) with at least one right or acute angle.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(450000) | Intseq(p) subset [4,5,7]]; // Bruno Berselli, Sep 25 2012
    
  • Mathematica
    Select[Flatten[Table[FromDigits/@Tuples[{4,5,7},n],{n,6}]],PrimeQ] (* Bruno Berselli, Sep 25 2012 *)
  • PARI
    A217039(n=50,show=0,L=[4,5,7])={for(d=1,1e9, my(t, u=vector(d,i,10^(d-i))~); forvec(v=vector(d,i,[if(i==d&&d>1,3/*must end in 7*/,1), #L]), ispseudoprime(t=vecextract(L, v)*u)||next; show&&print1(t", "); n--||return(t)))} \\ Syntax updated for newer PARI versions by M. F. Hasler, Jul 25 2015

Formula

A000040 INTERSECTION A214584.

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

Original entry on oeis.org

2, 7, 11, 17, 71, 127, 211, 227, 271, 277, 727, 1117, 1171, 1217, 1277, 1721, 1777, 2111, 2221, 2711, 2777, 7121, 7127, 7177, 7211, 7717, 7727, 11117, 11171, 11177, 11717, 11777, 12211, 12227, 12277, 12721, 17117, 21121, 21211, 21221, 21227, 21277, 21727
Offset: 1

Views

Author

Vincenzo Librandi, Aug 04 2015

Keywords

Comments

A020450, A020455 and A020459 are subsequences.

Crossrefs

Cf. Primes that contain only the digits (k,1,7): A199327 (k=0), this sequence (k=2), A260379 (k=3), A079651 (k=4), A260828 (k=5), A260891 (k=6), A260892 (k=8), A260893 (k=9).

Programs

  • Magma
    [p: p in PrimesUpTo(3*10^4) | Set(Intseq(p)) subset [1, 2, 7]];
  • Mathematica
    Select[Prime[Range[2 10^5]], Complement[IntegerDigits[#], {1, 2, 7}] == {} &]
    Table[Select[FromDigits/@Tuples[{1,2,7},n],PrimeQ],{n,5}]//Flatten (* Harvey P. Dale, Apr 12 2018 *)

A361822 Primes without {2, 5} as digits.

Original entry on oeis.org

3, 7, 11, 13, 17, 19, 31, 37, 41, 43, 47, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 131, 137, 139, 149, 163, 167, 173, 179, 181, 191, 193, 197, 199, 307, 311, 313, 317, 331, 337, 347, 349, 367, 373, 379, 383, 389, 397, 401, 409, 419, 431, 433, 439, 443, 449, 461, 463
Offset: 1

Views

Author

Bernard Schott, Mar 26 2023

Keywords

Comments

Subsequence of primes that are in A361780.

Crossrefs

Intersection of A000040 and A361780.
Cf. A079651 (primes with {1, 4, 7}), A079652 (primes with {0, 3, 6, 8, 9}).
Cf. A247052 (primes with {1, 2, 4, 5, 7}), A034470 (primes with {0, 2, 3, 5, 6, 8, 9}).
Cf. A106116, A154761, A386320 - A386358 (primes without two decimal digits).
Cf. A385776.

Programs

  • Maple
    filter:= proc(n) convert(convert(n,base,10),set) intersect {2,5} = {} end proc:
    select(filter, [seq(ithprime(i),i=1..1000)]); # Robert Israel, Mar 26 2023
  • Mathematica
    Select[Prime[Range[100]], AllTrue[IntegerDigits[#], ! MemberQ[{2, 5}, #1] &] &] (* Amiram Eldar, Mar 26 2023 *)
  • Python
    print(list(islice(primes_with("01346789"), 41))) # uses function/imports in A385776. Jason Bard, Jul 20 2025

A242739 Semiprimes having only straight digits.

Original entry on oeis.org

4, 14, 74, 77, 111, 141, 177, 411, 417, 447, 471, 717, 771, 1111, 1114, 1141, 1147, 1174, 1177, 1411, 1417, 1441, 1477, 1711, 1714, 1717, 1774, 4117, 4141, 4171, 4174, 4411, 4414, 4417, 4471, 4474, 4711, 4714, 4717, 4741, 4747, 4771, 4777, 7111, 7114, 7117, 7141
Offset: 1

Views

Author

K. D. Bajpai, May 21 2014

Keywords

Comments

A straight digit semiprime has only the straight digits, i.e., 1, 4 or 7.
Intersection of A001358 and A028373. - Michel Marcus, May 25 2014

Examples

			471 = 3 * 157 is semiprime and has only straight digits 4, 7 and 1. Hence it is in the sequence.
1147 =  31 * 37 is semiprime and has only straight digits 1, 1, 4 and 7. Hence it is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    A242739 = {}; Do[a = PrimeOmega[n]; If [a == 2 && Intersection[IntegerDigits[n], {0, 2, 3, 5, 6, 8, 9}] == {}, AppendTo[A242739, n]], {n, 8000}]; A242739
    Table[Select[FromDigits/@Tuples[{1,4,7},n],PrimeOmega[#]==2&],{n,4}]//Flatten (* Harvey P. Dale, Sep 23 2022 *)

A386029 Primes having only {0, 1, 4, 7} as digits.

Original entry on oeis.org

7, 11, 17, 41, 47, 71, 101, 107, 401, 701, 1117, 1171, 1447, 1471, 1741, 1747, 1777, 4001, 4007, 4111, 4177, 4441, 4447, 7001, 7177, 7411, 7417, 7477, 7717, 7741, 10007, 10111, 10141, 10177, 10477, 10711, 10771, 11047, 11071, 11117, 11171, 11177, 11411, 11447
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Supersequence of A079651, A199327, A260266.

Programs

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

A386093 Primes having only {1, 2, 4, 7} as digits.

Original entry on oeis.org

2, 7, 11, 17, 41, 47, 71, 127, 211, 227, 241, 271, 277, 421, 727, 1117, 1171, 1217, 1277, 1427, 1447, 1471, 1721, 1741, 1747, 1777, 2111, 2141, 2221, 2411, 2417, 2441, 2447, 2477, 2711, 2741, 2777, 4111, 4127, 4177, 4211, 4217, 4241, 4271, 4421, 4441, 4447, 4721
Offset: 1

Views

Author

Jason Bard, Jul 16 2025

Keywords

Crossrefs

Supersequence of A079651, A260267, A260889, A385784.

Programs

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

A386107 Primes having only {1, 3, 4, 7} as digits.

Original entry on oeis.org

3, 7, 11, 13, 17, 31, 37, 41, 43, 47, 71, 73, 113, 131, 137, 173, 311, 313, 317, 331, 337, 347, 373, 431, 433, 443, 733, 743, 773, 1117, 1171, 1373, 1433, 1447, 1471, 1733, 1741, 1747, 1777, 3137, 3313, 3331, 3343, 3347, 3371, 3373, 3413, 3433, 3733, 4111, 4133
Offset: 1

Views

Author

Jason Bard, Jul 17 2025

Keywords

Crossrefs

Supersequence of A079651, A199341, A199347, A260379.

Programs

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