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

A050674 Inserting a digit '0' between adjacent digits of n makes a prime.

Original entry on oeis.org

11, 13, 17, 19, 37, 41, 49, 53, 59, 61, 67, 71, 79, 89, 97, 107, 109, 113, 131, 133, 151, 161, 167, 179, 193, 199, 211, 217, 221, 247, 257, 259, 277, 287, 289, 293, 313, 319, 323, 337, 343, 359, 373, 377, 383, 389, 409, 457, 469, 479, 481, 493, 511, 527, 553
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Examples

			373 becomes 3(0)7(0)3 which is prime 30703.
		

Crossrefs

Programs

  • Mathematica
    (* This program works in Mathematica 6.0 and later *)
    Select[Range[11, 1000,2], PrimeQ[FromDigits[Riffle[IntegerDigits[#], 0]]] &] (* T. D. Noe, Dec 22 2010 *)
    (* The following program has been tested in Mathematica 5.1 and it works *)
    Reap[c = 0; d = 0; Do[If[MemberQ[{1, 3, 7, 9}, Mod[n, 10]], id = IntegerDigits[n]; Do[id[[k]] = {id[[k]], d}, {k, Length[id] - 1}]; If[PrimeQ[FromDigits[Flatten[id]]], Sow[n]; c++; If[c > 999, Break[]]]], {n, 11, 20000}]][[2,1]] (* Zak Seidov, Dec 22 2010 *)

Extensions

Offset set to 1 by Georg Fischer, Oct 15 2019

A050711 Inserting a digit '1' between adjacent digits of n makes a prime.

Original entry on oeis.org

13, 21, 31, 33, 37, 49, 63, 67, 69, 79, 81, 91, 99, 113, 117, 119, 123, 131, 137, 141, 159, 167, 177, 179, 183, 201, 203, 207, 209, 221, 233, 237, 239, 249, 257, 261, 263, 267, 273, 287, 291, 303, 309, 329, 339, 351, 353, 357, 387, 401, 407, 413, 417, 423
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Examples

			303 becomes 3(1)0(1)3 which is prime 31013.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10,500],PrimeQ[FromDigits[Riffle[IntegerDigits[#],1]]]&] (* Harvey P. Dale, Apr 25 2019 *)
  • PARI
    is(n) = if(gcd(10, n%10) > 1 || n < 10, return(0)); my(d = digits(n), v = vector(2*#d - 1, i, if(i % 2 == 1, d[i>>1 + 1], 1))); isprime(fromdigits(v)) \\ David A. Corneth, Oct 15 2019

Extensions

Offset set to 1 by Georg Fischer, Oct 15 2019

A050712 Inserting a digit '2' between adjacent digits of n makes a prime.

Original entry on oeis.org

17, 23, 27, 29, 41, 51, 53, 77, 81, 83, 87, 89, 99, 127, 133, 139, 141, 157, 171, 181, 183, 189, 193, 207, 213, 219, 229, 261, 271, 277, 291, 307, 309, 331, 333, 337, 343, 349, 361, 403, 421, 423, 427, 433, 477, 481, 489, 493, 499, 501, 507, 511, 517, 523
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Examples

			333 becomes 3(2)3(2)3 which is prime 32323.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10,600],PrimeQ[FromDigits[Riffle[IntegerDigits[#],2]]]&] (* Harvey P. Dale, Sep 13 2014 *)

Extensions

Offset changed to 1 by Georg Fischer, Oct 15 2019

A050716 Inserting a digit '6' between all adjacent digits of k makes a prime.

Original entry on oeis.org

13, 17, 23, 29, 37, 41, 43, 47, 53, 59, 61, 71, 79, 83, 97, 101, 103, 107, 109, 127, 131, 133, 139, 151, 157, 161, 173, 193, 211, 221, 223, 227, 251, 269, 281, 283, 301, 307, 311, 323, 329, 347, 349, 353, 371, 377, 401, 421, 457, 463, 479, 481, 487, 517, 523
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Examples

			481 becomes 4(6)8(6)1 becomes prime 46861.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10,600],PrimeQ[FromDigits[Riffle[IntegerDigits[#],6]]]&] (* Harvey P. Dale, Aug 26 2013 *)

Extensions

Definition clarified by Harvey P. Dale, Aug 26 2013
Offset changed by Andrew Howroyd, Aug 14 2024

A050718 Inserting a digit '8' between adjacent decimal digits of n makes a prime.

Original entry on oeis.org

11, 21, 23, 33, 39, 47, 57, 63, 77, 81, 83, 87, 93, 109, 111, 127, 129, 141, 153, 157, 177, 201, 207, 211, 213, 223, 229, 237, 267, 279, 303, 313, 319, 321, 327, 373, 417, 421, 433, 441, 447, 459, 471, 477, 483, 489, 499, 519, 541, 567, 577, 579, 589, 607
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Comments

Arguably 2, 3, 5, and 7 should be in this sequence. - Charles R Greathouse IV, Sep 25 2012

Examples

			177 becomes 1(8)7(8)7 which is the prime 18787.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10,700],PrimeQ[FromDigits[Riffle[IntegerDigits[#],8]]]&] (* Harvey P. Dale, Sep 18 2013 *)

A050713 Inserting a digit '3' between adjacent digits of n makes a prime.

Original entry on oeis.org

11, 17, 19, 23, 29, 31, 37, 41, 43, 49, 61, 73, 79, 89, 97, 103, 107, 131, 137, 139, 157, 163, 181, 191, 193, 209, 211, 233, 239, 241, 251, 257, 259, 263, 281, 283, 307, 331, 353, 367, 379, 391, 397, 407, 413, 427, 431, 463, 493, 521, 523, 529, 547, 563, 569
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Examples

			407 becomes 4(3)0(3)7 which is prime 43037.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10,600],PrimeQ[FromDigits[Riffle[IntegerDigits[#],3]]]&] (* Harvey P. Dale, Dec 23 2023 *)

A050714 Inserting a digit '4' between adjacent digits of n makes a prime.

Original entry on oeis.org

19, 21, 37, 39, 43, 49, 51, 57, 61, 63, 67, 73, 91, 97, 113, 119, 123, 129, 131, 137, 147, 149, 153, 159, 171, 177, 183, 197, 203, 209, 227, 243, 257, 279, 281, 287, 293, 311, 317, 353, 359, 369, 377, 381, 383, 387, 389, 399, 401, 429, 449, 453, 459, 461, 467
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Examples

			389 becomes 3(4)8(4)9 which is prime 34849.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10,500],PrimeQ[FromDigits[Riffle[IntegerDigits[#],4]]]&] (* Harvey P. Dale, Nov 03 2024 *)

A050717 Inserting a digit '7' between adjacent digits of n makes a prime.

Original entry on oeis.org

13, 19, 21, 27, 33, 39, 49, 51, 57, 63, 67, 73, 87, 91, 97, 107, 137, 141, 147, 153, 159, 191, 197, 203, 207, 219, 221, 227, 249, 263, 273, 279, 311, 323, 327, 339, 351, 353, 359, 381, 389, 429, 477, 479, 497, 503, 507, 513, 519, 521, 533, 551, 569, 573, 593
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Examples

			E.g. 477 becomes 4(7)7(7)7 which is prime 47777.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10, 500], PrimeQ[FromDigits[Riffle[IntegerDigits[#], 7]]]&] (* Georg Fischer, Oct 15 2019 after Harvey P. Dale *)

Extensions

Offset changed to 1 by Georg Fischer, Oct 15 2019

A217044 Primes that remain prime when a single "2" digit is inserted between any two adjacent decimal digits.

Original entry on oeis.org

17, 23, 29, 41, 53, 83, 89, 101, 113, 131, 137, 149, 251, 359, 401, 419, 443, 461, 647, 719, 797, 821, 863, 941, 1289, 1823, 2111, 2543, 3323, 3413, 4013, 4463, 4751, 5021, 5501, 5807, 6299, 6827, 7229, 7643, 7883, 8039, 8219, 8609, 8837, 9221, 9227, 9461, 9623
Offset: 1

Views

Author

Paolo P. Lava, Sep 25 2012

Keywords

Examples

			9461 is prime and also 94621, 94261, 92461.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesInInterval(11, 10000) | forall{m: t in [1..#Intseq(p)-1] | IsPrime(m) where m is (Floor(p/10^t)*10+2)*10^t+p mod 10^t}]; // Bruno Berselli, Sep 26 2012
    
  • Maple
    with(numtheory);
    A217044:=proc(q,x)
    local a,b,c,i,n,ok;
    for n from 5 to q do
    a:=ithprime(n); b:=0;
    while a>0 do b:=b+1; a:=trunc(a/10); od; a:=ithprime(n); ok:=1;
      for i from 1 to b-1 do
        c:=a+9*10^i*trunc(a/10^i)+10^i*x;
        if not isprime(c) then ok:=0; break; fi; od;
      if ok=1 then print(ithprime(n)); fi;
    od; end:
    A217044(100000,2)
  • Mathematica
    Select[Prime[Range[5,1200]],And@@PrimeQ[FromDigits/@Table[ Insert[ IntegerDigits[ #],2,i],{i,2,IntegerLength[#]}]]&] (* Harvey P. Dale, Oct 09 2012 *)
  • PARI
    is(n)=my(v=concat([""], digits(n))); for(i=2, #v-1, v[1]=Str(v[1], v[i]); v[i]=2; if(i>2, v[i-1]=""); if(!isprime(eval(concat(v))), return(0))); isprime(n)  \\ Charles R Greathouse IV, Sep 26 2012

A217047 Primes that remain prime when a single "8" digit is inserted between any two adjacent digits.

Original entry on oeis.org

11, 23, 47, 83, 131, 173, 179, 233, 353, 389, 521, 569, 641, 683, 839, 887, 911, 971, 983, 1229, 1289, 1913, 2087, 2663, 2837, 2879, 3329, 3671, 3677, 3803, 3821, 4259, 4409, 4817, 4871, 4889, 5237, 5477, 5693, 6449, 6581, 6863, 7283, 7487, 7583, 7823, 7853
Offset: 1

Views

Author

Paolo P. Lava, Sep 25 2012

Keywords

Comments

These numbers are either isolated primes or the smaller of a pair of twin primes. - Davide Rotondo, Mar 11 2025

Examples

			325421 is prime and also 3254281, 3254821, 3258421, 3285421 and 3825421.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesInInterval(11,8000) | forall{m: t in [1..#Intseq(p)-1] | IsPrime(m) where m is (Floor(p/10^t)*10+8)*10^t+p mod 10^t}]; // Bruno Berselli, Sep 26 2012
    
  • Maple
    A217044:=proc(q,x) local a,b,c,d,i,k,n,ok,v; v:=[]; a:=10;
    for n from 1 to q do a:=nextprime(a); d:=length(a); ok:=1;
    for k from 1 to d-1 do b:=a mod 10^k; c:=trunc(a/10^k); i:=x*10^k+b; i:=c*10^length(i)+i;
    if not isprime(i) then ok:=0; break; fi; od; if ok=1 then v:=[op(v),a]; fi; od; op(v); end:
    A217044(10^3,8);
  • PARI
    is(n)=my(v=concat([""],digits(n)));for(i=2,#v-1,v[1]=Str(v[1], v[i]); v[i]=8;if(i>2,v[i-1]="");if(!isprime(eval(concat(v))), return(0)));isprime(n) \\ Charles R Greathouse IV, Sep 25 2012
    
  • Python
    from sympy import isprime, primerange
    def ok(p):
        if p < 10: return False
        s = str(p)
        return all(isprime(int(s[:i] + "8" + s[i:])) for i in range(1, len(s)))
    def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)]
    print(aupto(7854)) # Michael S. Branicky, Nov 23 2021
Showing 1-10 of 22 results. Next