OFFSET
1,2
COMMENTS
The value of n such that a new record number of composites appear for (n+1)^2+1, (n+2)^2+1, (n+3)^2+1, ...
Corresponding record gap sizes are given in A308987.
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
...yields the third record gap number of terms, so the start index n=6 appears as the third entry in this sequence.
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
KEYWORD
nonn
AUTHOR
Trevor Cappallo, Jul 04 2019
EXTENSIONS
a(21)-a(31) from Giovanni Resta, Jul 05 2019
STATUS
approved