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.

A074366 The first prime greater than the concatenation of the first n primes.

Original entry on oeis.org

3, 29, 239, 2371, 235723, 23571127, 2357111357, 235711131727, 23571113171939, 2357111317192343, 235711131719232977, 23571113171923293283, 2357111317192329313801, 235711131719232931374149, 23571113171923293137414371, 2357111317192329313741434781
Offset: 1

Views

Author

Joseph L. Pe, Sep 26 2002

Keywords

Examples

			The first prime > 235, the concatenation of the first three primes, is 239. Hence a(3) = 239.
		

Crossrefs

Cf. A019518.

Programs

  • Mathematica
    p[n_] := Module[{r, i}, r = 2; i = 1; While[r <= n, i = i + 1; r = Prime[i]]; r]; s = ""; a = {}; Do[s = s <> ToString[Prime[i]]; a = Append[a, p[ToExpression[s]]], {i, 1, 8}]; a
    <Labos Elemer, Mar 18 2005 *)
    Module[{nn=20,p},p=Prime[Range[nn]];Table[NextPrime[FromDigits[Flatten[ IntegerDigits/@Take[p,n]]]],{n,nn}]] (* Harvey P. Dale, Oct 03 2013 *)
  • Python
    from sympy import nextprime, prime, primerange
    def a(n):
      return nextprime(int("".join(map(str, primerange(2, prime(n)+1)))))
    print([a(n) for n in range(1, 17)]) # Michael S. Branicky, Mar 29 2021

Extensions

More terms from Labos Elemer, Mar 18 2005
Edited by N. J. A. Sloane, May 21 2008 at the suggestion of R. J. Mathar
Edited by Charles R Greathouse IV, Apr 28 2010