OFFSET
1,1
EXAMPLE
1 and 2 in base 5 are 1 and 2 and concat(1,2) = 12 in base 10 is 7;
6 and 7 in base 5 are 11 and 12 and concat(11,12) = 1112 in base 10 is 157.
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, 5), i=1..1000);
MATHEMATICA
With[{b = 5}, Select[Map[FromDigits[Flatten@ IntegerDigits[#, b], b] &, Partition[Range@ 120, 2, 1]], PrimeQ]] (* Michael De Vlieger, May 23 2017 *)
Select[FromDigits[Flatten[#], 5]&/@Partition[IntegerDigits[Range[150], 5], 2, 1], PrimeQ] (* Harvey P. Dale, Nov 25 2020 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, May 23 2017
STATUS
approved