The OEIS is supported by the many generous donors to the OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A308987 In the sequence {n^2+1} (A002522), color the primes red. When the number of terms m between successive red terms sets a new record, write down m+1. 1
 1, 2, 4, 10, 14, 16, 20, 34, 40, 46, 88, 100, 112, 130, 152, 212, 288, 330, 346, 444, 502, 526, 534, 564, 580, 614, 624, 634, 636, 640, 690 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS This sequence represents the highest gaps, given by number of terms (including the starting prime) in sequence A002522 between terms which are prime. LINKS EXAMPLE n=6 --> 6^2+1 = 37, prime n=7 --> 7^2+1 = 50, composite n=8 --> 8^2+1 = 65, composite n=9 --> 9^2+1 = 82, composite n=10 --> 10^2+1 = 101, prime ...so here m=3 and we get the third term, m + 1 = 10 - 6 = 4 MATHEMATICA best = c = lastBestAt = 0; For[i = 2, True, i += 2; c += 2, If[PrimeQ[i^2 + 1], If[c > best, best = c; bestAt = i - c; If[bestAt != lastBestAt, Print[{c, bestAt}]]; lastBestAt = bestAt; ]; c = 0; ] ] CROSSREFS Cf. A002496, A002522, A308988. A293564 gives essentially the same information. Sequence in context: A034233 A056718 A057283 * A107992 A139480 A227388 Adjacent sequences: A308984 A308985 A308986 * A308988 A308989 A308990 KEYWORD nonn,more AUTHOR Trevor Cappallo, Jul 04 2019 EXTENSIONS a(21)-a(31) from Giovanni Resta, Jul 05 2019 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.

Last modified February 5 03:48 EST 2023. Contains 360082 sequences. (Running on oeis4.)