OFFSET
1,1
LINKS
Bui Quang Tuan, Table of n, a(n) for n = 1..100
EXAMPLE
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.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bui Quang Tuan, Mar 18 2015
STATUS
approved