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.

A074365 Smallest prime > the concatenation of the first n natural numbers.

This page as a plain text file.
%I A074365 #17 Apr 16 2025 05:41:58
%S A074365 2,13,127,1237,12347,123457,1234577,12345701,123456791,12345678923,
%T A074365 1234567891013,123456789101119,12345678910111223,1234567891011121343,
%U A074365 123456789101112131449,12345678910111213141523,1234567891011121314151753,123456789101112131415161869
%N A074365 Smallest prime > the concatenation of the first n natural numbers.
%H A074365 Michael S. Branicky, <a href="/A074365/b074365.txt">Table of n, a(n) for n = 1..369</a> (all terms with <= 1000 digits).
%F A074365 a(n) = nextprime(A007908(n)). - _Sean A. Irvine_, Jan 20 2025
%e A074365 The first prime > 123, the concatenation of the first three natural numbers, is 127. Hence a(3) = 127.
%p A074365 a:= n-> nextprime(parse(cat($1..n))):
%p A074365 seq(a(n), n=1..19);  # _Alois P. Heinz_, Feb 13 2021
%t A074365 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 A074365 Table[NextPrime[FromDigits[Flatten[IntegerDigits/@Range[n]]]],{n,20}] (* _Harvey P. Dale_, Jan 16 2018 *)
%o A074365 (Python)
%o A074365 from sympy import nextprime
%o A074365 def a(n):
%o A074365   return nextprime(int("".join(map(str, (i for i in range(1, n+1)))))-1)
%o A074365 print([a(n) for n in range(1, 19)]) # _Michael S. Branicky_, Feb 13 2021
%Y A074365 Cf. A007908.
%K A074365 base,nonn
%O A074365 1,1
%A A074365 _Joseph L. Pe_, Sep 26 2002
%E A074365 More terms from _Lior Manor_, Oct 08 2002
%E A074365 a(18) and beyond from _Michael S. Branicky_, Feb 13 2021