OFFSET
1,1
COMMENTS
Before correction the sequence began as follows: 2, 23, 311, 1009, 90001, 100003, 3000017. However the third term is incorrect since the smallest 3-digit prime with most significant digit 3 is 307 not 311. - Alexis Olson (AlexisOlson(AT)gmail.com), Nov 14 2008
LINKS
Robert Israel, Table of n, a(n) for n = 1..995
EXAMPLE
a(5) = 90001 has (LSD) Least Significant Digit as 1 and a(6) = 100003, the smallest 6 digit prime with the most significant digit as 1.
MAPLE
A[1]:= 2:
for n from 2 to 30 do A[n]:= nextprime((A[n-1] mod 10)*10^(n-1)) od:
seq(A[i], i=1..30); # Robert Israel, Jan 04 2023
MATHEMATICA
For[i = 1; v = 2; s = {}, i <= 500, i++, LSD = IntegerDigits[v][[-1]]; For[n = LSD*10^i, n <= 2*LSD*10\^i, n++, If[PrimeQ[n], v = n; s = Union[s, {n}]; Break[]]]]; s (* Alexis Olson, Nov 14 2008 *)
NestList[NextPrime[Mod[#, 10]10^IntegerLength[#]]&, 2, 20] (* Harvey P. Dale, Apr 03 2011 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 02 2002
EXTENSIONS
Corrected and extended by Alexis Olson (AlexisOlson(AT)gmail.com), Nov 14 2008
STATUS
approved