login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A230358 a(n) is the smallest number k > 0 such that k, k + 1, ... , k + n - 1 are nonprime numbers, but k + n is prime. 1
2, 1, 9, 8, 25, 24, 91, 90, 119, 118, 117, 116, 115, 114, 527, 526, 525, 524, 889, 888, 1131, 1130, 1339, 1338, 1337, 1336, 1335, 1334, 1333, 1332, 1331, 1330, 1329, 1328, 9553, 9552, 15691, 15690, 15689, 15688, 15687, 15686, 15685, 15684, 19617, 19616, 19615 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

Harvey P. Dale, Table of n, a(n) for n = 0..100

EXAMPLE

a(0) = 2 because 2 is prime.

a(1) = 1 because 1 is nonprime, but 1 + 1 = 2 is prime.

a(2) = 9 because 9 and 10 are nonprimes, but 11 is prime.

a(3) = 8 because 8, 9 and 10 are nonprimes, but 11 is prime.

MAPLE

for n from 0 to 50 do: ii:=0:for k from 1 to 10000 while(ii=0) do:i:=0:for m from 0 to n while(type(k+m, prime)=false ) do :i:=i+1:od:if i=n then ii:=1: printf(`%d, `, k):else fi:od:od: ~

MATHEMATICA

nn = 50; t = Table[0, {nn}]; cnt = 0; k = 0; While[cnt < nn, k++; i = 0; While[! PrimeQ[k + i], i++]; If[i < nn && t[[i + 1]] == 0, t[[i + 1]] = k; cnt++]]; t (* *** program from T. D. Noe adapted for this sequence - see A233418 *** *)

Flatten[Table[SequencePosition[Table[If[PrimeQ[n], 0, 1], {n, 30000}], PadLeft[ {0}, k, 1], 1], {k, 50}], 1][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 20 2018 *)

CROSSREFS

Cf. A233418.

Sequence in context: A042977 A198106 A243261 * A228721 A108290 A308804

Adjacent sequences:  A230355 A230356 A230357 * A230359 A230360 A230361

KEYWORD

nonn

AUTHOR

Michel Lagneau, Dec 10 2013

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 21 09:56 EST 2019. Contains 329362 sequences. (Running on oeis4.)