login
A287311
Primes that can be generated by the concatenation in base 8, in descending order, of two consecutive integers read in base 10.
0
17, 53, 71, 1039, 1429, 1559, 1949, 2339, 2729, 3119, 3769, 4159, 33857, 34883, 40013, 41039, 48221, 50273, 54377, 58481, 61559, 63611, 69767, 70793, 74897, 76949, 84131, 86183, 89261, 96443, 100547, 101573, 104651, 106703, 110807, 111833, 112859, 117989, 120041
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
Sequence in context: A061242 A062343 A176254 * A285225 A044119 A044500
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, May 24 2017
STATUS
approved