# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a242904 Showing 1-1 of 1 %I A242904 #7 May 26 2014 10:35:11 %S A242904 2,23,223,1223,2213,3221,10223,12203,20123,20231,21023,22013,22031, %T A242904 23021,23201,102023,102203,200231,201203,202031,220013,220301,300221, %U A242904 322001,1002263,1002623,1060223,1062203,1202063,1202603,1600223,2002361,2002613,2003621 %N A242904 a(n+1) is the smallest prime > a(n) such that the digits of a(n) are all (with multiplicity) contained in the digits of a(n+1), with a(1)=2. %p A242904 with(numtheory):lst:={2}:nn:=150000:x0:=convert(2,base,10):n0:=nops(x0): %p A242904 for n from 2 to nn do: %p A242904 p:=ithprime(n):x:=convert(p,base,10): %p A242904 x1:=x:n1:=nops(x):c:=0: %p A242904 for i from 1 to n0 do: %p A242904 ii:=0: %p A242904 for j from 1 to n1 while(ii=0)do: %p A242904 if x0[i]=x[j] %p A242904 then %p A242904 c:=c+1:x[j]:=99:ii:=1: %p A242904 else %p A242904 fi: %p A242904 od: %p A242904 od: %p A242904 if c=n0 %p A242904 then %p A242904 lst:=lst union {p}:n0:=n1:x0:=x1: %p A242904 else %p A242904 fi: %p A242904 od: %p A242904 print(lst): %Y A242904 Cf. A068167, A242905, A242906, A242907. %K A242904 nonn,base %O A242904 1,1 %A A242904 _Michel Lagneau_, May 26 2014 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE