cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A276200 Largest prime < the concatenation of the numbers from 1 to n (A007908).

Original entry on oeis.org

11, 113, 1231, 12343, 123449, 1234547, 12345653, 123456761, 12345678899, 1234567891003, 123456789101099, 12345678910111207, 1234567891011121309, 123456789101112131383, 12345678910111213141337, 1234567891011121314151561, 123456789101112131415161717, 12345678910111213141516171723
Offset: 2

Views

Author

Ilya Gutkovskiy, Aug 24 2016

Keywords

Examples

			a(5) = 12343, because this is the largest prime less than 12345.
		

Crossrefs

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}]

Formula

a(n) = A151799(A007908(n)).
a(n) = A000040(A000720(A007908(n)-1)).
Showing 1-1 of 1 results.