login
A077203
a(1) = 2. Then the smallest n-digit prime starting with the last digit of the previous term.
1
2, 23, 307, 7001, 10007, 700001, 1000003, 30000001, 100000007, 7000000001, 10000000019, 900000000013, 3000000000013, 30000000000011, 100000000000031, 1000000000000037, 70000000000000003, 300000000000000011
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
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
Sequence in context: A367677 A294161 A088641 * A173935 A216549 A091693
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