login
a(1) = 1; a(n) is smallest number > a(n-1) such that the juxtaposition a(n)a(n-1)...a(1) is a prime.
1

%I #8 Mar 23 2014 20:14:33

%S 1,3,4,5,7,14,21,43,56,96,141,178,180,198,263,271,315,347,352,471,530,

%T 565,588,707,711,793,812,850,887,952,1083,1214,1218,1266,1564,1661,

%U 1686,1744,1976,2047,2066,2166,2268,2412,2740,2777,2895,2905,3056,3058,3293

%N a(1) = 1; a(n) is smallest number > a(n-1) such that the juxtaposition a(n)a(n-1)...a(1) is a prime.

%H Paolo P. Lava, <a href="/A239547/b239547.txt">Table of n, a(n) for n = 1..100</a>

%p with(numtheory);

%p S:=proc(s) local w; w:=convert(s, base, 10); sum(w[j], j=1..nops(w)); end:

%p T:=proc(t) local w, x, y; x:=t; y:=0; while x>0 do x:=trunc(x/10); y:=y+1; od; end:

%p P:=proc(q) local a, b, c, j, n; a:=1; j:=2; print(1);

%p for n from 1 to q do b:=T(a); c:=j*10^b+a;

%p if isprime(c) then a:=j*10^b+a; print(j); fi;

%p j:=j+1; od; print(); end: P(10^10);

%Y Cf. A033680, A074336.

%K nonn,base

%O 1,2

%A _Paolo P. Lava_, Mar 21 2014