%I #16 May 05 2016 21:12:54
%S 5,3,23,13,17,19,11,31,47,109,89,571,53,271,149,151,101,409,173,241,
%T 587,337,1091,1303,251,457,431,373,947,1447,2153,577,419,463,797,349,
%U 1019,1063,557,619,2549,2113,3257,331,383,1201,227,1033,2333,3253,1061,7
%N Beginning with 5, rearrangement of odd primes such that every concatenation beginning with the first term is a prime.
%C Conjecture: every odd prime is a member.
%H Robert Israel, <a href="/A083756/b083756.txt">Table of n, a(n) for n = 1..300</a>
%p xcat:= proc(a,b) 10^(1+ilog10(b))*a+b end proc:
%p A[1]:= 5; C:= A[1]:
%p Cands:= select(isprime, [3,seq(i,i=7..10^6,2)]):
%p for n from 2 to 100 do
%p found:= false;
%p for i from 1 to nops(Cands) while not found do
%p x:= Cands[i];
%p cx:= xcat(C,x);
%p if isprime(cx) then
%p found:= true;
%p C:= cx;
%p Cands:= subsop(i=NULL,Cands);
%p A[n]:= x;
%p fi
%p od;
%p if not found then break fi;
%p od:
%p seq(A[i],i=1..n-1); # _Robert Israel_, May 05 2016
%t L={5}; v=5; While[Length@L < 100, p=3; While[MemberQ[L, p] || CompositeQ[w = v* 10^IntegerLength[p] + p], p = NextPrime[p]]; AppendTo[L, p]; v=w]; L (* _Giovanni Resta_, May 05 2016 *)
%Y Cf. A083757.
%K base,nonn
%O 1,1
%A _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 06 2003
%E More terms from _Max Alekseyev_, Aug 15 2013
|