login
a(n+1) is next smallest prime beginning with a(n), initial prime is 11.
10

%I #17 Sep 30 2015 08:53:44

%S 11,113,11311,113111,1131113,11311133,1131113353,113111335313,

%T 11311133531339,113111335313399,1131113353133993,113111335313399321,

%U 11311133531339932153,1131113353133993215379,113111335313399321537911

%N a(n+1) is next smallest prime beginning with a(n), initial prime is 11.

%H Clark Kimberling, <a href="/A048553/b048553.txt">Table of n, a(n) for n = 0..498</a>

%p f:= proc(n)

%p local p, d;

%p for d from 1 do

%p p:= nextprime(n*10^d);

%p if p < (n+1)*10^d then return p fi

%p od

%p end proc:

%p A[1]:= 11:

%p for n from 2 to 20 do A[n]:= f(A[n-1]) od:

%p seq(A[n], n=1..20); # _Robert Israel_, Aug 16 2015

%t a = {11}; Do[k = 1; w = IntegerDigits[a[[n - 1]]];

%t While[CompositeQ@ FromDigits[Join[w, IntegerDigits@ k]], k += 2];

%t AppendTo[a, FromDigits[Join[w, IntegerDigits@ k]]], {n, 2, 15}]; a (* _Michael De Vlieger_, Sep 21 2015 *)

%Y Cf. A048549-A048556, A261199-A261201, A261269-A261270.

%K nonn,base

%O 0,1

%A _Patrick De Geest_, May 15 1999