%I #24 Nov 07 2023 03:16:47
%S 2,5,3,13,11,31,23,43,53,73,7,17,41,61,71,37,83,103,101,131,151,181,
%T 191,211,241,251,271,47,67,97,19,281,311,113,331,163,401,421,431,173,
%U 461,491,29,59,79,107,521,541,571,127,601,631,193,641,661,691,89,109
%N a(1)=2, a(2)=5, a(3)=3; for n>3, a(n) is the smallest prime that has not already appeared and ends with the first digit in a(n-1) that equals 1, 3, 7 or 9.
%C Using Sierpiński's theorems [Sierpiński] (see also [Trost]), it is easy to see that the sequence is a permutation of the sequence of primes (A000040).
%D W. Sierpiński, Sur l'existence de nombres premiers avec une suite arbitraire de chiffres initiaux, Le Matematiche Catania, 1951.
%D E. Trost, Primzahlen, Verlag Birkhäuser, 1953, Theorems 20 - 21.
%H Peter J. C. Moses, <a href="/A262373/b262373.txt">Table of n, a(n) for n = 1..5000</a>
%Y Cf. A000040, A249974.
%K nonn,base
%O 1,1
%A _Vladimir Shevelev_, Sep 20 2015
%E a(46) corrected by _Peter J. C. Moses_, Sep 24 2015