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!)
A114756 Smallest prime of the form: n successive positive integers in ascending order followed by a 7. 8

%I #14 Jan 29 2022 18:56:21

%S 17,127,1237,12347,123457,56789107,456789107,3456789107,4567891011127,

%T 616263646566676869707,13141516171819202122237,

%U 2021222324252627282930317,151617181920212223242526277

%N Smallest prime of the form: n successive positive integers in ascending order followed by a 7.

%H Harvey P. Dale, <a href="/A114756/b114756.txt">Table of n, a(n) for n = 1..40</a>

%e a(4) = 12347, four successive positive integers 1,2,3,4 in ascending order followed by a 7.

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

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

%t Table[SelectFirst[10 FromDigits[Flatten[IntegerDigits/@#]]+7&/@ Partition[ Range[1000],n,1],PrimeQ],{n,20}] (* _Harvey P. Dale_, Jan 29 2022 *)

%Y Cf. A114754, A114755, A114757, 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 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)