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.

This page as a plain text file.
%I A256176 #15 Nov 17 2018 17:41:57
%S A256176 67,89,7879,8081,9091,9293,186187,188189,276277,278279,426427,428429,
%T A256176 438439,440441,450451,452453,600601,602603,606607,608609,798799,
%U A256176 800801,816817,818819,858859,860861,936937,938939,960961,962963,11401141,11421143
%N A256176 Primes formed by concatenating n with n+1 and by concatenating n+2 with n+3.
%C A256176 Subsequence of A030458.
%C A256176 First bisection: A156121.
%H A256176 Bui Quang Tuan, <a href="/A256176/b256176.txt">Table of n, a(n) for n = 1..100</a>
%e A256176 67, 89 are in the sequence because they are primes and 6, 7, 8, 9 are four consecutive integers.
%e A256176 7879, 8081 are in the sequence because they are primes and 78, 79, 80, 81 are four consecutive integers.
%e A256176 186187, 188189 are in the sequence because they are primes and 186, 187, 188, 189 are four consecutive integers.
%t A256176 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 *)
%t A256176 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 *)
%o A256176 (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
%K A256176 nonn,base
%O A256176 1,1
%A A256176 _Bui Quang Tuan_, Mar 18 2015