cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A287309 Primes that can be generated by the concatenation in base 7, in descending order, of two consecutive integers read in base 10.

This page as a plain text file.
%I A287309 #8 May 24 2017 09:14:23
%S A287309 7,23,31,47,449,499,599,1049,1249,1399,1499,1549,1699,1949,1999,2099,
%T A287309 2399,18919,20639,20983,24767,25111,25799,29927,30271,31991,33023,
%U A287309 38183,40591,45751,46439,48847,51599,52631,57791,59167,60887,61231,64327,66047,67079,68111
%N A287309 Primes that can be generated by the concatenation in base 7, in descending order, of two consecutive integers read in base 10.
%e A287309 2 and 3 in base 7 are 2 and 3 and concat(3,2) = 32 in base 10 is 23;
%e A287309 8 and 9 in base 7 are 11 and 12 and concat(12,11) = 1211 in base 10 is 449.
%p A287309 with(numtheory): P:= proc(q,h) local a,b,c,d,k,n; if q=0 then 7 else 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; fi; end: seq(P(i,7),i=0..1000);
%t A287309 With[{b = 7}, Select[Map[FromDigits[Flatten@ IntegerDigits[#, b], b] &, Reverse /@ Partition[Range[0, 200], 2, 1]], PrimeQ]] (* _Michael De Vlieger_, May 23 2017 *)
%Y A287309 Cf. A000040, A052089.
%K A287309 nonn,base,easy
%O A287309 1,1
%A A287309 _Paolo P. Lava_, May 23 2017