cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A293564 Starts of a record number of consecutive integers n such that n^2 + 1 is composite.

This page as a plain text file.
%I A293564 #27 Jul 08 2018 01:48:32
%S A293564 3,7,27,41,95,185,351,497,3391,3537,45371,82735,99065,357165,840905,
%T A293564 3880557,27914937,40517521,104715207,1126506905,2084910531,2442825347,
%U A293564 4332318177,6716598047,17736392221,18205380337,30869303807,68506021365,78491213265,85620067845
%N A293564 Starts of a record number of consecutive integers n such that n^2 + 1 is composite.
%C A293564 Garrison proved in 1981 that there are arbitrarily long strings of consecutive integers n such that n^2 + 1 is composite. Thus, if the sequence of primes of the form n^2 + 1 (A002496) is infinite, this sequence is also infinite.
%C A293564 The record lengths are 1, 3, 9, 13, 15, 19, 33, 39, 45, 87, 99, 111, 129, 151, 211, 287, 329, 345, 443, 501, 525, 533, 563, 579, 613, 623, 633, 635, 639, 689, ...
%H A293564 Betty Garrison, <a href="https://msp.org/pjm/1981/97-1/pjm-v97-n1-p08-s.pdf">Consecutive integers for which n^2+1 is composite</a>, Pacific Journal of Mathematics, Vol. 97, No. 1 (1981), pp. 93-96.
%e A293564 7 is in the sequence since 7^2+1, 8^2+1 and 9^2+1 are composites, the first string of 3 consecutive composite numbers of the form n^2 + 1.
%t A293564 aQ[n_] := PrimeQ[n^2 + 1]; s = Flatten[Position[Range[100], _?(aQ[#] &)]]; dm = 1; a = {}; For[k = 0, k < Length[s] - 1, k++; d = s[[k + 1]]-s[[k]]; If[d > dm, dm = d; AppendTo[a, s[[k]] + 1]]]; a
%t A293564 f[n_] := f[n] = Block[{s, k = f[n -1]}, s = Boole@ PrimeQ[ Range[k, k +n -1]^2 +1]; While[Plus @@ s > 0, s = Join[s, Boole@ PrimeQ[{(k +n)^2 + 1, (k +n +1)^2 +1}]]; s = Drop[s, 2]; k += 2]; k]; f[1] = 3;  Do[ Print[{n, f@n}], {n, 329}] (* _Robert G. Wilson v_, Oct 12 2017 *)
%Y A293564 Cf. A002496, A002522, A005574.
%K A293564 nonn
%O A293564 1,1
%A A293564 _Amiram Eldar_, Oct 12 2017
%E A293564 a(17)-a(20) from _Robert G. Wilson v_, Oct 12 2017
%E A293564 a(21)-a(22) from _Giovanni Resta_, Oct 13 2017
%E A293564 a(23)-a(27) from _Chai Wah Wu_, May 16 2018
%E A293564 a(28)-a(30) from _Giovanni Resta_, May 18 2018