%I #8 May 24 2017 09:13:16
%S 11,103,137,239,1171,1301,1951,2081,2341,2731,2861,3121,3251,3511,
%T 16963,17477,20047,21589,23131,26729,30841,34439,40093,43177,43691,
%U 45233,46261,60139,61681,63737,270601,272651,278801,291101,295201,297251,315701,321851,325951
%N Primes that can be generated by the concatenation in base 4, in ascending order, of two consecutive integers read in base 10.
%e 2 and 3 in base 4 are 2 and 3 and concat(2,3) = 23 in base 10 is 11;
%e 6 and 7 in base 4 are 12 and 13 and concat(12,13) = 1213 in base 10 is 103.
%p with(numtheory): P:= proc(q,h) local a,b,c,d,k,n; a:=convert(q+1,base,h); b:=convert(q,base,h); c:=[op(a),op(b)]; d:=0; for k from nops(c) by -1 to 1 do d:=h*d+c[k]; od; if isprime(d) then d; fi; end: seq(P(i,4),i=1..1000);
%t With[{b = 4}, Select[Map[FromDigits[Flatten@ IntegerDigits[#, b], b] &, Partition[Range@ 320, 2, 1]], PrimeQ]] (* _Michael De Vlieger_, May 23 2017 *)
%Y Cf. A000040, A030458.
%K nonn,base,easy
%O 1,1
%A _Paolo P. Lava_, May 23 2017
|