OFFSET
1,1
COMMENTS
Primes of the form (1+8^k) m + 1 where m+1 < 8^k < 8(m+1). - Robert Israel, May 24 2017
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
2 and 3 in base 8 are 2_8 and 3_8, and concat(2,3) = 23_8 in base 10 is 19;
8 and 9 in base 8 are 10_8 and 11_8 and concat(10,11) = 1011_8 in base 10 is 521.
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=1..1000);
MATHEMATICA
With[{b = 8}, Select[Map[FromDigits[Flatten@ IntegerDigits[#, b], b] &, Partition[Range@ 250, 2, 1]], PrimeQ]] (* Michael De Vlieger, May 25 2017 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, May 24 2017
STATUS
approved