OFFSET
1,1
EXAMPLE
1 and 2 in base 8 are 1 and 2 and concat(2,1) = 21 in base 10 is 17;
7 and 8 in base 8 are 7 and 10 and concat(10,7) = 107 in base 10 is 71.
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, 8), i=0..1000);
MATHEMATICA
With[{b = 8}, Select[Map[FromDigits[Flatten@ IntegerDigits[#, b], b] &, Reverse /@ Partition[Range[0, 250], 2, 1]], PrimeQ]] (* Michael De Vlieger, May 25 2017 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, May 24 2017
STATUS
approved