A287307 Primes that can be generated by the concatenation in base 6, in descending order, of two consecutive integers read in base 10.
13, 41, 443, 739, 887, 1109, 9547, 11717, 14321, 16057, 17359, 18661, 19963, 22133, 22567, 23869, 25171, 28643, 29077, 31247, 32983, 33851, 35153, 40361, 43399, 44267, 44701, 45569, 287933, 290527, 303497, 306091, 311279, 319061, 337219, 345001, 389099, 391693
Offset: 1
Examples
1 and 2 in base 6 are 1 and 2 and concat(2,1) = 21 in base 10 is 13; 5 and 6 in base 6 are 5 and 10 and concat(10,5) = 105 in base 10 is 41.
Programs
-
Maple
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,6),i=0..1000);
-
Mathematica
With[{b = 6}, Select[Map[FromDigits[Flatten@ IntegerDigits[#, b], b] &, Reverse /@ Partition[Range[0, 302], 2, 1]], PrimeQ]] (* Michael De Vlieger, May 23 2017 *)