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.

A256176 Primes formed by concatenating n with n+1 and by concatenating n+2 with n+3.

Original entry on oeis.org

67, 89, 7879, 8081, 9091, 9293, 186187, 188189, 276277, 278279, 426427, 428429, 438439, 440441, 450451, 452453, 600601, 602603, 606607, 608609, 798799, 800801, 816817, 818819, 858859, 860861, 936937, 938939, 960961, 962963, 11401141, 11421143
Offset: 1

Views

Author

Bui Quang Tuan, Mar 18 2015

Keywords

Comments

Subsequence of A030458.
First bisection: A156121.

Examples

			67, 89 are in the sequence because they are primes and 6, 7, 8, 9 are four consecutive integers.
7879, 8081 are in the sequence because they are primes and 78, 79, 80, 81 are four consecutive integers.
186187, 188189 are in the sequence because they are primes and 186, 187, 188, 189 are four consecutive integers.
		

Programs

  • Mathematica
    f[n_] := FromDigits@ Flatten[IntegerDigits /@ Range[n, n + 1]]; {f@ #, f[# + 2]} & /@ Select[Range@ 1200, AllTrue[{f@ #, f[# + 2]}, PrimeQ] &] // Flatten (* Michael De Vlieger, Mar 18 2015 *)
    fd[{a_,b_}]:=FromDigits[Join[IntegerDigits[a],IntegerDigits[b]]]; Select[ {fd[ Take[#,2]],fd[Take[#,-2]]}&/@Partition[Range[1500],4,1],AllTrue[ #,PrimeQ]&]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 17 2018 *)
  • PARI
    lista(nn) = {for (n=1, nn, if (isprime(p=eval(concat(Str(n), Str(n+1)))) && isprime(q=eval(concat(Str(n+2), Str(n+3)))), print1(p, ", ", q, ", ")););} \\ Michel Marcus, Mar 18 2015