OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
3 and 4 in base 4 are 3 and 10 and concat(10,3) = 103 in base 10 is 19;
5 and 6 in base 4 are 11 and 12 and concat(12,11) = 1211 in base 10 are 101.
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, 4), i=1..1000);
MATHEMATICA
With[{b = 4}, Select[Map[FromDigits[Flatten@ IntegerDigits[#, b], b] &, Reverse /@ Partition[Range[0, 370], 2, 1]], PrimeQ]] (* Michael De Vlieger, May 23 2017 *)
Select[Table[FromDigits[Join[IntegerDigits[n+1, 4], IntegerDigits[n, 4]], 4], {n, 1000}], PrimeQ] (* Harvey P. Dale, Dec 28 2024 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, May 23 2017
STATUS
approved