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-9 of 9 results.

A084667 Primes which are a concatenation of n and prime(n).

Original entry on oeis.org

23, 47, 613, 1237, 1759, 1861, 2383, 27103, 30113, 35149, 36151, 41179, 42181, 45197, 46199, 54251, 56263, 57269, 58271, 61283, 71353, 82421, 83431, 85439, 92479, 93487, 99523, 115631, 117643, 119653, 121661, 123677, 127709, 136769, 141811, 145829, 147853
Offset: 1

Views

Author

Zak Seidov, Jun 29 2003

Keywords

Comments

Is the sequence infinite? - Zak Seidov, Nov 19 2013

Examples

			a(3) = 613 because prime(6) = 13 and 613 is prime,
a(1000) = 761077477 because prime(7610) = 77477 and 761077477 is prime.
a(20000) = 2092142886529 because prime(209214) = 2886529 and 2092142886529 is prime.
		

Crossrefs

Cf. A084669.

Programs

  • Magma
    [p: n in [1..200] | IsPrime(p) where p is Seqint(Intseq(NthPrime(n)) cat Intseq(n))]; // Bruno Berselli, Sep 15 2015
    
  • Mathematica
    Select[Table[FromDigits[Flatten[{IntegerDigits[n], IntegerDigits[Prime[n]]}]], {n, 1, 500}], PrimeQ] (* Alonso del Arte, Sep 22 2004 *)
  • PARI
    lista(NN) = for(k=1,NN,p=prime(k);if(isprime(j=k*10^#digits(p)+p),print1(j, ", "))) \\ Jinyuan Wang, Apr 05 2019

A280388 Primes formed from the concatenation of n and previousprime(n).

Original entry on oeis.org

43, 53, 97, 107, 1613, 2423, 3331, 3631, 4241, 4643, 5147, 5347, 5653, 5953, 6361, 6661, 6761, 6967, 7573, 7673, 7873, 8179, 8783, 9689, 102101, 106103, 108107, 111109, 114113, 116113, 123113, 125113, 129127, 130127, 135131, 137131, 144139, 145139, 147139, 148139
Offset: 1

Views

Author

K. D. Bajpai, Jan 01 2017

Keywords

Examples

			43 is in the sequence because it is prime formed from the concatenation of 4 and 3, where 3 is largest prime < 4.
1613 is in the sequence because it is prime formed from the concatenation of 16 and 13, where 13 is largest prime < 16.
		

Crossrefs

Programs

  • Maple
    with(numtheory): select( isprime,[seq((n*10^floor(evalf(log10(prevprime(n))+1, 100))+prevprime(n)), n=3..500)]);
    P:=proc(i) local a, n, c; c:=1; for n from 3 by 1 to i  do  a:=n*10^floor(evalf(log10(prevprime(n))+1, 100))+prevprime(n);if (isprime(a)) then lprint(c,a);c:=c+1;  fi;od; end: P(10000);
  • Mathematica
    Select[Table[FromDigits[Join[IntegerDigits[n],IntegerDigits[NextPrime[n,-1]]]],{n,200}],PrimeQ] (* Harvey P. Dale, Oct 22 2022 *)

A084670 Numbers k such that concatenation of prime(k) and k is prime.

Original entry on oeis.org

3, 9, 19, 21, 37, 63, 77, 81, 87, 107, 121, 133, 177, 201, 211, 213, 217, 281, 293, 303, 321, 327, 329, 333, 351, 391, 393, 439, 481, 503, 507, 519, 543, 547, 551, 561, 579, 581, 599, 621, 639, 657, 663, 667, 711, 721, 727, 743, 793, 813, 819, 827, 829, 831, 837
Offset: 1

Views

Author

Zak Seidov, Jun 29 2003

Keywords

Examples

			9 is a term because prime(9) = 23 and concatenation of 23 and 9 is prime
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000],PrimeQ[Prime[#]10^IntegerLength[#]+#]&] (* Harvey P. Dale, Apr 09 2022 *)
  • PARI
    is(k) = ispseudoprime(eval(Str(prime(k), k))); \\ Jinyuan Wang, Apr 10 2020
    
  • Python
    from sympy import isprime, prime
    def aupto(lim):
      return [k for k in range(1, lim+1) if isprime(int(str(prime(k))+str(k)))]
    print(aupto(837)) # Michael S. Branicky, Mar 09 2021

Extensions

More terms from Jinyuan Wang, Apr 10 2020

A236551 Primes formed from concatenation of PrimePi(n) and prime(n).

Original entry on oeis.org

2, 13, 311, 313, 419, 641, 643, 647, 653, 761, 983, 997, 9103, 11131, 11149, 12157, 12163, 14197, 15227, 15233, 18307, 18311, 18313, 20353, 20359, 21379, 21383, 21397, 22409, 23431, 24499, 25523, 25541, 26557, 29599, 30631, 30643, 30661, 30677, 31727, 33773
Offset: 1

Views

Author

K. D. Bajpai, Jan 28 2014

Keywords

Examples

			pi(6) = 3: prime(6) = 13. Concatenation of 3 and 13 gives 313 which is prime and appears in the sequence.
pi(8) = 4: prime(6) = 19. Concatenation of 4 and 19 gives 419 which is prime and appears in the sequence.
		

Crossrefs

Cf. A030458 (primes: concatenation of n and n+1), A084667 (primes: concatenation of n and prime(n)), A084669 (primes: concatenation of prime(n) and n).

Programs

  • Maple
    with(StringTools): with(numtheory): KD := proc() local a,b,d; a:=pi(n); b:=ithprime(n); d:=parse(cat(a,b));  if isprime (d) then RETURN (d); fi;  end: seq(KD(), n=1..300);
  • Mathematica
    Select[Table[FromDigits[Flatten[{IntegerDigits[PrimePi[n]], IntegerDigits[Prime[n]]}]], {n, 100}], PrimeQ] (* Alonso del Arte, Jan 28 2014 *)

A262205 Primes that are the concatenation of n, prime(n) and n.

Original entry on oeis.org

353, 7177, 9239, 113111, 5324153, 5726957, 5927759, 6934769, 8141981, 9750997, 101547101, 123677123, 131739131, 153883153, 1791063179, 1891129189, 2011229201, 2071279207, 2311453231, 2491579249, 2631669263, 2691723269, 2791801279
Offset: 1

Views

Author

Altug Alkan, Sep 15 2015

Keywords

Examples

			353 is a prime number that is concatenation of 3, prime(3) and 3.
7177 is a prime number that is concatenation of 7, prime(7) and 7.
9239 is a prime number that is concatenation of 9, prime(9) and 9.
		

Crossrefs

Programs

  • Magma
    [p: n in [1..400] | IsPrime(p) where p is Seqint(Intseq(n) cat Intseq(NthPrime(n)) cat Intseq(n))]; // Bruno Berselli, Sep 15 2015
  • Mathematica
    f[n_] := Block[{d = IntegerDigits@ n, p = IntegerDigits@ Prime@ n}, FromDigits@ Join[d, p, d]]; Select[f /@ Range@ 300, PrimeQ] (* Michael De Vlieger, Sep 15 2015 *)
  • PARI
    for(n=1, 1e3, if(isprime(k=eval(Str(n, prime(n), n))), print1(k", ")))
    

A280357 Primes formed from concatenating nextprime(n) and n.

Original entry on oeis.org

53, 2927, 3733, 4139, 5347, 5351, 5953, 6761, 6763, 9791, 113111, 127123, 131129, 137131, 149143, 179173, 191189, 211199, 223211, 223217, 223219, 233231, 239233, 239237, 263257, 277273, 281279, 307301, 331319, 347341, 359353, 359357, 419417, 431423, 431429, 479473
Offset: 1

Views

Author

K. D. Bajpai, Jan 04 2017

Keywords

Comments

Alternatively: Primes formed from reverse concatenation of n and nextprime(n).

Examples

			53 is in the sequence because it is prime formed from concatenation of 5 and 3, where 5 is next prime after 3.
3733 is in the sequence because it is prime formed from concatenation of 37 and 33, where 37 is next prime after 33.
		

Crossrefs

Programs

  • Magma
    [p : n in[1 .. 200] | IsPrime(p) where p is Seqint(Intseq(n) cat Intseq(NextPrime(n)))];
  • Mathematica
    Select[Table[FromDigits[Join[IntegerDigits[NextPrime[n]], IntegerDigits[n]]],{n,1000}], PrimeQ]

A280376 Primes formed from the concatenation of n and nextprime(n).

Original entry on oeis.org

23, 67, 811, 911, 1213, 2729, 3137, 3637, 4243, 4447, 4547, 5153, 5659, 6367, 6871, 6971, 7879, 8389, 8689, 9397, 9497, 9697, 98101, 102103, 104107, 105107, 108109, 115127, 117127, 118127, 123127, 126127, 132137, 138139, 150151, 151157, 154157, 156157, 157163
Offset: 1

Views

Author

K. D. Bajpai, Jan 01 2017

Keywords

Examples

			811 is in the sequence because it is prime formed from the concatenation of 8 and 11, where 11 is the prime next to 8.
3137 is in the sequence because it is prime formed from the concatenation of 31 and 37, where 37 is the prime next to 31.
		

Crossrefs

Subsequence of primes of A049852.

Programs

  • Magma
    [p : n in[1 .. 200] | IsPrime (p) where p is Seqint(Intseq (NextPrime(n)) cat Intseq(n))];
  • Maple
    f:= proc(n) local x,p;
       p:= nextprime(n);
       x:= n*10^(1+ilog10(p))+p;
       if isprime(x) then x else NULL fi
    end proc:
    map(f, [$1..200]); # Robert Israel, Jan 01 2017
  • Mathematica
    Select[Table[FromDigits[Join[IntegerDigits[n], IntegerDigits[NextPrime[n]]]], {n,500}], PrimeQ]

A280576 Primes formed from the concatenation of previousprime(n) and n.

Original entry on oeis.org

23, 79, 3137, 3739, 4751, 6163, 8387, 8389, 109111, 113117, 113123, 151153, 151157, 157163, 167173, 173177, 181183, 199207, 199211, 211213, 211217, 211219, 233239, 241249, 251257, 257263, 263267, 263269, 271273, 271277, 277279, 283289, 317321, 317323, 317327
Offset: 1

Views

Author

K. D. Bajpai, Jan 05 2017

Keywords

Examples

			79 is in the sequence because it is a prime formed from the concatenation of 7 and 9, where 7 is the largest prime < 9.
8387 is in the sequence because it is a prime formed from the concatenation of 83 and 87, where 83 is the largest prime < 87.
		

Crossrefs

Programs

  • Magma
    [p : n in[3..200] | IsPrime (p) where p is Seqint (Intseq (n) cat Intseq (PreviousPrime (n)))];
    
  • Mathematica
    Select[Table[FromDigits[Join[IntegerDigits[Prime[PrimePi[n - 1]]], IntegerDigits[n]]], {n,3,1000}], PrimeQ]
  • PARI
    terms(n) = my(i=0, x=3); while(1, my(cc=eval(Str(precprime(x-1), x))); if(ispseudoprime(cc), print1(cc, ", "); i++); if(i==n, break); x++)
    /* Print initial 40 terms as follows: */
    terms(40) \\ Felix Fröhlich, Jan 05 2017

A381126 Primes that are the concatenation of prime(p) and p where p is a prime.

Original entry on oeis.org

53, 6719, 15737, 587107, 1297211, 1823281, 1913293, 3067439, 3593503, 3943547, 4397599, 5503727, 5651743, 6353827, 6361829, 6823877, 7109911, 7283929, 7523953, 85131061, 85271063, 87611093, 88071097, 104331277, 125031493, 128411531, 130031549, 133311583, 141071663
Offset: 1

Views

Author

Maja Gwozdz, Feb 14 2025

Keywords

Examples

			1297211 is a term since it is prime and is the concatenation of prime(p) = 1297 and p = 211.
		

Crossrefs

Subsequence of A084669.

Programs

  • Maple
    f:= p-> (h-> `if`(andmap(isprime, [p, h]), h, [][]))(parse(cat(ithprime(p), p))):
    map(f, [$1..2000])[];  # Alois P. Heinz, Feb 15 2025
  • PARI
    a381126(limit) = {forprime (p=2, limit, my(pd=digits(p), ppd=digits(prime(p)), pc=fromdigits(concat(ppd,pd))); if(isprime(pc), print1(pc,", ")))};
    a381126(2000) \\ Hugo Pfoertner, Feb 14 2025
  • Python
    from sympy import isprime, primerange, prime
    def a(limit: int) -> list[int]:
        result: list[int] = []
        for p in primerange(2, limit):
            pth_prime = prime(p)
            rc_val = int(f"{pth_prime}{p}")
            if isprime(rc_val):
                result.append(rc_val)
        return result
    print(a(1700))
    
Showing 1-9 of 9 results.