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

A050719 Inserting a digit '9' between adjacent digits of n makes a prime.

Original entry on oeis.org

11, 13, 17, 19, 23, 37, 41, 49, 53, 59, 61, 77, 91, 97, 131, 157, 167, 169, 173, 181, 191, 193, 197, 211, 227, 239, 259, 307, 311, 319, 323, 337, 349, 371, 379, 413, 419, 427, 431, 433, 449, 457, 467, 481, 491, 493, 499, 503, 517, 533, 539, 547, 563, 569, 571
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Examples

			181 becomes 1(9)8(9)1 which is prime 19891.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10,1000],PrimeQ[FromDigits[Riffle[IntegerDigits[#],9]]]&] (* Harvey P. Dale, Oct 29 2014 *)

Extensions

Offset changed 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

A159236 Primes that remain prime when a 0 is inserted between every pair of adjacent digits.

Original entry on oeis.org

11, 13, 17, 19, 37, 41, 53, 59, 61, 67, 71, 79, 89, 97, 107, 109, 113, 131, 151, 167, 179, 193, 199, 211, 257, 277, 293, 313, 337, 359, 373, 383, 389, 409, 457, 479, 577, 599, 613, 617, 659, 661, 673, 691, 701, 709, 727, 739, 751, 757, 827, 829, 839, 863, 883
Offset: 1

Views

Author

Lekraj Beedassy, Apr 06 2009

Keywords

Comments

Prime terms in A050674.
See A119680 for the primes obtained by inserting a 0 between each pair of adjacent digits. - Rémy Sigrist, Oct 08 2017

Examples

			409 is prime, and so is 40009 ( 4(0)0(0)9 ). Hence 409 is in the sequence.
		

Crossrefs

Programs

  • Maple
    Lton := proc(L) add( op(i,L)*10^(i-1),i=1..nops(L)) ; end: pad0 := proc(n) dgs := convert(n,base,10) ; L := [op(1,dgs)] ; for i from 2 to nops(dgs) do L := [op(L),0,op(i,dgs)] ; od: Lton(L) ; end: for i from 5 to 400 do p := ithprime(i) ; if isprime( pad0(p) ) then printf("%d,",p) ; fi; od: # R. J. Mathar, Apr 07 2009
  • Mathematica
    Select[Prime[Range[5,200]],PrimeQ[FromDigits[Riffle[ IntegerDigits[ #],0]]]&] (* Harvey P. Dale, Feb 19 2015 *)
  • Python
    from sympy import isprime
    def ok(n):
        return n > 10 and isprime(n) and isprime(int("0".join(list(str(n)))))
    print([k for k in range(900) if ok(k)]) # Michael S. Branicky, Jul 11 2022

Extensions

Edited by N. J. A. Sloane, Apr 07 2009
Extended by R. J. Mathar, Apr 07 2009

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
Showing 1-10 of 22 results. Next