login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A074366 The first prime greater than the concatenation of the first n primes. 2

%I #17 Mar 30 2021 05:21:09

%S 3,29,239,2371,235723,23571127,2357111357,235711131727,23571113171939,

%T 2357111317192343,235711131719232977,23571113171923293283,

%U 2357111317192329313801,235711131719232931374149,23571113171923293137414371,2357111317192329313741434781

%N The first prime greater than the concatenation of the first n primes.

%H Harvey P. Dale, <a href="/A074366/b074366.txt">Table of n, a(n) for n = 1..200</a>

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

%t 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

%t <<NumberTheory`NumberTheoryFunctions` sz[x_] :=FromDigits[Flatten[Table[IntegerDigits[Prime[j]], {j, 1, x}], 1]] Table[NextPrime[sz[w]], {w, 1, 35}] (* _Labos Elemer_, Mar 18 2005 *)

%t Module[{nn=20,p},p=Prime[Range[nn]];Table[NextPrime[FromDigits[Flatten[ IntegerDigits/@Take[p,n]]]],{n,nn}]] (* _Harvey P. Dale_, Oct 03 2013 *)

%o (Python)

%o from sympy import nextprime, prime, primerange

%o def a(n):

%o return nextprime(int("".join(map(str, primerange(2, prime(n)+1)))))

%o print([a(n) for n in range(1, 17)]) # _Michael S. Branicky_, Mar 29 2021

%Y Cf. A019158.

%K nonn,base

%O 1,1

%A _Joseph L. Pe_, Sep 26 2002

%E More terms from _Labos Elemer_, Mar 18 2005

%E Edited by _N. J. A. Sloane_, May 21 2008 at the suggestion of _R. J. Mathar_

%E Edited by _Charles R Greathouse IV_, Apr 28 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)