Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 Dec 28 2024 12:16:37
%S 19,101,271,1429,1559,1949,2339,2729,3119,3769,4159,17989,18503,19531,
%T 21587,24671,27241,29297,30839,32381,33409,33923,36493,44203,47287,
%U 51913,55511,64763,286999,289049,293149,295199,301349,305449,323899,332099,336199,350549,375149
%N Primes that can be generated by the concatenation in base 4, in descending order, of two consecutive integers read in base 10.
%H Harvey P. Dale, <a href="/A287303/b287303.txt">Table of n, a(n) for n = 1..1000</a>
%e 3 and 4 in base 4 are 3 and 10 and concat(10,3) = 103 in base 10 is 19;
%e 5 and 6 in base 4 are 11 and 12 and concat(12,11) = 1211 in base 10 are 101.
%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] &, Reverse /@ Partition[Range[0, 370], 2, 1]], PrimeQ]] (* _Michael De Vlieger_, May 23 2017 *)
%t Select[Table[FromDigits[Join[IntegerDigits[n+1,4],IntegerDigits[n,4]],4],{n,1000}],PrimeQ] (* _Harvey P. Dale_, Dec 28 2024 *)
%Y Cf. A000040, A052089.
%K nonn,base,easy
%O 1,1
%A _Paolo P. Lava_, May 23 2017