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!)
A114757 Smallest prime of the form: n successive positive integers in ascending order followed by a 9. a(3k) = 0 as no such prime exists. 7

%I #10 Dec 05 2013 19:57:14

%S 19,239,0,23459,345679,0,23456789,234567899,0,2345678910119,

%T 6789101112131415169,0,313233343536373839404142439,

%U 36373839404142434445464748499,0,123456789101112131415169

%N Smallest prime of the form: n successive positive integers in ascending order followed by a 9. a(3k) = 0 as no such prime exists.

%e a(4) = 23459, four successive positive integers 2,3,4,5 in ascending order followed by a 9.

%t a[n_]:=If[Mod[n, 3]==0, 0, (For[m=1, (v={};Do[v=Join[v, IntegerDigits[k]], {k, m, m+n-1}]);!PrimeQ[10FromDigits[v]+9], m++ ];10FromDigits[v]+9)];Table[a[n], {n, 17}] - Farideh Firoozbakht

%t f[n_] := Block[{t = Range@n}, If[ Mod[n, 3] == 0, 0, While[p = FromDigits@Flatten@IntegerDigits@Join[t, {9}]; !PrimeQ@p, t++ ]; p]]; Array[f, 16] (* _Robert G. Wilson v_ *)

%Y Cf. A114754, A114755, A114756, A114758, A114759, A112716, A108145.

%K base,nonn

%O 1,1

%A _Amarnath Murthy_, Jan 01 2006

%E Extended by _Robert G. Wilson v_, _Ray Chandler_ and _Farideh Firoozbakht_, Jan 02 2006

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 23 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)