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

A199342 Primes having only {2, 3, 4} as digits.

Original entry on oeis.org

2, 3, 23, 43, 223, 233, 433, 443, 2243, 2333, 2423, 3323, 3343, 3433, 4243, 4423, 22343, 22433, 23333, 24223, 24443, 32233, 32323, 32423, 32443, 33223, 33343, 42223, 42323, 42433, 42443, 43223, 222323, 223243, 223423, 224233, 224423, 224443, 232333, 232433, 233323, 233423, 234323, 234343, 242243, 243233, 243343, 243433, 244243, 244333
Offset: 1

Views

Author

M. F. Hasler, Nov 05 2011

Keywords

Comments

A020458 and A020461 are subsequences. - Vincenzo Librandi, Jul 28 2015

Crossrefs

Cf. similar sequences listed in A199340.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [3, 4, 2]]; // Vincenzo Librandi, Jul 28 2015
  • Mathematica
    Select[Prime[Range[10^5]], Complement[IntegerDigits[#], {3, 4, 2}]=={}&] (* Vincenzo Librandi, Jul 28 2015 *)
    Table[Select[FromDigits/@Tuples[{2,3,4},n],PrimeQ],{n,6}]//Flatten (* Harvey P. Dale, Nov 06 2019 *)
  • PARI
    a(n, list=0, L=[2, 3, 4], reqpal=0)={my(t); for(d=1, 1e9, u=vector(d, i, 10^(d-i))~; forvec(v=vector(d, i, [1+(i==1&!L[1]), #L]), isprime(t=vector(d, i, L[v[i]])*u)||next; reqpal & !isprime(A004086(t)) & next; list & print1(t", "); n--||return(t)))}
    

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

Original entry on oeis.org

3, 5, 43, 53, 353, 433, 443, 3343, 3433, 3533, 5333, 5443, 33343, 33353, 33533, 34543, 35353, 35533, 35543, 43543, 44453, 44533, 44543, 45343, 45433, 45533, 45553, 53353, 53453, 54443, 55333, 55343, 333433, 333533, 334333, 335453, 343333, 343433, 343543, 344353, 344453, 344543, 345533, 353333, 353443, 353453, 354353, 354443
Offset: 1

Views

Author

M. F. Hasler, Nov 05 2011

Keywords

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(4*10^5) | Set(Intseq(p)) subset [3..5]]; // Bruno Berselli, Nov 07 2011
  • Mathematica
    Join[{3,5},Select[Flatten[Table[FromDigits/@(Join[#,{3}]&/@ Tuples[ {3,4,5},n]),{n,5}]],PrimeQ]] (* Harvey P. Dale, Aug 31 2015 *)
  • PARI
    a(n, list=0, L=[3, 4, 5], reqpal=0)={my(t); for(d=1, 1e9, u=vector(d, i, 10^(d-i))~; forvec(v=vector(d, i, [1+(i==1&!L[1]), #L]), isprime(t=vector(d, i, L[v[i]])*u) || next; reqpal & !isprime(A004086(t)) & next; list & print1(t", "); n--||return(t)))}
    

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.

A199346 Primes having only {3, 4, 6} as digits.

Original entry on oeis.org

3, 43, 433, 443, 463, 643, 3343, 3433, 3463, 3643, 4363, 4463, 4643, 4663, 6343, 33343, 36343, 36433, 36643, 43633, 44633, 46633, 46643, 46663, 63443, 63463, 64333, 64433, 64633, 64663, 66343, 66463, 66643, 333433, 334333, 334363, 334643, 336463, 336643, 343333, 343433, 344363, 346433, 363343, 363463, 364333, 364433, 364643
Offset: 1

Views

Author

M. F. Hasler, Nov 05 2011

Keywords

Comments

All terms end in 3 and have a number of digits '4' that is not divisible by 3.
A020461 is a subsequence. - Vincenzo Librandi, Jul 29 2015

Crossrefs

Cf. similar sequences listed in A199340.

Programs

  • Magma
    [p: p in PrimesUpTo(4*10^5) | Set(Intseq(p)) subset [3, 4, 6]]; // Vincenzo Librandi, Jul 29 2015
  • Mathematica
    Select[Flatten[Table[FromDigits/@(Flatten[{#,3},1]&/@Tuples[{3,4,6},n]),{n,0,5}]],PrimeQ] (* Harvey P. Dale, Jan 01 2013 *)
    Select[Prime[Range[10^5]], Complement[IntegerDigits[#], {3, 4, 6}]=={}&] (* Vincenzo Librandi, Jul 28 2015 *)
  • PARI
    a(n, list=0, L=[3, 4, 6], reqpal=0)={my(t); for(d=1, 1e9, u=vector(d, i, 10^(d-i))~; forvec(v=vector(d, i, [1+(i==1&!L[1]), #L]), isprime(t=vector(d, i, L[v[i]])*u) || next; reqpal & !isprime(A004086(t)) & next; list & print1(t", "); n--||return(t)))}
    

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

Original entry on oeis.org

3, 7, 37, 43, 47, 73, 337, 347, 373, 433, 443, 733, 743, 773, 3343, 3347, 3373, 3433, 3733, 4337, 4373, 4447, 4733, 7333, 7433, 7477, 33343, 33347, 33377, 33773, 34337, 34747, 37337, 37447, 37747, 43777, 44773, 44777, 47737, 47743, 47777, 73433, 73477, 74377, 74747, 77347, 77377, 77447, 77477, 77743
Offset: 1

Views

Author

M. F. Hasler, Nov 05 2011

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Flatten[Table[FromDigits/@Tuples[{3,4,7},n],{n,5}]],PrimeQ] (* Harvey P. Dale, Jul 31 2012 *)
  • PARI
    a(n, list=0, L=[3, 4, 7], reqpal=0)={my(t); for(d=1, 1e9, u=vector(d, i, 10^(d-i))~; forvec(v=vector(d, i, [1+(i==1&!L[1]), #L]), isprime(t=vector(d, i, L[v[i]])*u) || next; reqpal & !isprime(A004086(t)) & next; list & print1(t", "); n--||return(t)))}

A199348 Primes having only {3, 4, 8} as digits.

Original entry on oeis.org

3, 43, 83, 383, 433, 443, 883, 3343, 3433, 3833, 4483, 8443, 33343, 34483, 34843, 34883, 38333, 38833, 44383, 44483, 44843, 48383, 48883, 83383, 83443, 83833, 83843, 84443, 88843, 88883, 333383, 333433, 334333, 334843, 338383, 343333, 343433, 344483, 344843, 348433, 348443, 348833, 348883, 383483, 383833, 384343, 384383, 388483
Offset: 1

Views

Author

M. F. Hasler, Nov 05 2011

Keywords

Comments

All terms end in 3 and those > 3 never have the same number of 4's and 8's.

Crossrefs

Programs

  • Mathematica
    Table[Select[FromDigits/@Tuples[{3,4,8},n],PrimeQ],{n,6}]//Flatten (* Harvey P. Dale, Apr 09 2022 *)
  • PARI
    a(n, list=0, L=[3, 4, 8], reqpal=0)={my(t); for(d=1, 1e9, u=vector(d, i, 10^(d-i))~; forvec(v=vector(d, i, [1+(i==1&!L[1]), #L]), isprime(t=vector(d, i, L[v[i]])*u) || next; reqpal & !isprime(A004086(t)) & next; list & print1(t", "); n--||return(t)))}

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

Original entry on oeis.org

11, 61, 101, 601, 661, 1061, 1601, 6011, 6101, 6661, 10061, 10111, 10601, 11161, 16001, 16061, 16111, 16661, 60101, 60161, 60601, 60611, 60661, 61001, 66161, 66601, 101111, 101161, 101611, 106661, 110161, 111611, 116101, 160001, 161611, 166601, 600011, 600101, 600601, 601061, 610661, 611011, 611101, 611111
Offset: 1

Views

Author

M. F. Hasler, Nov 05 2011

Keywords

Crossrefs

Programs

  • Mathematica
    Select[FromDigits/@Tuples[{0,1,6},6],PrimeQ] (* Harvey P. Dale, Dec 25 2018 *)
  • PARI
    {L=[0,1,6];for(d=1,6,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)&print1(t",")))} /* see A199327 for a function a() */

A199302 Palindromic primes in the sense of A007500 with digits '0', '1' and '2' only.

Original entry on oeis.org

2, 11, 101, 1021, 1201, 110221, 111211, 112111, 120121, 121021, 122011, 1000211, 1010201, 1020101, 1022011, 1022201, 1101211, 1102111, 1102201, 1111021, 1112011, 1120001, 1120121, 1120211, 1121011, 1201021, 1201111, 1210211, 1212121, 1221221, 10002121
Offset: 1

Views

Author

M. F. Hasler, Nov 04 2011

Keywords

Comments

All terms except for the initial 2 start and end in the digit 1.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(10^8) | Set(Intseq(p)) subset [0..2] and IsPrime(Seqint(Reverse(Intseq(p))))];  // Bruno Berselli, Nov 07 2011
    
  • PARI
    allow=Vec("012");forprime(p=1,default(primelimit),setminus( Set( Vec(Str( p ))),allow)&next;isprime(A004086(p))&print1(p",")) /* better use the much more efficient code below */
    
  • PARI
    a(n=50,list=0,L=[0,1,2],needpal=1)={ for(d=1,1e9, u=vector(d,i,10^(d-i))~; forvec(v=vector(d,i,[1+(i==1&!L[1]),#L]), isprime(t=vector(d,i,L[v[i]])*u) || next; needpal & !isprime(A004086(t)) & next; list & print1(t","); n-- || return(t)))}  \\ M. F. Hasler, Nov 06 2011
    
  • Python
    from itertools import count, islice, product
    from sympy import isprime
    def A199302_gen(): return (n for n in (int(t+''.join(s)) for l in count(0) for t in '12' for s in product('012',repeat=l)) if isprime(n) and isprime(int(str(n)[::-1])))
    A199302_list = list(islice(A199302_gen(),20)) # Chai Wah Wu, Jan 04 2022

A199306 Palindromic primes in the sense of A007500 with digits '0', '1' and '6' only.

Original entry on oeis.org

11, 101, 1061, 1601, 10061, 10601, 11161, 16001, 16061, 16111, 16661, 101611, 106661, 116101, 166601, 1011601, 1016011, 1016611, 1061101, 1066111, 1106101, 1110611, 1111661, 1116601, 1160111, 1160611, 1166101, 1600061, 1611161, 1616161, 1660661, 1661111, 10011101, 10100161, 10106111
Offset: 1

Views

Author

M. F. Hasler, Nov 06 2011

Keywords

Comments

All terms start and end with the digit '1'. This fact is used in the given PARI program.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(10^8) | Set(Intseq(p)) subset [0,1,6] and IsPrime(Seqint(Reverse(Intseq(p))))]; // Bruno Berselli, Nov 07 2011
  • PARI
    a(n=50,list=0,L=[0,1,6])={ for(d=1,1e9, my(t,u=vector(d-1,i,10^(d-i))~,o=10^d+1);forvec(v=vector(#u,i,[1,#L]),isprime(t=o+vector(#u,i,L[v[i]])*u) || next; isprime(A004086(t)) || next; list & print1(t", "); n-- || return(t)))}  \\ M. F. Hasler, Nov 07 2011
    

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