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.

A140793 Smallest prime which is the concatenation of 2 or more consecutive numbers starting with n, or -1 if no such prime exists.

This page as a plain text file.
%I A140793 #21 Jun 14 2025 01:07:34
%S A140793 23,345678910111213141516171819,4567,567891011121314151617,67,
%T A140793 78910111213,89
%N A140793 Smallest prime which is the concatenation of 2 or more consecutive numbers starting with n, or -1 if no such prime exists.
%C A140793 Comment from _Ray G. Opao_, Sep 30 2008: a(9) is the following number:
%C A140793 91011121314151617181920212223242526272829303132333435363738394041424
%C A140793 34445464748495051525354555657585960616263646566676869707172737475767
%C A140793 77879808182838485868788899091929394959697989910010110210310410510610
%C A140793 71081091101111121131141151161171181191201211221231241251261271281291
%C A140793 30131132133134135136137138139140141142143144145146147148149150151152
%C A140793 15315415515615715815916016116216316416516616716816917017117217317417
%C A140793 5176177178179180181182183184185186187.
%F A140793 a(n) = concatenate( n, ..., A084559(n)). - _M. F. Hasler_, Feb 22 2021
%t A140793 f[n_] := Block[{c = n, k = n + 1}, While[c = 10^IntegerLength[k] c + k; p = c; !PrimeQ[c], k++]; c]; Table[f[n], {n, 2, 8}] (* _Robert G. Wilson v_, Jun 24 2012 *)
%t A140793 pr[n_]:=Module[{k=1},While[!PrimeQ[FromDigits[Flatten[IntegerDigits/@Range[n,n+k]]]],k++];FromDigits[Flatten[IntegerDigits/@Range[n,n+k]]]]; Array[pr,8,2] (* _Harvey P. Dale_, Mar 14 2014 *)
%o A140793 (PARI) A140793(n,N=n,T=10^logint(n,10))=while(T*=10,for(m=n+1,n=T-1,ispseudoprime(N=N*T+m)&&return(N))) \\ _M. F. Hasler_, Feb 22 2021
%Y A140793 Cf. A341715, A341716, A341717.
%K A140793 nonn,base
%O A140793 2,1
%A A140793 _Lekraj Beedassy_, Jul 15 2008
%E A140793 Added escape clause to definition. - _N. J. A. Sloane_, Feb 22 2021