The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A349121 a(n) is the smallest prime p, such that p + k + k^2 are consecutive primes for 0 <= k <= n, but not for k>n. 1
3, 5, 17, 347, 13901, 665111, 128981, 113575727, 2426256797, 137168442221, 4656625081181, 101951758179851, 484511389338941, 221860944705726407 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) is the smallest prime followed by exactly n prime gaps in arithmetic progression with a common difference of 2 and starting with prime gap 2.
LINKS
EXAMPLE
a(4)=347, because it is the smallest prime such that 347 + 2 = 349, 349 + 4 = 353, 353 + 6 = 359, 359 + 8 = 367 are 5 consecutive primes.
MATHEMATICA
Table[k=2; While[Flatten[k+(s={Range[0, n]})+s^2]!=NextPrime[k, Range[0, n]]||NextPrime[k, n+1]==k+n+1+(n+1)^2, k=NextPrime@k]; k, {n, 7}] (* Giorgos Kalogeropoulos, Nov 10 2021 *)
PROG
(PARI) isok(p, n) = my(q=p); for (k=1, n, my(r = p+k+k^2); if (nextprime(q+1) != r, return (0)); q=r); return(1);
a(n) = my(p=2); while (!isok(p, n), p=nextprime(p+1)); p; \\ Michel Marcus, Nov 09 2021
CROSSREFS
Cf. A016045, A001223 (prime gaps), A036263 (2nd differences), A158939 (monotonic increasing).
Sequence in context: A123599 A100270 A016045 * A128336 A278735 A094487
KEYWORD
nonn,more
AUTHOR
Marc Morgenegg, Nov 08 2021
STATUS
approved

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 May 20 08:57 EDT 2024. Contains 372710 sequences. (Running on oeis4.)