%I #8 Jul 29 2018 13:56:42
%S 7,19,43,73,73,349,349,349,349,349,349,661,661,661,661,661,661,661,
%T 661,8629,8629,8629,8629,13399,13399,13399,14629,14629,24421,24421,
%U 24421,24421,24421,24421,24421,24421,24421,24421,24421,24421,24421
%N n consecutive primes differ by 4 or more starting at a(n), or n consecutive primes with no twin primes.
%H Robert Israel, <a href="/A054690/b054690.txt">Table of n, a(n) for n = 2..204</a>
%p P:= select(isprime, [seq(i,i=3..10^7,2)]):
%p A:= 'A':
%p state:= 0: smax := 0:
%p for i from 2 to nops(P) do
%p if P[i] - P[i-1] >= 4 then
%p state:= state + 1;
%p if state > smax then smax:= state; A[state+1]:= P[i-state] fi
%p else
%p state:= 0;
%p fi
%p od:
%p seq(A[i],i=2..smax+1); # _Robert Israel_, Jun 27 2017
%t Prime[#]&/@With[{pd=If[#>2,1,0]&/@Differences[Prime[Range[3000]]]}, Flatten[ Table[ SequencePosition[pd,PadRight[{},n,1],1][[All,1]],{n,45}]]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jul 29 2018 *)
%Y Cf. A054691, A054692.
%K nonn
%O 2,1
%A _Jeff Burch_, Apr 19 2000