A276200 Largest prime < the concatenation of the numbers from 1 to n (A007908).
11, 113, 1231, 12343, 123449, 1234547, 12345653, 123456761, 12345678899, 1234567891003, 123456789101099, 12345678910111207, 1234567891011121309, 123456789101112131383, 12345678910111213141337, 1234567891011121314151561, 123456789101112131415161717, 12345678910111213141516171723
Offset: 2
Examples
a(5) = 12343, because this is the largest prime less than 12345.
Links
- Robert Israel, Table of n, a(n) for n = 2..368
- Eric Weisstein's World of Mathematics, Previous Prime
Programs
-
Maple
tcat:= (a,b) -> a*10^(1+ilog10(b))+b: t:= 1: R:= NULL: for i from 2 to 20 do t:= tcat(t,i); R:= R,prevprime(t); od: R; # Robert Israel, Oct 29 2024
-
Mathematica
Table[NextPrime[FromDigits[Flatten[IntegerDigits[Range[n]]]], -1], {n, 2, 19}]